video: don't expose internal gst_adapter_get_buffer() helper function

If it's really needed it should go into GstAdapter in core.
This commit is contained in:
Tim-Philipp Müller 2009-05-23 00:33:04 +01:00
parent 538c1cde31
commit 5fa9a8f4d0
5 changed files with 16 additions and 10 deletions

View file

@ -596,6 +596,13 @@ gst_base_video_decoder_reset (GstBaseVideoDecoder * base_video_decoder)
} }
} }
static GstBuffer *
gst_adapter_get_buffer (GstAdapter * adapter)
{
return gst_buffer_ref (GST_BUFFER (adapter->buflist->data));
}
static GstFlowReturn static GstFlowReturn
gst_base_video_decoder_chain (GstPad * pad, GstBuffer * buf) gst_base_video_decoder_chain (GstPad * pad, GstBuffer * buf)
{ {
@ -685,6 +692,7 @@ gst_base_video_decoder_chain (GstPad * pad, GstBuffer * buf)
} }
} }
/* FIXME: use gst_adapter_prev_timestamp() here instead? */
buffer = gst_adapter_get_buffer (base_video_decoder->input_adapter); buffer = gst_adapter_get_buffer (base_video_decoder->input_adapter);
base_video_decoder->buffer_timestamp = GST_BUFFER_TIMESTAMP (buffer); base_video_decoder->buffer_timestamp = GST_BUFFER_TIMESTAMP (buffer);

View file

@ -579,6 +579,13 @@ gst_base_video_parse_push_all (GstBaseVideoParse * base_video_parse,
return ret; return ret;
} }
static GstBuffer *
gst_adapter_get_buffer (GstAdapter * adapter)
{
return gst_buffer_ref (GST_BUFFER (adapter->buflist->data));
}
static GstFlowReturn static GstFlowReturn
gst_base_video_parse_chain (GstPad * pad, GstBuffer * buf) gst_base_video_parse_chain (GstPad * pad, GstBuffer * buf)
{ {
@ -631,6 +638,7 @@ gst_base_video_parse_chain (GstPad * pad, GstBuffer * buf)
} }
} }
/* FIXME: use gst_adapter_prev_timestamp() here instead? */
buffer = gst_adapter_get_buffer (base_video_parse->input_adapter); buffer = gst_adapter_get_buffer (base_video_parse->input_adapter);
gst_buffer_unref (buffer); gst_buffer_unref (buffer);

View file

@ -160,10 +160,3 @@ gst_video_state_get_timestamp (const GstVideoState * state, int frame_number)
state->fps_d * GST_SECOND, state->fps_n); state->fps_d * GST_SECOND, state->fps_n);
} }
} }
GstBuffer *
gst_adapter_get_buffer (GstAdapter * adapter)
{
return gst_buffer_ref (GST_BUFFER (adapter->buflist->data));
}

View file

@ -84,8 +84,6 @@ gboolean gst_base_video_state_from_caps (GstVideoState *state,
GstClockTime gst_video_state_get_timestamp (const GstVideoState *state, GstClockTime gst_video_state_get_timestamp (const GstVideoState *state,
int frame_number); int frame_number);
GstBuffer *gst_adapter_get_buffer (GstAdapter *adapter);
G_END_DECLS G_END_DECLS
#endif #endif

View file

@ -1,5 +1,4 @@
EXPORTS EXPORTS
gst_adapter_get_buffer
gst_base_video_codec_free_frame gst_base_video_codec_free_frame
gst_base_video_codec_get_type gst_base_video_codec_get_type
gst_base_video_codec_new_frame gst_base_video_codec_new_frame