×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    141

    MMF Video Controller

    Hi, All!!!

    i write my MMF Controller, FormatDecode, and two Codecs, all of that installed to a Symbian as MMF plugins... the question is:
    At debug process (on device): When i try to play video file (with my owen video player), framework don't return any pointer on a video sink in my controller plugin, but audio sink looks fine... framework create sink just at once... why it happends???
    what kind of sink i need to use??? why 3pg video playing fine??? were i need to look???

    --
    Wbr, I'am.

  2. #2
    Registered User
    Join Date
    Sep 2005
    Posts
    12

    Re: MMF Video Controller

    hii
    I am also trying to write a controller plugin and a codec plugin for playing a encoded video file.Please give me some pointers ( apart from SDK ) .
    How to write the controller plugin?
    Thanks in advance

  3. #3
    Regular Contributor
    Join Date
    Oct 2004
    Location
    Tokyo,Japan
    Posts
    289

    Thumbs up Re: MMF Video Controller

    Hello hedge,
    I had implemented a project MMFController plug in that used helix engine for media decoding and rendering .

    Steps to implement a MMF controller plug in :
    1. Create a ECOM plgin , with class derived from CMMFController and provide implementation for the pure virtual functions (like - AddDataSourceL , AddDataSinkL , RemoveDataSourceL , RemoveDataSinkL, PlayL, PauseL,StopL,DoSendEventToClient etc.) provided by this abstract class .

    2. Create your own media engine that uses CMMFDevSound(handles all raw auido features) for audio rendering and decoding.
    Derive a class from MDevSoundObserver , this class will have a member , a handle to CMMFDevSound (say iDevSound).

    create this handle by calling

    iDevSound=CMMFDevSound::NewL();

    and

    pass pointer to class derived from MDevSoundObserver to InitializeL().


    3. Now your iDevSound is initialised. next is to confiure it by calling SetGain() , SetVolume() , SetPlayBalanceL()

    4. Now call PlayInitL() on iDevSound. This works in two steps , first it calls method BufferToBeFilled(CMMFBuffer *aBuffer)

    as provided by MDevSoundObserver and implemented by developer.

    5.You need to supply CMMFDevSound object the data that it needs to play .So inside this function you can decode you audio

    data into raw audio and copy it into aBuffer , else PlayError() function will be called with appropriate error code.
    As soon as this function (BufferToBeFilled) completes , PlayData() function will be automatically called to play the data.

    Note - if you want to do audio recording you must call function BufferToBeEmptied().



    In nutshell , you will have basically three layers in this project :
    1. Application Layer (UI) 2. MMF Controller 3. Media Engine

    In Application Layer , you can use a handle to CMdaAudioPlayer (say for example) . So when you call a method to initialise

    this handle with some file , like OpenFile(filename) , this call routes to AddDataSource function of your MMF controller

    plugin and finally this must call the configuration and the initialisation functions on handle to CMMFdevSound of your media

    engine.

    Similarly , the play , stop , pause etc. functions have to be routed from your controller plugin to media engine.


    Sorry regarding video rendering , I had not worked on this module of project , I will try to provide you the steps for doing so , ASAP !



    I hope this information will be helpful to you.
    Cheers
    Neo
    Last edited by navjotsingh1979; 2006-02-28 at 06:55. Reason: spelling mistakes !

  4. #4
    Registered User
    Join Date
    Sep 2005
    Posts
    12

    Re: MMF Video Controller

    Hi navjot,

    Thanx for the information.But I am not working on a audio player.I am trying to implement a MMF video player. I have an encoded video stream. I have a decoder engine.So using CVideoPlayerUtility I am trying to play this video stream.Since its an encoded stream, I need to write the codec plugin(I already have a decoder dll, so need to convert it into ECom codec plugin ) and a controller plugin to access this plugin.
    So no where in SDK information is provided about how exactly control is passed between controller plugin and codec plugin. Yes when we use player utility, through OpenFileL() we could pass the control t the controller framework. But where exactly should the control pass to the codec plugin.
    so let me know if you know anything about this.

    Thanks.

  5. #5
    Regular Contributor
    Join Date
    Oct 2004
    Location
    Tokyo,Japan
    Posts
    289

    Re: MMF Video Controller

    Hi hedge ,
    When you call OpenFileL() on handle of CVideoPlayerUtility control goes to MMF controller plug-in's AddDataSource and AddDataSink , here you need to implement your code.Like in AddDataSource you must call configuring and initialisation methods of your Media engine where the video decoder and renderer are created/initialised.

    can you find out the concrete Symbian class doing raw video rendering ?

    then i may suggest you some ideas !


    cheers
    neo

  6. #6
    Registered User
    Join Date
    Nov 2005
    Posts
    16

    Re: MMF Video Controller

    Hi,
    @hegde
    I dont believe you need a codec plugin. I had seen a post from symbian helpdesk which said that codec and format plugins are depracated in 3rd party solutions. Considering that you need only to display video, you can do with only a controller plugin. Your question is probably in which function in the controller your decoder library should be called. You need a callback mechanism in place like the one neo suggested.

    Function buffertobefilled-decodes audio data, fills a buffer with pcm output and calls playdata(). When the pcm data has been rendered a callback is made to buffertobefilled again. buffertobeemptied will in turn call playdata(). This process will go on till EOF. Now the right place to begin this callback mechanism would be the PlayL method of controller.
    I have also made a similar audio controller based on the oggvorbis controller of symbian but the two functions involved in my callback mechanism are BufferEmptiedL defined in MDataSource and the EmptyBufferL of CMMFAudioOutput. I begin this cycle in the PlayL method of controller plugin.

    so you need to have a class derived from mdatasource whose BufferEmptiedL method will look like
    BufferEmptiedL(aBuffer)
    {
    decode next video frame and fill it in aBuffer
    Call method DoDSA.
    }
    DoDSA(aBuffer)
    {
    Display this frame
    Callback BufferEmptiedL to get next frame
    }
    The problem i am facing is I dont know how to do a DSA in the controller plugin side as all the inputs required to CDirectScreenAccess::NewL are owned by the UI/Client side thread.
    Hope this helps,

    plus neo just replied with another way as i was posting

    groys

  7. #7
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    141

    Re: MMF Video Controller

    Hello dear groys,

    if i will be use your method, i think i will has a recursion problem
    Why all tell's about DSA in a controller part??? why i can't just use something liked BitBlt from CFbsBitGc???
    all works fine without any DSA

    and use MvpcDirectScreenAccessEventL to check weather when i need to update screen region????

    i had some trouble with multithreading... somebody tell me how to use RThread currectly??? mybe some one has example code????

    Wbr, Yuri

  8. #8
    Registered User
    Join Date
    Nov 2005
    Posts
    16

    Re: MMF Video Controller

    hi shadow,
    firstly in bufferemptied you will also check EOF condition, if file ends you call mvpuoplaycompleted() callback and not DoDSA();
    About your display suggestion, if you want to do that, you will probably have to get decoded video frames from the controller plugin through the getFrameL() method of CVideoPlayerUtility (am I right?). But going by MMF documentation that is not what GetFrameL is for. If you check the video player example on forum nokia it never calls getFrameL repeatedly. It only calls play() once. This suggests display is done on the controller side. I am working displaying in controller as of now. Will update you soon.
    Donno about threads.
    regards,
    Groys

  9. #9
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    141

    Re: MMF Video Controller

    Hello dear groys,

    we don't understand each other i tell you about controller side, i already wrote my own MMF controller, mmf formatDecode (avi demuxer), mmf codecs(audio/video decoders), and i've got a buffer with RGB16 (after my ColorSpace Converter) bits from MMF video codec, inside mmf controller, and that's why i use BitBlt to rendering video frames on the screen

    Implementing Video Renderer in Player side it's wrong way, i think... My video plyaer: just plays, convert (resize, etc) video...

    about your sugges: use some class derived from MDataSource/*Sink. I think one of sink/source must be implemented by MMF Server side, and one of them must be created by you, then no recursion problem, if you wrote sink and source by your self you will get stack overflow (recursion problem)

    my group of plugin work well, but i had only one problem with multithreading, maybe you can tell me how currectly use RThread???

    and what you know about symbian semaphores, mutex'es????

    --
    Wbr, Yuri
    Last edited by shadow-2005; 2006-03-06 at 11:53. Reason: forgotten some text

  10. #10
    Registered User
    Join Date
    Nov 2005
    Posts
    16

    Re: MMF Video Controller

    Hi shadow,
    now i understand what you are doing on controller side, i am trying to do the same. I havent faced the recursion problem you are talking about.
    Plus donno about thread. may be you can look for some tutorial on NewLC site.
    regards,
    groys

  11. #11
    Registered User
    Join Date
    Mar 2006
    Posts
    27

    Re: MMF Video Controller

    hi shadow...
    u have written formatdecode and codec plu-ins...how to provide communication between those two through controller plug-in?plz tell me how can the controller plug-in organize all the plug-ins..i have gone through the SDK and oggcontroller ex,but i didn't get that...plz help me


    thanku

  12. #12
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    141

    Re: MMF Video Controller

    Hello dear axby123,

    Now i have some changes in my group of plugins, on start point i has controller and formatDecode as one stand-alone plugin, now i already have MMF Controller, formatDecode and codecs in differrent plugins (dll's). For playing audio, you wiil need to write: controller: with datapath object and reference to codec plugin (configure, proccess methods in codec plugin must present !!!), in formatDecode plugin - you just wrote yours demuxer, for example avi demuxer...

    Wbr, Yuri

    Quote Originally Posted by axby123
    hi shadow...
    u have written formatdecode and codec plu-ins...how to provide communication between those two through controller plug-in?plz tell me how can the controller plug-in organize all the plug-ins..i have gone through the SDK and oggcontroller ex,but i didn't get that...plz help me


    thanku

  13. #13
    Registered User
    Join Date
    Sep 2005
    Posts
    12

    Re: MMF Video Controller

    Hi,

    We are developing an MMF player which consists of a client, controller plugin, source plugin and codec plugin. Now I want to integrate all these plugins and test it.But as far as I know, I cant do it on the emulator. so I am trying to directly test it on the device.so now do we have to create seperate sis files for each plugin and install or should I make one sis file and install?? and which directories in the device these plugins go?

    Thanx

  14. #14
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    141

    Re: MMF Video Controller

    Hi, v_hegde!!!

    package file, used for generating 'sis' file, may consist multiply path definitions, directory in phone must be like this: c:\\system\\plugins\\codec.dll

    do not forget include .rss file for each of yours plugin's.

    --
    Wbr, Yuri

    Quote Originally Posted by v_hegde
    Hi,

    We are developing an MMF player which consists of a client, controller plugin, source plugin and codec plugin. Now I want to integrate all these plugins and test it.But as far as I know, I cant do it on the emulator. so I am trying to directly test it on the device.so now do we have to create seperate sis files for each plugin and install or should I make one sis file and install?? and which directories in the device these plugins go?

    Thanx

  15. #15
    Registered User
    Join Date
    Sep 2005
    Posts
    12

    Re: MMF Video Controller

    Hi Shadow,

    Thanx for the reply.But each package file wil have the UID of that particular plugin for which you are creating the sis file.So if we are giving multiple path definitions including all the .dll paths in one pkg file, then what is the UID we should specify in the pkg file??

    Thanx.

Similar Threads

  1. MMF Controller plugin
    By cherem in forum Symbian Media (Closed)
    Replies: 24
    Last Post: 2007-12-06, 01:36
  2. MMF controller plugin and Mpeg-4 codec??
    By mayur_24 in forum Symbian Media (Closed)
    Replies: 8
    Last Post: 2006-10-18, 06:31
  3. Replies: 3
    Last Post: 2006-03-06, 16:15
  4. Simultaneous video rendering - issue SOS
    By arvind_v in forum Streaming and Video
    Replies: 0
    Last Post: 2006-01-04, 16:12
  5. MMF Video and audio
    By groys in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2005-11-16, 09:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×