Video decoder set_format callback

Tim Müller tim at centricular.com
Tue Mar 1 15:33:32 UTC 2016


On Tue, 2016-03-01 at 15:45 +0100, Miloš Selečéni wrote:

Hi Miloš,

> Hi, I'm writing custom plugin for JPEG2000 enc/dec. There is a
> set_format callback in gstvideodecoder class which should by called
> at the beginning of data processing ... In my case the set_format
> callback is called when the jpeg2000 files are wrapped(muxed) in mj2
> container or any other container, but it is not called when jpeg2000
> files are not wrapped e.g. loaded as common files using multifilesrc 
> 
> 1. case set_format is called 
> gst-launch filesrc location=video.mj2 ! qtdemux ! my_jpeg2000_dec !
> videoconvert ! autovideosink
> 
> 2. case set_format is not called 
> gst-launch multifilesrc location=video_%d.j2k ! my_jpeg2000_dec !
> videoconvert ! autovideosink
> 
> The only difference is that files are treated as set of j2k files
> instead of one mj2 file. So my question is why set_format is not
> called in second case ?

The set_format() callback is called when a CAPS event comes in.

In case of multifilesrc nothing sends a CAPS event.

You could try adding a typefind element between multifilesrc and your
decoder, or set the caps property on multifilesrc.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com




More information about the gstreamer-devel mailing list