×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    49

    launch mediaplayer under S60_5th_Edition_SDK_v1.0

    Hello,
    As describe bellow, The call to the mediaplayer with a wave file as an argument does not work. Some body has an idea?
    _LIT( KArg,"c:\\Data\\Sounds\\play.wav");
    _LIT( med,"mediaplayer.exe");
    processHandle.Create(med,KArg)

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: launch mediaplayer under S60_5th_Edition_SDK_v1.0

    What about trying RApaLsSession instead ?

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    49

    wave argument for media player in command line mode

    Hello,
    by an after (150000), I see realplayer run and finished by error. So the problem is a problem crossing the argument "play.wav.
    Do you know how?
    Thank you.

    My code:
    _LIT( KArg,"c:\\Data\\Sounds\\play.wav");
    _LIT( med,"mediaplayer.exe");

    Process server;
    CleanupClosePushL(server);
    User::LeaveIfError(server.Create(med,KArg));
    server.SetPriority(EPriorityBackground);
    server.Resume();
    console->Write(_L("juste avant le after!\n"));
    User::After(150000000);
    CleanupStack::PopAndDestroy

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,688

    Re: wave argument for media player in command line mode

    Should it work? Have you seen it somewhere, or just found out that you try this way?

  5. #5
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: launch mediaplayer under S60_5th_Edition_SDK_v1.0

    Check CDocumentHandler::OpenFileEmbeddedL() method to play file in player.

  6. #6
    Registered User
    Join Date
    May 2010
    Posts
    49

    Re: launch mediaplayer under S60_5th_Edition_SDK_v1.0

    hello,
    generally I try the code found it in the net.

    I change the way as:
    _LIT( KArg,"c:\\Data\\Sounds\\play.wav");

    CDocumentHandler *iDocHandler= CDocumentHandler::NewL((CEikProcess*)CEikonEnv::Static()->Process());;
    TDataType dataType(_L8("audio/wav"));
    TRAPD( ERR, iDocHandler->OpenFileEmbeddedL(KArg,dataType) );

    at all, No sound under emulator.

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,345

    Re: launch mediaplayer under S60_5th_Edition_SDK_v1.0

    Check this Wiki article: http://wiki.forum.nokia.com/index.ph...ocumentHandler

    And test it on real device.
    Nokia Developer Wiki Moderation team

  8. #8
    Registered User
    Join Date
    May 2010
    Posts
    49

    Re: launch mediaplayer under S60_5th_Edition_SDK_v1.0

    I go back. I've already managed to run mediaplayer by two ways:

    _LIT( KArg,"c:\\Data\\Sounds\\play.wav");
    _LIT( med,"mediaplayer.exe");

    1. First
    RProcess server;
    CleanupClosePushL(server);
    User::LeaveIfError(server.Create(med,KArg));
    server.SetPriority(EPriorityBackground);
    server.Resume();

    2. Second
    TInt err2 =User::LeaveIfError(processHandle.Create(med,KArg));
    if (err2 == KErrNone)
    {
    processHandle.Resume();
    processHandle.Close();
    }
    else console->Write(_L("erreur d execution de mediaplayer!\n"));

    I just had the problem of passing of a file argument (play.wav) in command line mode.

    In your opinion, it is impossible to do it or no documentation for this topic?...

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,688

    Re: launch mediaplayer under S60_5th_Edition_SDK_v1.0

    Actually you can freely check the source code, it is pretty probable that searching for mediaplayer.exe will directly bring you to its .mmp file, and the implementation should be near to it. http://developer.symbian.org, Source/Browse code, Search OSS code.
    Then you will see if it accepts command line arguments, and if any special things has to be applied (like the magic '4' was in the old 'Services' browser - e.g. it had to be invoked with "4 http://xy" for opening a page).

  10. #10
    Registered User
    Join Date
    May 2010
    Posts
    49

    Re: launch mediaplayer under S60_5th_Edition_SDK_v1.0

    thanks sir.

Similar Threads

  1. Errors occured when building raccoon on S60_5th_Edition_SDK_v1.0
    By chenpeiwen in forum Mobile Web Server
    Replies: 3
    Last Post: 2009-12-14, 16:05
  2. j2me mediaplayer does not play video with sound
    By HugoFerreira in forum Mobile Java General
    Replies: 3
    Last Post: 2009-09-25, 12:49
  3. Mediaplayer 6280 full screen
    By wvexelnokia in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-04-28, 04:39

Posting Permissions

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