mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
video: Add methods to return a list of all pending GstVideoCodecFrames
This commit is contained in:
parent
d1dc65d6ee
commit
bdc056c12d
4 changed files with 48 additions and 2 deletions
|
@ -2646,6 +2646,27 @@ gst_video_decoder_get_frame (GstVideoDecoder * decoder, int frame_number)
|
|||
return frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_video_decoder_get_frames:
|
||||
* @decoder: a #GstVideoDecoder
|
||||
*
|
||||
* Get all pending unfinished #GstVideoCodecFrame
|
||||
*
|
||||
* Returns: (transfer full) (element-type GstVideoCodecFrame): pending unfinished #GstVideoCodecFrame.
|
||||
*/
|
||||
GList *
|
||||
gst_video_decoder_get_frames (GstVideoDecoder * decoder)
|
||||
{
|
||||
GList *frames;
|
||||
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
|
||||
frames = g_list_copy (decoder->priv->frames);
|
||||
g_list_foreach (frames, (GFunc) gst_video_codec_frame_ref, NULL);
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
|
||||
return frames;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_video_decoder_decide_allocation_default (GstVideoDecoder * decoder,
|
||||
GstQuery * query)
|
||||
|
|
|
@ -316,11 +316,13 @@ GstBufferPool *gst_video_decoder_get_buffer_pool (GstVideoDecoder *decoder);
|
|||
|
||||
/* Object methods */
|
||||
|
||||
GstVideoCodecFrame *gst_video_decoder_get_frame (GstVideoDecoder *decoder,
|
||||
int frame_number);
|
||||
GstVideoCodecFrame *gst_video_decoder_get_frame (GstVideoDecoder *decoder,
|
||||
int frame_number);
|
||||
|
||||
GstVideoCodecFrame *gst_video_decoder_get_oldest_frame (GstVideoDecoder *decoder);
|
||||
|
||||
GList * gst_video_decoder_get_frames (GstVideoDecoder *decoder);
|
||||
|
||||
/* Parsing related methods */
|
||||
void gst_video_decoder_add_to_frame (GstVideoDecoder *decoder,
|
||||
int n_bytes);
|
||||
|
|
|
@ -2006,6 +2006,27 @@ gst_video_encoder_get_frame (GstVideoEncoder * encoder, int frame_number)
|
|||
return frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_video_encoder_get_frames:
|
||||
* @encoder: a #GstVideoEncoder
|
||||
*
|
||||
* Get all pending unfinished #GstVideoCodecFrame
|
||||
*
|
||||
* Returns: (transfer full) (element-type GstVideoCodecFrame): pending unfinished #GstVideoCodecFrame.
|
||||
*/
|
||||
GList *
|
||||
gst_video_encoder_get_frames (GstVideoEncoder * encoder)
|
||||
{
|
||||
GList *frames;
|
||||
|
||||
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
|
||||
frames = g_list_copy (encoder->priv->frames);
|
||||
g_list_foreach (frames, (GFunc) gst_video_codec_frame_ref, NULL);
|
||||
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
||||
|
||||
return frames;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_video_encoder_merge_tags:
|
||||
* @encoder: a #GstVideoEncoder
|
||||
|
|
|
@ -268,6 +268,8 @@ GstVideoCodecFrame* gst_video_encoder_get_frame (GstVideoEncoder *encode
|
|||
int frame_number);
|
||||
GstVideoCodecFrame* gst_video_encoder_get_oldest_frame (GstVideoEncoder *encoder);
|
||||
|
||||
GList * gst_video_encoder_get_frames (GstVideoEncoder *encoder);
|
||||
|
||||
GstBuffer * gst_video_encoder_allocate_output_buffer (GstVideoEncoder * encoder,
|
||||
gsize size);
|
||||
|
||||
|
|
Loading…
Reference in a new issue