mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
9799875df4
Currently the src caps are set immediately after the sink caps are set, but in that moment the pipeline might not fully constructed and the video sink has not negotiated its supported caps and features. As a consequence, in many cases of playback, the least optimized caps feature is forced. This is partially the responsible of bug #744039. Also, vaapidecode doesn't attend the reconfigure events from downstream, which is a problem too, since the video sink can be changed with different caps features. This patch delays the src caps, setting them until the first frame arrives to the decoder, assuming until that very moment the whole pipeline is already negotiated. Particularly, it checks if the src pad needs to be reconfigured, as a consequence of a reconfiguration event from downstream. A key part of this patch is the new GstVaapiCapsFeature GST_VAAPI_CAPS_FEATURE_NOT_NEGOTIATED, which is returned when the src pad doesn't have a peer yet. Also, for a better report of the caps allowed through the src pad and its peer, this patch uses gst_pad_get_allowed_caps() instead of gst_pad_peer_query_caps() when looking for the preferred feature. v3: move the input_state unref to close(), since videodecoder resets at some events such as navigation. v4: a) the state_changed() callback replaces the input_state if the media changed, so this case is also handled. b) since the parameter ref_state in gst_vaapidecode_update_src_caps() is always the input_state, the parameter were removed. c) there were a lot of repeated code handling the input_state, so I refactored it with the function gst_vaapi_decode_input_state_replace(). https://bugzilla.gnome.org/show_bug.cgi?id=744618 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com> |
||
---|---|---|
.. | ||
gstvaapi.c | ||
gstvaapidecode.c | ||
gstvaapidecode.h | ||
gstvaapidownload.c | ||
gstvaapidownload.h | ||
gstvaapiencode.c | ||
gstvaapiencode.h | ||
gstvaapiencode_h264.c | ||
gstvaapiencode_h264.h | ||
gstvaapiencode_jpeg.c | ||
gstvaapiencode_jpeg.h | ||
gstvaapiencode_mpeg2.c | ||
gstvaapiencode_mpeg2.h | ||
gstvaapiencode_vp8.c | ||
gstvaapiencode_vp8.h | ||
gstvaapiparse.c | ||
gstvaapiparse.h | ||
gstvaapipluginbase.c | ||
gstvaapipluginbase.h | ||
gstvaapipluginutil.c | ||
gstvaapipluginutil.h | ||
gstvaapipostproc.c | ||
gstvaapipostproc.h | ||
gstvaapisink.c | ||
gstvaapisink.h | ||
gstvaapiupload.c | ||
gstvaapiupload.h | ||
gstvaapiuploader.c | ||
gstvaapiuploader.h | ||
gstvaapivideobuffer.c | ||
gstvaapivideobuffer.h | ||
gstvaapivideobufferpool.c | ||
gstvaapivideobufferpool.h | ||
gstvaapivideocontext.c | ||
gstvaapivideocontext.h | ||
gstvaapivideoconverter_glx.c | ||
gstvaapivideoconverter_glx.h | ||
gstvaapivideoconverter_x11.c | ||
gstvaapivideoconverter_x11.h | ||
gstvaapivideomemory.c | ||
gstvaapivideomemory.h | ||
gstvaapivideometa.c | ||
gstvaapivideometa.h | ||
gstvaapivideometa_texture.c | ||
gstvaapivideometa_texture.h | ||
Makefile.am |