> Date: Fri, 23 Jul 2010 16:47:11 +0200
> From: emme@emmes-world.de
> To: xine-devel@lists.sourceforge.net
> Subject: [xine-devel] Need help with demuxer plugin
> Hi!
> I am implementing a xine demuxer plugin to play back MPEG video/audio
> received from a C++ application. Sending the data to xine works already,
> but when I start playback, I see only the keyframes (ca. 1-2 per second,
> the rest being dropped/discarded), and I have no audio .
> I see lots of these messages:
> video_out: throwing away image with pts 2852979 because it's too old
> (diff : 88598).
> It is no CPU issue, load is fairly low. The data is correct; if I dump
> the ES to separate files I can play them back later just fine. The data
> is coming in at a steady pace, so the demuxer should not be starving,
> either. I probably messed up the buffer decoder_flags or something like
> that.
> On each call to ..._send_chunk, I put() one Elementary Stream packet
> retrieved from a PES packet to the fifo, using the PES packet's PTS. If
> the frame has to be split among multiple buf_element_t, I set
> BUF_FLAG_FRAME_END only for the last part.
> I tried to do basically the same things as other demuxer plugins (eg
> demux_ts.c), but I am missing something.
> Thanks for any Hints!

This might not help but I was having similar problems with my SPU teletext decoder and HD streams.  Although the data was sparse and the thread wasn't CPU bound I was spending too much time in the demuxer which caused things to drop frames elsewhere.  I ended up threading it and having the main thread simply queue up the data whilst a secondary thread did the actual decoding based on the data in the queue.  It's a little messy with all the mutexes and conditions but it works.

Secondly if you're reading the data from a pipe and you're getting decoding errors (blocky/noisy looking output as opposed to simply dropped frames), try increasing the buffer sizes.  On my machine the default wasn't large enough to handle HD streams.


Looking for a hot date? View photos of singles in your area!