RTMP seek / pause, DVDPlayer and DVDInputStream help wanted
#1
Hi there,

I'm just embarking on my first piece of c++ and xbmc coding and could do with some help.

I'm trying to add RTMP seek and pause functionality as described over here.

I think I'm pretty much there with getting the basics of the seek working but could do with some help enhancing it and getting the pause working. If anybody can help or wants to take a look I've got my code and patches I can send through.

What I've done so far:

The RTMP player now seeks to the correct point - whilst it is buffering the new point in the stream it will continue to play. The switch over happens after a lag. (This is due to not setting flushing stream buffers completely, more below).

What I want to achieve:

1. Buffer correctly when seeking:

I'd like make the following happen: When you seek the player stops playing and stops requesting packets. We then start buffering the stream at the selected seek point and switch to playing that stream when the buffering is complete.

This looks like it should happen automatically if we set the flush parameter of CDVDMsgPlayerSeek to true - however doing this causes a video playback problem I haven't been able to get to the bottom of. Audio is fine, video gets jumbled. Error I get is:

Code:
CDVDVideoCodecFFmpeg::Decode - avcodec_decode_video returned failure
CDVDPlayerVideo - video decoder returned error
ffmpeg[9C]: [vp6f] pic->data[0]!=NULL in avcodec_default_get_buffer
ffmpeg[9C]: [vp6f] get_buffer() failed

2. Allow multiple seek steps to used.

By this I mean you can press up on your remote 4 times and we will seek 40 minutes forward (i.e. 4 big steps).

In order to do this we need to keep track of previous requests that have been made. Can I (and should I) keep track of this in a private class member? I'm a tad wary as this is in DVDPlayer.seek,

3. Pause and play

I think this is a noob c++ casting question, sorry. For RTMP streams we need to pass the current play time to pause and a second parameter to tell it if it pausing or resuming. So in CDVDPlayer:Tongueause() I want to do something like
Code:
((CDVDInputStreamRTMP*)m_pInput)->Pause(GetTime, true);
I can't get this working though (as CDVDInputStreamRTMP does not have a constructor with.

Apologies for the essay!
Reply
#2
I believe the pause functionality is working on the latest build off svn.

Does it start caching after you set seek point ? Do you see cache progress bar ? How fast is your internet connection and are you using low quality stream for testing ?

Can you post unified diff of the changes you did so far so I can try it myself ?
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply
#3
Patch on trac for review would be more than welcomed:
http://wiki.xbmc.org/?title=HOW-TO_submit_a_patch
http://trac.xbmc.org (login with forum account and create a new ticket)

Big Grin
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
It's not in a ready state for deployment but seeing as you asked Smile

patch added to trac ticket: http://trac.xbmc.org/ticket/6874

It's functional but ugly.

I've got some time this weekend to have a look at improving it.

mot2dk - if you see this can you drop me a line to let me know if you want to pick this up ?
Reply

Logout Mark Read Team Forum Stats Members Help
RTMP seek / pause, DVDPlayer and DVDInputStream help wanted0