gstvaapicontext.c \
gstvaapidecoder.c \
gstvaapidecoder_dpb.c \
- gstvaapidecoder_frame.c \
gstvaapidecoder_h264.c \
gstvaapidecoder_mpeg2.c \
gstvaapidecoder_mpeg4.c \
gstvaapiminiobject.c \
gstvaapiobject.c \
gstvaapiparamspecs.c \
+ gstvaapiparser_frame.c \
gstvaapiprofile.c \
gstvaapisubpicture.c \
gstvaapisurface.c \
gstvaapicompat.h \
gstvaapidebug.h \
gstvaapidecoder_dpb.h \
- gstvaapidecoder_frame.h \
gstvaapidecoder_objects.h \
gstvaapidecoder_priv.h \
gstvaapidecoder_unit.h \
gstvaapidisplay_priv.h \
gstvaapiminiobject.h \
gstvaapiobject_priv.h \
+ gstvaapiparser_frame.h \
gstvaapisurface_priv.h \
gstvaapisurfaceproxy_priv.h \
gstvaapiutils.h \
#include "gstvaapicompat.h"
#include "gstvaapidecoder.h"
#include "gstvaapidecoder_priv.h"
+#include "gstvaapiparser_frame.h"
#include "gstvaapisurfaceproxy_priv.h"
#include "gstvaapiutils.h"
#include "gstvaapi_priv.h"
{
GstVaapiDecoderPrivate * const priv = decoder->priv;
GstVaapiParserState * const ps = &priv->parser_state;
- GstVaapiDecoderFrame *frame;
+ GstVaapiParserFrame *frame;
GstVaapiDecoderUnit *unit;
GstVaapiDecoderStatus status;
frame = gst_video_codec_frame_get_user_data(base_frame);
if (!frame) {
GstVideoCodecState * const codec_state = priv->codec_state;
- frame = gst_vaapi_decoder_frame_new(codec_state->info.width,
+ frame = gst_vaapi_parser_frame_new(codec_state->info.width,
codec_state->info.height);
if (!frame)
return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED;
}
got_unit:
- gst_vaapi_decoder_frame_append_unit(frame, unit);
+ gst_vaapi_parser_frame_append_unit(frame, unit);
*got_unit_size_ptr = unit->size;
*got_frame_ptr = GST_VAAPI_DECODER_UNIT_IS_FRAME_END(unit);
return GST_VAAPI_DECODER_STATUS_SUCCESS;
}
static GstVaapiDecoderStatus
-do_decode_1(GstVaapiDecoder *decoder, GstVaapiDecoderFrame *frame)
+do_decode_1(GstVaapiDecoder *decoder, GstVaapiParserFrame *frame)
{
GstVaapiDecoderClass * const klass = GST_VAAPI_DECODER_GET_CLASS(decoder);
GstVaapiDecoderStatus status;
do_decode(GstVaapiDecoder *decoder, GstVideoCodecFrame *base_frame)
{
GstVaapiParserState * const ps = &decoder->priv->parser_state;
- GstVaapiDecoderFrame * const frame = base_frame->user_data;
+ GstVaapiParserFrame * const frame = base_frame->user_data;
GstVaapiDecoderStatus status;
ps->current_frame = base_frame;
- gst_vaapi_decoder_frame_ref(frame);
+ gst_vaapi_parser_frame_ref(frame);
status = do_decode_1(decoder, frame);
- gst_vaapi_decoder_frame_unref(frame);
+ gst_vaapi_parser_frame_unref(frame);
switch ((guint)status) {
case GST_VAAPI_DECODER_STATUS_DROP_FRAME:
#include <glib.h>
#include <gst/vaapi/gstvaapidecoder.h>
-#include <gst/vaapi/gstvaapidecoder_frame.h>
+#include <gst/vaapi/gstvaapidecoder_unit.h>
#include <gst/vaapi/gstvaapicontext.h>
G_BEGIN_DECLS
/*
- * gstvaapidecoder_frame.c - VA decoder frame
+ * gstvaapiparser_frame.c - VA parser frame
*
* Copyright (C) 2012-2013 Intel Corporation
*
*/
/**
- * SECTION:gstvaapidecoder_frame
+ * SECTION:gstvaapiparser_frame
* @short_description: VA decoder frame
*/
#include "sysdeps.h"
-#include "gstvaapidecoder_frame.h"
+#include "gstvaapiparser_frame.h"
static inline const GstVaapiMiniObjectClass *
-gst_vaapi_decoder_frame_class(void)
+gst_vaapi_parser_frame_class(void)
{
- static const GstVaapiMiniObjectClass GstVaapiDecoderFrameClass = {
- sizeof(GstVaapiDecoderFrame),
- (GDestroyNotify)gst_vaapi_decoder_frame_free
+ static const GstVaapiMiniObjectClass GstVaapiParserFrameClass = {
+ sizeof(GstVaapiParserFrame),
+ (GDestroyNotify)gst_vaapi_parser_frame_free
};
- return &GstVaapiDecoderFrameClass;
+ return &GstVaapiParserFrameClass;
}
static inline gboolean
}
/**
- * gst_vaapi_decoder_frame_new:
+ * gst_vaapi_parser_frame_new:
* @width: frame width in pixels
* @height: frame height in pixels
*
- * Creates a new #GstVaapiDecoderFrame object.
+ * Creates a new #GstVaapiParserFrame object.
*
- * Returns: The newly allocated #GstVaapiDecoderFrame
+ * Returns: The newly allocated #GstVaapiParserFrame
*/
-GstVaapiDecoderFrame *
-gst_vaapi_decoder_frame_new(guint width, guint height)
+GstVaapiParserFrame *
+gst_vaapi_parser_frame_new(guint width, guint height)
{
- GstVaapiDecoderFrame *frame;
+ GstVaapiParserFrame *frame;
guint num_slices;
- frame = (GstVaapiDecoderFrame *)
- gst_vaapi_mini_object_new(gst_vaapi_decoder_frame_class());
+ frame = (GstVaapiParserFrame *)
+ gst_vaapi_mini_object_new(gst_vaapi_parser_frame_class());
if (!frame)
return NULL;
return frame;
error:
- gst_vaapi_decoder_frame_unref(frame);
+ gst_vaapi_parser_frame_unref(frame);
return NULL;
}
/**
- * gst_vaapi_decoder_frame_free:
- * @frame: a #GstVaapiDecoderFrame
+ * gst_vaapi_parser_frame_free:
+ * @frame: a #GstVaapiParserFrame
*
* Deallocates any internal resources bound to the supplied decoder
* @frame.
* sub-classes.
*/
void
-gst_vaapi_decoder_frame_free(GstVaapiDecoderFrame *frame)
+gst_vaapi_parser_frame_free(GstVaapiParserFrame *frame)
{
free_units(&frame->units);
free_units(&frame->pre_units);
}
/**
- * gst_vaapi_decoder_frame_append_unit:
- * @frame: a #GstVaapiDecoderFrame
+ * gst_vaapi_parser_frame_append_unit:
+ * @frame: a #GstVaapiParserFrame
* @unit: a #GstVaapiDecoderUnit
*
* Appends unit to the @frame.
*/
void
-gst_vaapi_decoder_frame_append_unit(GstVaapiDecoderFrame *frame,
+gst_vaapi_parser_frame_append_unit(GstVaapiParserFrame *frame,
GstVaapiDecoderUnit *unit)
{
GArray **unit_array_ptr;
/*
- * gstvaapidecoder_frame.h - VA decoder frame
+ * gstvaapiparser_frame.h - VA parser frame
*
* Copyright (C) 2012-2013 Intel Corporation
*
* Boston, MA 02110-1301 USA
*/
-#ifndef GST_VAAPI_DECODER_FRAME_H
-#define GST_VAAPI_DECODER_FRAME_H
+#ifndef GST_VAAPI_PARSER_FRAME_H
+#define GST_VAAPI_PARSER_FRAME_H
#include <gst/vaapi/gstvaapiminiobject.h>
#include <gst/vaapi/gstvaapidecoder_unit.h>
G_BEGIN_DECLS
-typedef struct _GstVaapiDecoderFrame GstVaapiDecoderFrame;
+typedef struct _GstVaapiParserFrame GstVaapiParserFrame;
-#define GST_VAAPI_DECODER_FRAME(frame) \
- ((GstVaapiDecoderFrame *)(frame))
+#define GST_VAAPI_PARSER_FRAME(frame) \
+ ((GstVaapiParserFrame *)(frame))
-#define GST_VAAPI_IS_DECODER_FRAME(frame) \
- (GST_VAAPI_DECODER_FRAME(frame) != NULL)
+#define GST_VAAPI_IS_PARSER_FRAME(frame) \
+ (GST_VAAPI_PARSER_FRAME(frame) != NULL)
/**
- * GstVaapiDecoderFrameFlags:
- *
- * Flags for #GstVaapiDecoderFrame.
- */
-typedef enum {
- GST_VAAPI_DECODER_FRAME_FLAG_LAST = (1 << 0)
-} GstVaapiDecoderFrameFlags;
-
-#define GST_VAAPI_DECODER_FRAME_FLAGS GST_VAAPI_MINI_OBJECT_FLAGS
-#define GST_VAAPI_DECODER_FRAME_FLAG_IS_SET GST_VAAPI_MINI_OBJECT_FLAG_IS_SET
-#define GST_VAAPI_DECODER_FRAME_FLAG_SET GST_VAAPI_MINI_OBJECT_FLAG_SET
-#define GST_VAAPI_DECODER_FRAME_FLAG_UNSET GST_VAAPI_MINI_OBJECT_FLAG_UNSET
-
-/**
- * GstVaapiDecoderFrame:
+ * GstVaapiParserFrame:
* @output_offset: current offset to the reconstructed #GstBuffer for
* this #GstVideoCodecFrame. This is used to initialize the decoder
* unit offset
* information. Decoder frames are usually attached to codec frames as
* the user_data anchor point.
*/
-struct _GstVaapiDecoderFrame {
+struct _GstVaapiParserFrame {
/*< private >*/
- GstVaapiMiniObject parent_instance;
+ GstVaapiMiniObject parent_instance;
- guint output_offset;
- GArray *units;
- GArray *pre_units;
- GArray *post_units;
+ guint output_offset;
+ GArray *units;
+ GArray *pre_units;
+ GArray *post_units;
};
G_GNUC_INTERNAL
-GstVaapiDecoderFrame *
-gst_vaapi_decoder_frame_new(guint width, guint height);
+GstVaapiParserFrame *
+gst_vaapi_parser_frame_new(guint width, guint height);
G_GNUC_INTERNAL
void
-gst_vaapi_decoder_frame_free(GstVaapiDecoderFrame *frame);
+gst_vaapi_parser_frame_free(GstVaapiParserFrame *frame);
G_GNUC_INTERNAL
void
-gst_vaapi_decoder_frame_append_unit(GstVaapiDecoderFrame *frame,
+gst_vaapi_parser_frame_append_unit(GstVaapiParserFrame *frame,
GstVaapiDecoderUnit *unit);
-#define gst_vaapi_decoder_frame_ref(frame) \
+#define gst_vaapi_parser_frame_ref(frame) \
gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(frame))
-#define gst_vaapi_decoder_frame_unref(frame) \
+#define gst_vaapi_parser_frame_unref(frame) \
gst_vaapi_mini_object_unref(GST_VAAPI_MINI_OBJECT(frame))
-#define gst_vaapi_decoder_frame_replace(old_frame_p, new_frame) \
+#define gst_vaapi_parser_frame_replace(old_frame_p, new_frame) \
gst_vaapi_mini_object_replace((GstVaapiMiniObject **)(old_frame_p), \
(GstVaapiMiniObject *)(new_frame))
G_END_DECLS
-#endif /* GST_VAAPI_DECODER_FRAME_H */
+#endif /* GST_VAAPI_PARSER_FRAME_H */