mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
videodecoder: add getter for QoS proportion and earliest_time
Add a getter for the QoS proportion and earliest_time to help subclasses do better estimations based on the proportion. API: gst_video_decoder_get_qos_info() https://bugzilla.gnome.org/show_bug.cgi?id=687991
This commit is contained in:
parent
41d36b2584
commit
5f55ea1ef3
4 changed files with 34 additions and 0 deletions
|
@ -2253,6 +2253,7 @@ gst_video_decoder_get_max_decode_time
|
|||
gst_video_decoder_get_max_errors
|
||||
gst_video_decoder_get_oldest_frame
|
||||
gst_video_decoder_get_packetized
|
||||
gst_video_decoder_get_qos_info
|
||||
gst_video_decoder_have_frame
|
||||
gst_video_decoder_get_latency
|
||||
gst_video_decoder_set_latency
|
||||
|
|
|
@ -3158,6 +3158,34 @@ gst_video_decoder_get_max_decode_time (GstVideoDecoder *
|
|||
return deadline;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_video_decoder_get_qos_info:
|
||||
* @decoder: a #GstVideoDecoder
|
||||
* @proportion: (out) (allow-none): address of variable in which to store the
|
||||
* current QoS proportion, or %NULL
|
||||
* @earliest_time: (out) (allow-none): address of variable in which to store the
|
||||
* QoS earliest_time, or %NULL
|
||||
*
|
||||
* Returns: TRUE on success
|
||||
*
|
||||
* Since: 1.0.3
|
||||
*/
|
||||
gboolean
|
||||
gst_video_decoder_get_qos_info (GstVideoDecoder * decoder, gdouble * proportion,
|
||||
GstClockTime * earliest_time)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_VIDEO_DECODER (decoder), FALSE);
|
||||
|
||||
GST_OBJECT_LOCK (decoder);
|
||||
if (proportion != NULL)
|
||||
*proportion = decoder->priv->proportion;
|
||||
if (earliest_time != NULL)
|
||||
*earliest_time = decoder->priv->earliest_time;
|
||||
GST_OBJECT_UNLOCK (decoder);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstFlowReturn
|
||||
_gst_video_decoder_error (GstVideoDecoder * dec, gint weight,
|
||||
GQuark domain, gint code, gchar * txt, gchar * dbg, const gchar * file,
|
||||
|
|
|
@ -353,6 +353,10 @@ gboolean gst_video_decoder_negotiate (GstVideoDecoder * decode
|
|||
GstClockTimeDiff gst_video_decoder_get_max_decode_time (GstVideoDecoder *decoder,
|
||||
GstVideoCodecFrame *frame);
|
||||
|
||||
gboolean gst_video_decoder_get_qos_info (GstVideoDecoder * decoder,
|
||||
gdouble *proportion,
|
||||
GstClockTime *earliest_time);
|
||||
|
||||
GstFlowReturn gst_video_decoder_finish_frame (GstVideoDecoder *decoder,
|
||||
GstVideoCodecFrame *frame);
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ EXPORTS
|
|||
gst_video_decoder_get_oldest_frame
|
||||
gst_video_decoder_get_output_state
|
||||
gst_video_decoder_get_packetized
|
||||
gst_video_decoder_get_qos_info
|
||||
gst_video_decoder_get_type
|
||||
gst_video_decoder_have_frame
|
||||
gst_video_decoder_merge_tags
|
||||
|
|
Loading…
Reference in a new issue