Help with custom plugin Caps Negotiation

Subodh Chiwate subodh.austin at gmail.com
Mon May 19 04:48:47 PDT 2014


Adding a sync=false to image sink got the pipeline working but even though
caps are correct the frame rate is getting ignored
following is the debug trace post typefind. Any suggestions regarding the
root of cause of such behavior.

Redistribute latency...
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps =
video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)24/1
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)24/1
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps =
video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)24/1
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)24/1
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock



On Mon, May 19, 2014 at 4:45 PM, Subodh Chiwate <subodh.austin at gmail.com>wrote:

> Hi Bruce,
> Thanks for the inputs. Was able to get past the caps negotiation by
> referring to the pull mode caps negotiation  of gstbasesrc.c.
> Due to multiple reference documents I jumbled up code and made rookie
> mistakes.
>
> Now I am facing some synchronization issues as my initial plugin is not
> using any locks at all.
> Will refer to the gstfilesrc.c and try to rewrite plugin by inheriting the
> basesrc and then overriding the task function if that is possible.
> Thanks.
>
>
>
> On Sat, May 17, 2014 at 8:21 PM, Bruce Tsai <wagamama.tsai at gmail.com>wrote:
>
>> Hi Subodh,
>>
>> You point out that the issue is between your plugin “myplugin” and
>> element “typefind”, right? So I guess the caps of src-pad of “myplugin” is
>> not recognised while doing caps negotiation. I will go through your FIVE
>> FIXMEs.
>>
>> I think the query function of sink-pad is not related to this issue in
>> your first FIXME. Second, I never use any proxy-caps in my filter and I
>> would suggest you try not set proxy-caps before identifying the root cause.
>> I rarely find any further information about proxy-caps and I am not
>> familiar with that. The third FIXME is in query function of sink-pad that
>> is not related to caps negotiation of src-pad.
>>
>> The most weird things are last two FIXME parts. I do not specifically
>> deal with “GST_QUERY_CAPS” in query function of src-pad but let
>> “gst_pad_query_default” do it for me. And I use “gst_pad_set_caps” to set
>> caps of src-pad so “gst_pad_query_default” knows the cap information.
>> However, your “get_pad_set_caps” for src-pad is invoked in event functions
>> of sink-pad and src-pad. Set twice, why? Maybe you need to check if
>> “get_pad_set_caps” is called before “GST_QUERY_CAPS” arriving your src-pad.
>>
>>
>> --
>> Bruce Tsai
>> wagamama.tsai at gmail.com
>>
>>
>>
>>
>> On May 16, 2014, at 12:27 PM, Subodh <subodh.austin at gmail.com> wrote:
>>
>> Thanks for guidance Sebastian.
>> I have attached a sample code I had written following source of Qtdemux,
>> but
>> while testing the caps negotiation with typefind element failed.
>> I was unable to isolate issue with debug logs, hence posted on list hoping
>> someone could just browse through my code and highlight any obvious
>> issues.
>>
>> As suggested, will continue referring to existing plugins.
>>
>> --
>> Regards,
>> Subodh
>>
>>
>>
>> --
>> View this message in context:
>> http://gstreamer-devel.966125.n4.nabble.com/Help-with-custom-plugin-Caps-Negotiation-tp4666966p4666989.html
>> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>
>
> --
> Regards
> Subodh
>



-- 
Regards
Subodh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140519/a7d46018/attachment-0001.html>


More information about the gstreamer-devel mailing list