Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User jaqraq's Avatar
    Join Date
    May 2010
    Posts
    49
    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 Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,671
    What about trying RApaLsSession instead ?

  3. #3
    Registered User jaqraq's Avatar
    Join Date
    May 2010
    Posts
    49
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Should it work? Have you seen it somewhere, or just found out that you try this way?

  5. #5
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    Check CDocumentHandler::OpenFileEmbeddedL() method to play file in player.

  6. #6
    Registered User jaqraq's Avatar
    Join Date
    May 2010
    Posts
    49
    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 kiran10182's Avatar
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,236
    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 jaqraq's Avatar
    Join Date
    May 2010
    Posts
    49
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    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 jaqraq's Avatar
    Join Date
    May 2010
    Posts
    49
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved