×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    190

    Exclamation Playing real audio file in Real Player

    I know three ways to play the real audio file, but unfortunately there is only one way using which I can play the file.

    Method 1: (Working)
    Code:
    	HBufC* param = HBufC::NewLC( 250 );
    	param->Des().Format( _L( "4 %S" ),&aUrl );
    
    	// Wap Browser's constants UId
    	const TInt KWmlBrowserUid = 0x10008D39; 
    	TUid id( TUid::Uid( KWmlBrowserUid ) );
    
    	TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
    	TApaTask task = taskList.FindApp( id );
    	if ( task.Exists() )
    	{
    		 HBufC8* param8 = HBufC8::NewLC( param->Length() );
    		 param8->Des().Append( *param );
    		 task.SendMessage( TUid::Uid( 0 ), *param8 ); // Uid is not used
    		 CleanupStack::PopAndDestroy(); // param8
    	}
    	else
    	{
    		 RApaLsSession appArcSession;
    		 User::LeaveIfError(appArcSession.Connect()); // connect to AppArc server
    		 TThreadId id;
    		 appArcSession.StartDocument( *param, TUid::Uid( KWmlBrowserUid ), id );
    		 appArcSession.Close();
    	}
    
    	CleanupStack::PopAndDestroy(); // param
    Method 2: (Not Working)
    Code:
    	HBufC* param = HBufC::NewLC( 250 );
    	param->Des().Format( _L( "4 %S" ),&aUrl );
    
    	// Real Player's constants UId
    	const TInt KWmlBrowserUid = 0x10005A3E;
    	TUid id( TUid::Uid( KWmlBrowserUid ) );
    
    	TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
    	TApaTask task = taskList.FindApp( id );
    	if ( task.Exists() )
    	{
    		 HBufC8* param8 = HBufC8::NewLC( param->Length() );
    		 param8->Des().Append( *param );
    		 task.SendMessage( TUid::Uid( 0 ), *param8 ); // Uid is not used
    		 CleanupStack::PopAndDestroy(); // param8
    	}
    	else
    	{
    		 RApaLsSession appArcSession;
    		 User::LeaveIfError(appArcSession.Connect()); // connect to AppArc server
    		 TThreadId id;
    		 appArcSession.StartDocument( *param, TUid::Uid( KWmlBrowserUid ), id );
    		 appArcSession.Close();
    	}
    
    	CleanupStack::PopAndDestroy(); // param
    Method 3: (Not Working)
    Code:
    	HBufC* param = HBufC::NewLC( 250 );
    	param->Des().Format( _L( "4 %S" ),&aUrl );
    
    	CDocumentHandler *iDocHandler = CDocumentHandler::NewL( CEikonEnv::Static()->Process() );
    	CleanupStack::PushL(iDocHandler);
    
    	TDataType data = TDataType(KNullUid);
    	iDocHandler->OpenFileEmbeddedL(aUrl, data);
    
    	CleanupStack::PopAndDestroy();

    In all the above code examples, aUrl is the URL for the real audio file.

    Method 1 is working fine but the problem is that it first open the browser and then a blank page and then the real player. Now when user want to exit the Real Player, they have to first close the real player then the blank page and finally the browser window.

    Is there any method using which I can directly play the file from Real Player?

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

    Re: Playing real audio file in Real Player

    1 & 2 are launching browser, so maybe you could try it with Real player's UID.

    with 3 you might want to specify the Data type, then it propably should work.

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    190

    Exclamation Re: Playing real audio file in Real Player

    Quote Originally Posted by symbianyucca View Post
    1 & 2 are launching browser, so maybe you could try it with Real player's UID.

    with 3 you might want to specify the Data type, then it propably should work.
    Dear Yucca, In method 2 I am already using Real Player's UID but its not working.

    Can you please explain a bit on how to specify the Data type in method 3 ?

    Code:
    	// Real Player's constants UId
    	const TInt KWmlBrowserUid = 0x10005A3E;
    	TUid id( TUid::Uid( KWmlBrowserUid ) );
    Last edited by say2paul; 2008-11-28 at 15:37.

  4. #4
    Registered User
    Join Date
    Jul 2005
    Posts
    190

    Re: Playing real audio file in Real Player

    Quote Originally Posted by symbianyucca View Post
    1 & 2 are launching browser, so maybe you could try it with Real player's UID.

    with 3 you might want to specify the Data type, then it propably should work.
    Dear Yucca, In method 2 I am already using Real Player's UID but its not working.

    Can you please explain a bit on how to specify the Data type in method 3 ?

    Code:
    	// Real Player's constants UId
    	const TInt KWmlBrowserUid = 0x10005A3E;
    	TUid id( TUid::Uid( KWmlBrowserUid ) );

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    8

    Re: Playing real audio file in Real Player

    I am looking for the solution to this problem as well, although the video file is a live stream in rtsp.

    With method 3, you can have a look at this thread http://discussion.forum.nokia.com/fo...ad.php?t=62197
    Although it's four years ago, but probably means that doucmenthandler couldn't do the job.

    I hoping to find some other examples of using Method 2 but to no avail. It seems like this easiest way to do it. The official example of calling external application can be found here:
    http://www.forum.nokia.com/info/sw.n...ion_Views.html

    The only thing is missing i suspect is that whether we can pass the url of the file (or in my case, the rtsp link) as a message to the realplayer task and if so in what format. For the browser case, the digit "4" is appended before the url for some unknown reasons. No document has been found so far on this.

    Anyway, the only probably way, or the harder way, is to use the CVideoPlayerUtility class. Good starting point can be found in this thread
    http://discussion.forum.nokia.com/fo...ad.php?t=99812

    Can some experts form Nokia give us more direction on some possible examples on how to call realplayer as an external apps with a given url like method 2?

Similar Threads

  1. Problem with pyobfuscate
    By JOM in forum Symbian
    Replies: 3
    Last Post: 2008-06-20, 22:47
  2. Playing .mms file in Nokia Multiamedia player
    By gskush in forum General Messaging
    Replies: 1
    Last Post: 2006-07-01, 06:26
  3. Replies: 1
    Last Post: 2005-05-26, 14:22
  4. getting Real file with Java (file i/o)
    By ivanxqz in forum Mobile Java General
    Replies: 0
    Last Post: 2004-04-11, 18:59
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

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