mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
libs: decoder: h264: add getter/setter for low latency mode
https://bugzilla.gnome.org/show_bug.cgi?id=783588
This commit is contained in:
parent
f39b7e97ce
commit
28d1d048a6
2 changed files with 45 additions and 0 deletions
|
@ -528,6 +528,8 @@ struct _GstVaapiDecoderH264Private
|
||||||
guint has_context:1;
|
guint has_context:1;
|
||||||
guint progressive_sequence:1;
|
guint progressive_sequence:1;
|
||||||
guint top_field_first:1;
|
guint top_field_first:1;
|
||||||
|
|
||||||
|
gboolean force_low_latency;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4732,6 +4734,42 @@ gst_vaapi_decoder_h264_set_alignment (GstVaapiDecoderH264 * decoder,
|
||||||
decoder->priv.stream_alignment = alignment;
|
decoder->priv.stream_alignment = alignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_vaapi_decoder_h264_set_low_latency:
|
||||||
|
* @decoder: a #GstVaapiDecoderH264
|
||||||
|
* @force_low_latency: %TRUE if force low latency
|
||||||
|
*
|
||||||
|
* if @force_low_latency is %TRUE the decoded frames are pushed soon
|
||||||
|
* as possible, instead of to wait until decoded picture buffer (DPB)
|
||||||
|
* release them.
|
||||||
|
*
|
||||||
|
* This violate the H.264 specification but it is useful for some live
|
||||||
|
* sources.
|
||||||
|
**/
|
||||||
|
void
|
||||||
|
gst_vaapi_decoder_h264_set_low_latency (GstVaapiDecoderH264 * decoder,
|
||||||
|
gboolean force_low_latency)
|
||||||
|
{
|
||||||
|
g_return_if_fail (decoder != NULL);
|
||||||
|
|
||||||
|
decoder->priv.force_low_latency = force_low_latency;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_vaapi_decoder_h264_get_low_latency:
|
||||||
|
* @decoder: a #GstVaapiDecoderH264
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if the low latency mode is enabled; otherwise
|
||||||
|
* %FALSE.
|
||||||
|
**/
|
||||||
|
gboolean
|
||||||
|
gst_vaapi_decoder_h264_get_low_latency (GstVaapiDecoderH264 * decoder)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (decoder != NULL, FALSE);
|
||||||
|
|
||||||
|
return decoder->priv.force_low_latency;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_vaapi_decoder_h264_new:
|
* gst_vaapi_decoder_h264_new:
|
||||||
* @display: a #GstVaapiDisplay
|
* @display: a #GstVaapiDisplay
|
||||||
|
|
|
@ -55,6 +55,13 @@ void
|
||||||
gst_vaapi_decoder_h264_set_alignment(GstVaapiDecoderH264 *decoder,
|
gst_vaapi_decoder_h264_set_alignment(GstVaapiDecoderH264 *decoder,
|
||||||
GstVaapiStreamAlignH264 alignment);
|
GstVaapiStreamAlignH264 alignment);
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gst_vaapi_decoder_h264_get_low_latency(GstVaapiDecoderH264 * decoder);
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_vaapi_decoder_h264_set_low_latency(GstVaapiDecoderH264 * decoder,
|
||||||
|
gboolean force_low_latency);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* GST_VAAPI_DECODER_H264_H */
|
#endif /* GST_VAAPI_DECODER_H264_H */
|
||||||
|
|
Loading…
Reference in a new issue