2014-02-04, 18:55
Hi,
I've been happily using the DVBLink PVR-addon for quite a while now, but didn't quite like the way time-shifting is implemented (ever growing buffer based on a file). So I decided to try and create my own circular buffer mechanism.
I managed to build a basic circular buffer, and after starting XBMC, I am able to select a TV-channel, play it, pause it and even navigate forward and backward.
However, when I stop playing the channel and the reopen it (or reopen any other channel), it almost always fails to start. In the xbmc.log I see the following message:
Digging into the code, this exception seems to stem from the ffmpeg code, which is performing the 'avformat_find_stream_info' function.
Does anyone have any idea why I would be able to start playing my TV-channels on the first try, but then after stopping and restarting the demuxer won't succesfully start anymore?
The basic difference (at this point) between my timeshiftbuffer and the original one, is the fact that I'm buffering in memory (using a chunk of memory allocated with malloc/calloc) while the original timeshiftbuffer was based on concurrently writing to and reading from a file (so basically, I've replaced the file with a chunk of memory).
Any tips, hints, remarks are appreciated!
Ard
I've been happily using the DVBLink PVR-addon for quite a while now, but didn't quite like the way time-shifting is implemented (ever growing buffer based on a file). So I decided to try and create my own circular buffer mechanism.
I managed to build a basic circular buffer, and after starting XBMC, I am able to select a TV-channel, play it, pause it and even navigate forward and backward.
However, when I stop playing the channel and the reopen it (or reopen any other channel), it almost always fails to start. In the xbmc.log I see the following message:
Code:
22:11:59 T:210396 ERROR: CDVDPlayer::OpenDemuxStream - Exception thrown when opening demuxer
Digging into the code, this exception seems to stem from the ffmpeg code, which is performing the 'avformat_find_stream_info' function.
Does anyone have any idea why I would be able to start playing my TV-channels on the first try, but then after stopping and restarting the demuxer won't succesfully start anymore?
The basic difference (at this point) between my timeshiftbuffer and the original one, is the fact that I'm buffering in memory (using a chunk of memory allocated with malloc/calloc) while the original timeshiftbuffer was based on concurrently writing to and reading from a file (so basically, I've replaced the file with a chunk of memory).
Any tips, hints, remarks are appreciated!
Ard