Video decoder set_format callback

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Video decoder set_format callback

Miloš Selečéni
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 ?
--
Miloš Selečéni

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Video decoder set_format callback

Tim Müller
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


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel