×

Discussion Board

Results 1 to 5 of 5

Thread: Embedding

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    37

    Embedding

    I've made my video player application embeddable according to guidelines offered here: http://www.newlc.com/Launching-an-ap...on-a-file.html

    When I launch a video clip from the file manager, realplayer still starts first even though I've set the priority of my application as the highest. Realplayer then shows for approximately 0.5 seconds, after which my application starts playing the clip. Then realplayer crashes. Any ideas on how to block other players from starting up before my app?

    Ps. I am using 3rd edition and the instructions in that site are for 2nd, I think.

    Do I need to build a recognizer?
    Last edited by tsippa; 2006-11-17 at 08:22.

  2. #2
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Embedding

    Check http://discussion.forum.nokia.com/fo...ad.php?t=83972 for related discussions. It might help, otherwise, you'll need to post some relevant code and describe the problem more thoroughly.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    37

    Re: Embedding

    I've checked it, here's my code:
    Document:
    Code:
    CFileStore* CMyDocument::OpenFileL(TBool doOpen, const TDesC& filename, RFs& fs) 
    	{
     	CFileStore* result = CAknDocument::OpenFileL(doOpen, filename, fs);
     	CMyAppUi* appUi = (CMyAppUi*) iAvkonAppUi;
     	
    
     	if (appUi->IsRunningEmbedded ()) 
     		{
       		appUi->iLauncher = CMyLauncher::NewL();
       		appUi->iImportFileName = filename;
       		appUi->iLauncher->Start(0);
       		}
       		
     	return result;
    	}
    Launcher.h

    Code:
    class CMyLauncher : CActive
    	{
    	public:
       		static CMyLauncher* NewL();
       		~CMyLauncher();
       		void Start(TTimeIntervalMicroSeconds32 delay);
       		
     	private: 	
       		CMyLauncher();
       		void ConstructL();
       		void RunL();
       		void DoCancel();
       		TInt RunError (TInt error);
       		
     	private:
       		RTimer iTimer;
    	};
    Relevant code from Launcher.cpp
    Code:
    void CMyLauncher::RunL() 
    	{
     	CMyAppUi* appUi = (CMyAppUi*) iAvkonAppUi;
     	appUi->LaunchFile();
    	}
    Relevant code from AppUi:
    Code:
    void CMyAppUi::LaunchFile()
        {
        TBuf8<KMaxFileName> launchFileName;        	
        launchFileName.Copy(iImportFileName);
            	
        ActivateLocalViewL(iMyPlayerView->Id(), TUid::Uid(1), launchFileName);
        }
    
    inline TBool IsRunningEmbedded () { return iEikonEnv->StartedAsServerApp(); }
    Relevant code from reg_rss:
    Code:
    RESOURCE APP_REGISTRATION_INFO
      {
      app_file="myappfile";
      localisable_resource_file =  qtn_loc_resource_file_1;
      localisable_resource_id = R_LOCALISABLE_APP_INFO;
    
      embeddability=KAppEmbeddable;
      newfile=KAppDoesNotSupportNewFile;
      // MIME priorities
      datatype_list =
      	{
      	DATATYPE
      		{
      		priority = EDataTypePriorityHigh;
      		type     = "video/3gpp";
      		},
      		
      	DATATYPE
      		{
      		priority = EDataTypePriorityHigh;
      		type     = "video/mp4v-es";
      		}
      	};
      }
    Launcher (active object) waits until my program's event loop starts and then launches the file. I am not sure if I am supposed to build a recognizer. The problem is that RealPlayer starts playing the file when I open it, then it switches to my player. The realplayer thread stays active, but when I close the viewer after my app has played the video, that thread crashes.
    Last edited by tsippa; 2006-11-17 at 10:44.

  4. #4
    Registered User
    Join Date
    Oct 2006
    Posts
    37

    Re: Embedding

    Anyone? I'm hopelessly stuck with this problem.

  5. #5
    Registered User
    Join Date
    Oct 2006
    Posts
    37

    Re: Embedding

    One more attempt to bring this question to focus. Really? Doesn't anyone know anything about this? Any ideas, workarounds, suggestions and so on are more than welcome. Getting quite desperate.

Similar Threads

  1. Application embedding in 3rd edition
    By symbianyucca in forum Symbian
    Replies: 13
    Last Post: 2007-04-27, 04:55
  2. Embedding image in CRichText
    By kumarg123 in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-02-13, 08:20
  3. Embedding pictures in CEikRichTextEditor
    By profoundwhispers in forum Symbian
    Replies: 0
    Last Post: 2004-06-24, 08:11
  4. embedding
    By s60 in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-07-05, 08:00
  5. embedding pictures in text editor
    By s60 in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-06-24, 07:27

Posting Permissions

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