mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
videodecoder: Return the proportion directly
This commit is contained in:
parent
6228872df7
commit
1990c45b60
2 changed files with 9 additions and 11 deletions
|
@ -3161,25 +3161,24 @@ gst_video_decoder_get_max_decode_time (GstVideoDecoder *
|
||||||
/**
|
/**
|
||||||
* gst_video_decoder_get_qos_proportion:
|
* gst_video_decoder_get_qos_proportion:
|
||||||
* @decoder: a #GstVideoDecoder
|
* @decoder: a #GstVideoDecoder
|
||||||
* @proportion: (out) (allow-none): address of variable in which to store the
|
|
||||||
* current QoS proportion, or %NULL
|
* current QoS proportion, or %NULL
|
||||||
*
|
*
|
||||||
* Returns: TRUE on success
|
* Returns: The current QoS proportion.
|
||||||
*
|
*
|
||||||
* Since: 1.0.3
|
* Since: 1.0.3
|
||||||
*/
|
*/
|
||||||
gboolean
|
gdouble
|
||||||
gst_video_decoder_get_qos_proportion (GstVideoDecoder * decoder,
|
gst_video_decoder_get_qos_proportion (GstVideoDecoder * decoder)
|
||||||
gdouble * proportion)
|
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_VIDEO_DECODER (decoder), FALSE);
|
gdouble proportion;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GST_IS_VIDEO_DECODER (decoder), 1.0);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (decoder);
|
GST_OBJECT_LOCK (decoder);
|
||||||
if (proportion != NULL)
|
proportion = decoder->priv->proportion;
|
||||||
*proportion = decoder->priv->proportion;
|
|
||||||
GST_OBJECT_UNLOCK (decoder);
|
GST_OBJECT_UNLOCK (decoder);
|
||||||
|
|
||||||
return TRUE;
|
return proportion;
|
||||||
}
|
}
|
||||||
|
|
||||||
GstFlowReturn
|
GstFlowReturn
|
||||||
|
|
|
@ -353,8 +353,7 @@ gboolean gst_video_decoder_negotiate (GstVideoDecoder * decode
|
||||||
GstClockTimeDiff gst_video_decoder_get_max_decode_time (GstVideoDecoder *decoder,
|
GstClockTimeDiff gst_video_decoder_get_max_decode_time (GstVideoDecoder *decoder,
|
||||||
GstVideoCodecFrame *frame);
|
GstVideoCodecFrame *frame);
|
||||||
|
|
||||||
gboolean gst_video_decoder_get_qos_proportion (GstVideoDecoder * decoder,
|
gdouble gst_video_decoder_get_qos_proportion (GstVideoDecoder * decoder);
|
||||||
gdouble * proportion);
|
|
||||||
|
|
||||||
GstFlowReturn gst_video_decoder_finish_frame (GstVideoDecoder *decoder,
|
GstFlowReturn gst_video_decoder_finish_frame (GstVideoDecoder *decoder,
|
||||||
GstVideoCodecFrame *frame);
|
GstVideoCodecFrame *frame);
|
||||||
|
|
Loading…
Reference in a new issue