Commit cc28cdbd authored by gb's avatar gb Committed by Gwenole Beauchesne

- Add PTS and framerate information.

- Simplify parsing with an AVCodeParserContext.
parent 29f1784d
This diff is collapsed.
......@@ -102,12 +102,26 @@ struct _GstVaapiDecoderClass {
/*< private >*/
GObjectClass parent_class;
GstVaapiDecoderStatus (*decode)(GstVaapiDecoder *decoder);
GstVaapiDecoderStatus (*decode)(GstVaapiDecoder *decoder, GstBuffer *buffer);
};
GType
gst_vaapi_decoder_get_type(void);
void
gst_vaapi_decoder_get_frame_rate(
GstVaapiDecoder *decoder,
guint *num,
guint *den
);
void
gst_vaapi_decoder_set_frame_rate(
GstVaapiDecoder *decoder,
guint num,
guint den
);
gboolean
gst_vaapi_decoder_put_buffer_data(
GstVaapiDecoder *decoder,
......
This diff is collapsed.
......@@ -63,16 +63,11 @@ G_BEGIN_DECLS
#define GST_VAAPI_DECODER_CODEC(decoder) \
GST_VAAPI_DECODER_CAST(decoder)->priv->codec
/**
* GST_VAAPI_DECODER_IS_EOS:
* @decoder: a #GstVaapiDecoder
*
* Macro that checks if the @decoder reached an End-Of-Stream.
* This is an internal macro that does not do any run-time type check.
*/
#undef GST_VAAPI_DECODER_IS_EOS
#define GST_VAAPI_DECODER_IS_EOS(decoder) \
GST_VAAPI_DECODER_CAST(decoder)->priv->is_eos
/* End-of-Stream buffer */
#define GST_BUFFER_FLAG_EOS (GST_BUFFER_FLAG_LAST + 0)
#define GST_BUFFER_IS_EOS(buffer) \
GST_BUFFER_FLAG_IS_SET(buffer, GST_BUFFER_FLAG_EOS)
#define GST_VAAPI_DECODER_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), \
......@@ -80,18 +75,17 @@ G_BEGIN_DECLS
GstVaapiDecoderPrivate))
struct _GstVaapiDecoderPrivate {
GstVaapiDisplay *display;
GstVaapiContext *context;
GstVaapiCodec codec;
GstAdapter *adapter;
GMutex *adapter_mutex;
GCond *adapter_cond;
GQueue surfaces;
GMutex *surfaces_mutex;
GCond *surfaces_cond;
GstVaapiDisplay *display;
GstVaapiContext *context;
GstVaapiCodec codec;
guint fps_n;
guint fps_d;
GstClockTime next_ts;
GAsyncQueue *buffers;
GAsyncQueue *surfaces;
GThread *decoder_thread;
GstVaapiDecoderStatus decoder_status;
guint decoder_thread_cancel : 1;
guint is_eos : 1;
};
gboolean
......@@ -103,26 +97,6 @@ gst_vaapi_decoder_ensure_context(
guint height
) attribute_hidden;
guint
gst_vaapi_decoder_copy(
GstVaapiDecoder *decoder,
guint offset,
guchar *buf,
guint buf_size
) attribute_hidden;
guint
gst_vaapi_decoder_read_avail(GstVaapiDecoder *decoder)
attribute_hidden;
guint
gst_vaapi_decoder_read(GstVaapiDecoder *decoder, guchar *buf, guint buf_size)
attribute_hidden;
void
gst_vaapi_decoder_flush(GstVaapiDecoder *decoder, guint buf_size)
attribute_hidden;
gboolean
gst_vaapi_decoder_push_surface(
GstVaapiDecoder *decoder,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment