[Bug 719684] videodecoder: Allocation query is always at least sent twice

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Dec 2 14:18:58 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=719684
  GStreamer | gst-plugins-base | git

--- Comment #5 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2013-12-02 22:18:54 UTC ---
(In reply to comment #4)
> I think if the  downstream element sends a reconfigure event, the call to
> "klass->negotiate (decoder)" from "gst_video_decoder_negotiate" will be done
> automatically when the decoder calls any of the following functions:
> 
> gst_video_decoder_allocate_output_buffer
> gst_video_decoder_allocate_output_frame
> gst_video_decoder_finish_frame

Yes, it will be called in these cases. But also subclasses often call it from
e.g. GstVideoDecoder::set_format() to let negotiation happen ASAP.

> But in case this is not valid, here are what you asked:
> 
>   if (klass->negotiate)
>     ret = klass->negotiate (decoder);
> 
>   /* clear GST_PAD_FLAG_NEED_RECONFIGURE if negotiation succeeded */
>   if (ret)
>     gst_pad_check_reconfigure (decoder->srcpad);
> 
> Is it what you thought ?

Well, it's racy :) But in principle yes. I think to make it not racy you'll
have to call check_reconfigure() first to unmark it in any case... and if
negotiate() fails you mark it for reconfiguration again. (or probably just mark
it always for reconfiguration if it fails... if it fails things have to be
retried ASAP or fail completely).

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list