×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Regular Contributor
    Join Date
    Jul 2005
    Location
    Russia, Tomsk
    Posts
    60

    To NOKIA PEOPLES : MMF Controller plugin

    I want to understand mmf controller plugin mechanism.
    If i want to write new video codec, shoud i write only codec plugin or write whole controller plugin?

    If only codec, controller plugin already present in OS? And format plugin, sink, source plugin too?

    How OS choose the plugin (format, decoder,encoder) which needs?

    There are too small info about it in sdk.

    When i use CVideoPlayer mmf class i have not to select plugins, so how OS do it?

    Is there are any docs where are i can understand it?

    Please, give links to any docs which can HELP.
    Last edited by cherem; 2005-08-01 at 09:18.

  2. #2
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    94

    Re: MMF Controller plugin

    I wonder why there are too little info about these Imp. concepts documents..I am also facing a lot problem in using these components in my application.

    As Nokia People are claiming they are going to make things simpler and stuctured (avoiding complexity) for developers I request them on behalf of developers community to do it in real practice and in earlier possible time.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMF Controller plugin

    Hi,

    The best documentation I know of that is available for this task is this:
    http://www.symbian.com/developer/tec...ide/index.html
    This is a tricky area because as far as I'm aware Nokia have not been using MMF plugins for video internally. The Real Player that ships with most devices sits directly on top of the low-level DevVideo interface and the codecs generally run on a DSP.

    There aren't any generic controller plugins in the system that will take any codec plugin and source, sink and format plugins and play the content. If you write a codec plugin you will also have to write a controller plugin that uses it (unless you just use the codec in your application directly - there is nothing to stop you loading any of these plugins once you've written them).

    Source and sink plugins are more optional - if you'll get your input from a file then that is already available and for output you're likely to want to use CDirectScreenAccess and CMMFDevSound. You could wrap them with sink plugins but it isn't necessary.

    For Format plugins it is similar. You can do the file format decoding in a plugin and extract the audio and video streams to send to the codecs or you could do that in your controller. The purpose of having plugins for this is re-use and allowing generic controllers that support multiple file formats and codecs. In practice I think most systems have a separate controller plugin for every audio codec (AAC, MP3 etc) and often separate ones for encoding (where supported) and decoding.

    I don't believe any of the built-in applications will use your plugin if you write one though, so you'd have to write a client that loads your plugin and uses it.

    You might consider looking at the Helix DNA client for Symbian:
    https://symbian.helixcommunity.org/s..._helix_v3.html
    That is mostly open source and you may be able to add your own video codec there? I'm not sure of the current status of that project, the website doesn't seem to have been updated for a while.

    In general, I think it was intended that device manufacturers and their partners would write multimedia plugins rather than independent 3rd party developers. In such cases I think more support and documentation would be available from Symbian.

    Hope that helps,
    Sorcery

  4. #4
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: MMF Controller plugin

    Hi

    I've created a controller plugin for local file playback in similar lines as Ogg controller, but AddDataSourceL() never gets executed when I do a OpenFileL() with my controllerId.

    Could anyone help me understand what could be the problem.

    Thanks
    Bhavana

  5. #5
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMF Controller plugin

    Hi Bhavana,

    Does your controller plugin construction code get called? It is easy to use the wrong UID.

    You could try using RMMFController to load your plugin manually and add the data source. Then you can make sure your code is working.

    Hope that helps,
    Sorcery

  6. #6
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: MMF Controller plugin

    Hi Sorcery

    Thank you for your response.

    My contructor gets called, and no other function in my controller gets called.

    I'll try the RMMFController method you have suggested.

    If you dont mind, could you please send me the working version of a controller plugin and the corresponding application? The Ogg plugin available open source does not seem to be working 9.1 onwards. There are lot of compilation issues.

    Thank you
    Bhavana

  7. #7
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMF Controller plugin

    Hi Bhavana,

    I don't think the Ogg controller plugin available from Symbian was updated but there is a version in the Symbian Ogg Player project which compiles and runs for S60 3rd.

    http://sourceforge.net/projects/symbianoggplay

    Hope that helps,

    Sorcery

  8. #8
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: MMF Controller plugin

    Hi

    I need the source code, preferably for UIQ.

    However I could compile PlayOgg app and the OggController with the source code provided and get OggVorbisController.dll and playogg.exe.

    But the problem remains the same when I execute playogg.exe. The controller never gets called, this time even the constructor/newL() function does not get called .

    Am I going something wrong here?

    Thank you
    Bhavana

    This is my .RSS file :
    =======================
    #include "OggVorbisControllerUIDs.hrh"
    #include <mmfPluginInterfaceUIDs.hrh>
    #include "RegistryInfo.rh"


    RESOURCE REGISTRY_INFO theInfo
    {
    dll_uid = KOggVorbisControllerDLLUid;
    interfaces =
    {
    INTERFACE_INFO // Controller Plugin Description
    {
    interface_uid = KMmfUidPluginInterfaceController ;
    implementations =
    {
    IMPLEMENTATION_INFO
    {
    implementation_uid = KOggVorbisControllerUid ;
    version_no = 1;
    display_name = "Ogg Vorbis Controller. Codec Copyright (c) 2002, Xiph.org Foundation";
    default_data = "?";
    opaque_data =
    "<s>Symbian<i>0x101F5D07<p>0x101F0001";
    // SUPPLIER = <s>
    // MEDIA ID = <i>
    // PLAY FORMATS = <p>
    // RECORD FORMATS = <r>
    }
    };
    },
    INTERFACE_INFO // Play Formats Description
    {
    interface_uid = 0x101F0001 ;
    implementations =
    {
    IMPLEMENTATION_INFO
    {
    implementation_uid = KOggVorbisPlayUid ;
    version_no = 1;
    display_name = "OggVorbis Play Format";
    default_data = "?";
    opaque_data =
    "<s>Symbian<i>0x101f5d07<e>.ogg<h>OggS*vorbis<m>application/ogg";
    // uncomment this line to use Ogg files as your ringtone....
    //"<s>Symbian<i>0x101f5d07<e>.ogg<h>OggS*vorbis<m>audio/wav";

    }
    };
    }
    };
    }
    This is controller.mmp:
    =======================

    // Controller.mmp
    //
    // Copyright © Symbian Software Ltd 2004. All rights reserved.
    //

    TARGET OggVorbisController.dll
    TARGETTYPE ECOMIIC
    TARGETPATH \System\Libs\Plugins

    UID 0x10009D8D 0x1020239A

    SOURCEPATH ..\Controller
    SOURCE OggVorbisController.cpp
    USERINCLUDE ..\Controller

    SYSTEMINCLUDE ..\OggVorbisFile
    SYSTEMINCLUDE +\include
    SYSTEMINCLUDE +\include\libc
    SYSTEMINCLUDE +\include\ecom
    SYSTEMINCLUDE +\include\mmf\server
    SYSTEMINCLUDE +\include\mmf\common

    RESOURCE 1020239A.RSS

    LIBRARY euser.lib mmfserverbaseclasses.lib MMFControllerFramework.lib
    LIBRARY ecom.lib estlib.lib MMFDevSound.lib oggvorbisfile.lib
    LIBRARY MmfStandardCustomCommands.lib FLogger.lib

    This is plyogg.mmp:
    ====================

    // PlayOgg.mmp
    //
    // Copyright (c) 2004 Symbian Software Ltd. All rights reserved.
    //

    TARGET playogg.exe
    TARGETTYPE exe
    UID 0x1000008d 0x01000100
    SOURCEPATH ..\testapp
    SOURCE PlayOgg.cpp
    USERINCLUDE ..\testapp
    SYSTEMINCLUDE +\include
    LIBRARY euser.lib MediaClientAudio.lib eikcoctl.lib

  9. #9
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMF Controller plugin

    Hi,

    I haven't tried porting my code to UIQ yet (device volumes are lower). I'm not aware of any open source reference. The Ogg Player has never used the MMF for UIQ as far as I'm aware.

    Since the Ogg Player uses the framework to look up the correct controller by the media type I guess the magic UID 0x101F5D07 might be different on UIQ? That's just a complete guess though.

    Again I'd try to load the plugin directly using its UID via RMMFController. That way you know if it's a problem with the plugin loading and adding of data sources or just a problem with the type recognition.

    Sorcery

  10. #10
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: MMF Controller plugin

    Hi
    I checked the oggplay site for UIQ, the ID seems to be 0x101F5D07.
    I tried using RMMFController as well with the following, it still does not hit my AddDataSource()

    Also there's one more thing I observed, my controller constructor & NewL() gets triggered during emulator start up.
    This happens only if I give some name to the dll. If I give the same number as the Id of the dll, say A000A87.dll it does not trigger at the start up.

    You see any issue there?

    Thank you
    Bhavana

    TUid aPlaybackControllerUid = {0xA000A88};


    aPrioritySettings.iPriority = EMdaPriorityNormal;
    aPrioritySettings.iPref = EMdaPriorityPreferenceTimeAndQuality;

    TMMFFileConfig sourceCfg;
    sourceCfg().iPath = KInitAudioPath;

    RMmfController = new RMMFController();
    RMmfController->Open(aPlaybackControllerUid, aPrioritySettings);
    RMmfController->AddDataSource(KUidMmfFileSource, sourceCfg);

  11. #11
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMF Controller plugin

    Have you tried checking the error codes that the RMMFController functions return? If they return KErrNone then I can only imagine you are somehow loading another plugin, or that your functions are being called but for some reason you have a problem with breakpoints or tracing.

    I expect you will get an error and that will hopefully help you trace the problem.

    I remember some problems with the dll and rsc file naming. You should be able to find the answer elsewhere on the forum. I think I found that it doesn't matter what you call them but you must give them both the same name... maybe not though, I don't have my project here to check (for Symbian signing you should put the UID in your file name somehow to ensure unique naming of executables).

    Sorcery

  12. #12
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: MMF Controller plugin

    Hi

    Thanks for your support.
    I could make some progress on this.
    Now I'm able to get my controller hit with AudioPlayerUtility.

    I could get this for one particular file which does not seem to be supported by the default plugin, but still a valid file.


    But still facing some issues in getting the audio play.

    I'm writing my plugin in similar lines as Ogg example.
    I'm trying to play a .au 8-bit Linear PCM file.
    I'm able to Prime, start playing.

    As in COggVorbisController::PlayL()

    I'm also using a CFakeFormatDecode* fake for iAudioOutput->NegotiateL.

    But I'm not using FourCC code.

    Q1) Is this an issue? How do I know if NegotiateL succeeds, as it does not return a return value.

    I assume NegotiateL succeded and called iAudioOutput->EmptyBufferL with NULL.

    I got a callback with COggVorbisFile::BufferEmptiedL() for the first time from CMMFAudioOutput. Then as in OggController I tried sending data buffer to MDataSink->EmptyBufferL.

    Q2) At this point I expect MDataSink to consume data and call COggVorbisFile::BufferEmptiedL() continuously till the end of the file , this does not seem to happen, instead i hear bad sound and COggVorbisFile::CBody::read_func() gets called.

    Could you please explain what is happening here? Where am I going wrong?

    Thanks
    Bhavana

  13. #13
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMF Controller plugin

    Hi,

    Are you trying to play the .au file directly by passing the data to the CMMFAudioOutput? I think you just need to remove the header from the .au and set the FourCC to play PCM8 in your NegotiateL(). If you don't set anything I expect it will default to PCM16 which will combine 2 of your samples into a single sample and make a bad sound!

    You should keep getting BufferEmptiedL() callbacks as long as there are no errors.

    I don't remember the details of the Ogg plugin too well but it sounds like your MDataSource is being asked to provide more data with the CBody::read_func() call?

    It's great that you've got this far. Keep trying!

    Sorcery

  14. #14
    Registered User
    Join Date
    Nov 2007
    Posts
    6

    Re: MMF Controller plugin

    Hi

    I have problems with this still
    But not able to figure out the root cause, because I dont have a debugging setup still.

    I'm able to debug single .exe with VC++.
    But not able to debug .dll and .exe together.

    I created a new workspace and imported 2 projects[.dll project and .exe project].

    I tried this :
    abld makefile vs6

    This works fine.

    When I try to build with VC++, I get the following error.

    \Symbian\UIQ3.1SDK\epoc32\tools\MAKE.exe: *** No rule to make target `\Symbian\UIQ3.1SDK\EPOC32\RELEASE\WINSCW\UREL\EEXE.LIB', needed by `\Symbian\UIQ3.1SDK\EPOC32\RELEASE\WINSCW\UREL\MyAudioPlay.exe'. Stop.
    Error executing c:\windows\system32\cmd.exe.

    I tried most of the options provided in the open discussion forums.
    Any idea how to resolve this?

    Thanks
    Bhavana

  15. #15
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMF Controller plugin

    I'm afraid I can't help with MS VC++. I haven't used that for Symbian work for many years. I'm currently using Carbide.c++ and (on the emulator at least) find it quite easy to debug my dlls.

    Before that I used codewarrior, which was also OK.

    However, I did notice that there could be a problem with your configuration:
    Code:
    \Symbian\UIQ3.1SDK\EPOC32\RELEASE\WINSCW\UREL\EEXE.LIB
    Shouldn't that be UDEB?

    Sorcery

Posting Permissions

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