×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    London
    Posts
    16

    switching streams with cvideoplayerutility

    Hi,
    I am trying to switch rtsp streams that i am playing with the cvideoplayerutility class. To switch i am simply closing one stream witha call to close() and then opening another with openURLL(). But the first stream freezes when I attempt to open another. Any idea anybody.

    Conor

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    London
    Posts
    16
    i didn't really expect a reply here since no body ever really replies on this forum... only people asking questions...
    anyways enough winging

    streaming works although very flaky performance.

    to switch streams:
    stop the player, wait for the callback in the void MvpuoPlayComplete(TInt aError); and then open the new stream.
    the buffering takes for ages.
    anyone have any idea how reduce the buffering time of the cvideoplayerutility.

    Any tweak please some body

    Conor

  3. #3
    Regular Contributor
    Join Date
    Mar 2006
    Location
    Hyderabad
    Posts
    58

    Re: switching streams with cvideoplayerutility

    Hi,

    I am having the same problem, can you tell me how you solved the problem. I will appreciate any help.

    thanks much

  4. #4
    Registered User
    Join Date
    Nov 2006
    Posts
    16

    Re: switching streams with cvideoplayerutility

    I'm currently having severe problems with stream switching using the CVideoPlayerUtility on S60 ED3 (running both MR and FP1). When running a local video clip the following happens.

    API usage chain A:

    Play a video clip (works fine).
    Calls CVideoPlayerUtility::Close(). -- Immediate crash on MR emulator, Crash when trying to open the CVideoPlayerUtility again on FP1, malfunction without crash on target.

    API usage chain B:

    Play a video clib (works fine).
    Calls CVideoPlayerUtility::Stop()
    Calls CVideoPlayerUtility::Close() -- Immediate crash on MR emulator, Crash when trying to open the CVideoPlayerUtility again on FP1, malfunction without crash on target.

    API usage chain C (should be safe according to API documentation on the web):

    Play a video clib (works fine).
    Calls CVideoPlayerUtility::Stop()
    Wait for PlayComplete() before closing. -- PlayComplete is never called by the framework either on MR or FP1!

    This makes it completely impossible to change URI on a video utility as I see it... I really don't want to create a timer or similar in order to give the video some time to close down before opening another clip.. Has anyone solved it?
    Thanks //molst

  5. #5
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Bangalore, India
    Posts
    56

    Re: switching streams with cvideoplayerutility

    Did you tried it on target?Try out.I believe it will work fine on target.
    I have seen such an issue on emulator.
    I had used it, it was working.

    CVideoPlayerUtility::Stop();
    CVideoPlayerUtility::Close();

    Then try to using CVideoPlayerUtility::OpenUrlL()()

    Regards
    Arun

  6. #6
    Registered User
    Join Date
    Nov 2006
    Posts
    16

    Re: switching streams with cvideoplayerutility

    Thanks for the answer,
    I don't get crashes on the targets (N70, N73, 6120), but switching streams still does not work since I don't get the PlayComplete callback. If I do OpenUrlL and then Play without first getting the PlayComplete, nothing happens.
    Last edited by molst; 2007-10-19 at 08:40.

  7. #7
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Bangalore, India
    Posts
    56

    Re: switching streams with cvideoplayerutility

    Hi,

    If you call CVideoPlayerUtility::Stop() the call back which is mention here MVideoPlayerUtilityObserver::MvpuoPlayComplete() will not called. This callback is not called if playback is explicitly stopped by calling Stop. Please see the documentation for the call back.
    So don't wait for this.
    What you can do is to delete and then create a new player, if required based on implementation, Open the player, Prepare and play again.

    Regards
    Arun

  8. #8
    Registered User
    Join Date
    Nov 2006
    Posts
    16

    Re: switching streams with cvideoplayerutility

    So you think I should stop and then delete rather than stop, close and then delete? Thanks, I'll try that.

  9. #9
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Bangalore, India
    Posts
    56

    Re: switching streams with cvideoplayerutility

    Quote Originally Posted by molst View Post
    So you think I should stop and then delete rather than stop, close and then delete? Thanks, I'll try that.
    Hi,

    Not exactly I was suggesting you the way I had tried out. But of course it worked for me. Deletion of the player may be suggested if you want to create the player each time and this depends on your implementation and your requirement. But you can try the same.

    Regards
    Arun
    Arun N R Nair

  10. #10
    Registered User
    Join Date
    Nov 2006
    Posts
    16

    Re: switching streams with cvideoplayerutility

    Ok, I've tried what you suggested (running ED3 FP1 emulator). This is what I did and the results:

    Create
    Open(clip 1)
    Play
    ---- Video runs fine ----
    Delete (without close)
    Open(clip 2)
    ---- Crash (KERN EXEC 3) after a short while ----

    I get no acks (OpenComplete, PlayComplete) from the CVideoPlayerUtility after Open(clip 2). It just crashes... :-(



    Since I've done slight changes to the application, I also tested this usage of the MMF API again.

    Create
    Open(clip 1)
    Play
    ---- Video runs fine ----
    Close
    Delete
    Open(clip 2)
    Play
    ---- Crash after a short while ----



    Do you really start the second clip immediately after closing the first, or do you wait a while in between? I'm quite sure the last case works, but the first should work too!

  11. #11
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Bangalore, India
    Posts
    56

    Re: switching streams with cvideoplayerutility

    //in header
    CVideoPlayerUtility *iVideoPlayer;//player's instance

    //.cpp
    Play(...)
    {
    //delete player
    //create the player
    //openurl
    }


    Stop()
    {
    iVideoPlayer->Stop();
    iVideoPlayer->Close();
    //delete player
    }

    Try on device

    it take a few seconds to connect buffer and play
    Arun N R Nair

  12. #12
    Registered User
    Join Date
    Nov 2006
    Posts
    16

    Re: switching streams with cvideoplayerutility

    Aah Ok. Thanks. I think, however, that we need to open/close and play/stop separately if we can. If every play operation must be preceded by open, that would be experienced as very slow for the user, I think. But if it's the only way that works, then we might have to.... :-(

Posting Permissions

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