reduce usage of decoder resource issue

Wonchul Lee wonchul86.lee at lge.com
Thu Nov 13 02:15:21 PST 2014


Hello,

I implemented a feature for reducing usage of decoder in decodebin. (I talked about it at conference)
Decodebin waste decoder resources in multiple video/audio stream case, because all of multiple video/audio streams will be decoded and dropped at input-selector except active stream.

I made a plugin for it to help to decode only active stream by communicating with input-selector.
Inactive stream is not decoded and pushed to input-selector.
If I switch active stream, then switch the decoder, next stream will be decoded.
However a single undecoded buffer is always pass to sink element at that time, it was hanging at the input-selector’s sinkpad.

The problem is this undecoded buffer.
It should not be sent to sink element and it cause error, noise.

So, I think several way to handle it.
1. mark GST_BUFFER_FLAG_CORRUPTED flag on the undecoded buffer, then drop it at scrpad of input-selector or sink element.
2. implement new feature for dropping first buffer when switch current stream at input-selector.
3. turn off “sync-streams” property on input-selector (but it cause lots of data loss)
…

I tried first approach and it works well, but I am not sure it is good way to deal with this problem.
In addition, I did not find any proper flag or something, I just used corrupted buffer flags because nobody use it.
If you have any idea or advice, please let me know.

Wonchul Lee


More information about the gstreamer-devel mailing list