vaapidecode_props: h264: set low-latency in decoder

Set the low-latency property if the H264 decoder is already
instantiated, thus you could change the behavior in run-time.

https://bugzilla.gnome.org/show_bug.cgi?id=783588
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-07-10 19:27:57 +02:00
parent 551ae940a7
commit 11f461fb10

View file

@ -22,6 +22,9 @@
*/
#include "gstvaapidecode_props.h"
#include "gstvaapidecode.h"
#include <gst/vaapi/gstvaapidecoder_h264.h>
enum
{
@ -53,12 +56,16 @@ gst_vaapi_decode_h264_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstVaapiDecodeH264Private *priv;
GstVaapiDecoderH264 *decoder;
priv = gst_vaapi_decode_h264_get_instance_private (object);
switch (prop_id) {
case GST_VAAPI_DECODER_H264_PROP_FORCE_LOW_LATENCY:
priv->is_low_latency = g_value_get_boolean (value);
decoder = GST_VAAPI_DECODER_H264 (GST_VAAPIDECODE (object)->decoder);
if (decoder)
gst_vaapi_decoder_h264_set_low_latency (decoder, priv->is_low_latency);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);