mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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:
parent
551ae940a7
commit
11f461fb10
1 changed files with 7 additions and 0 deletions
|
@ -22,6 +22,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gstvaapidecode_props.h"
|
#include "gstvaapidecode_props.h"
|
||||||
|
#include "gstvaapidecode.h"
|
||||||
|
|
||||||
|
#include <gst/vaapi/gstvaapidecoder_h264.h>
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -53,12 +56,16 @@ gst_vaapi_decode_h264_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstVaapiDecodeH264Private *priv;
|
GstVaapiDecodeH264Private *priv;
|
||||||
|
GstVaapiDecoderH264 *decoder;
|
||||||
|
|
||||||
priv = gst_vaapi_decode_h264_get_instance_private (object);
|
priv = gst_vaapi_decode_h264_get_instance_private (object);
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case GST_VAAPI_DECODER_H264_PROP_FORCE_LOW_LATENCY:
|
case GST_VAAPI_DECODER_H264_PROP_FORCE_LOW_LATENCY:
|
||||||
priv->is_low_latency = g_value_get_boolean (value);
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
|
Loading…
Reference in a new issue