2012-12-05 09:51:41 +00:00
|
|
|
/*
|
2013-04-16 11:23:41 +00:00
|
|
|
* gstvaapiparser_frame.h - VA parser frame
|
2012-12-05 09:51:41 +00:00
|
|
|
*
|
2013-01-29 13:14:45 +00:00
|
|
|
* Copyright (C) 2012-2013 Intel Corporation
|
2013-11-22 04:57:18 +00:00
|
|
|
* Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
2012-12-05 09:51:41 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2.1
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free
|
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2013-04-16 11:23:41 +00:00
|
|
|
#ifndef GST_VAAPI_PARSER_FRAME_H
|
|
|
|
#define GST_VAAPI_PARSER_FRAME_H
|
2012-12-05 09:51:41 +00:00
|
|
|
|
|
|
|
#include <gst/vaapi/gstvaapiminiobject.h>
|
|
|
|
#include <gst/vaapi/gstvaapidecoder_unit.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2013-04-16 11:23:41 +00:00
|
|
|
typedef struct _GstVaapiParserFrame GstVaapiParserFrame;
|
2012-12-05 09:51:41 +00:00
|
|
|
|
2013-04-16 11:23:41 +00:00
|
|
|
#define GST_VAAPI_PARSER_FRAME(frame) \
|
|
|
|
((GstVaapiParserFrame *)(frame))
|
2012-12-05 09:51:41 +00:00
|
|
|
|
2013-04-16 11:23:41 +00:00
|
|
|
#define GST_VAAPI_IS_PARSER_FRAME(frame) \
|
|
|
|
(GST_VAAPI_PARSER_FRAME(frame) != NULL)
|
2012-12-05 09:51:41 +00:00
|
|
|
|
|
|
|
/**
|
2013-04-16 11:23:41 +00:00
|
|
|
* GstVaapiParserFrame:
|
2012-12-05 09:51:41 +00:00
|
|
|
* @output_offset: current offset to the reconstructed #GstBuffer for
|
|
|
|
* this #GstVideoCodecFrame. This is used to initialize the decoder
|
|
|
|
* unit offset
|
2012-12-27 17:52:43 +00:00
|
|
|
* @units: list of #GstVaapiDecoderUnit objects (slice data)
|
|
|
|
* @pre_units: list of units to decode before GstVaapiDecoder:start_frame()
|
|
|
|
* @post_units: list of units to decode after GstVaapiDecoder:end_frame()
|
2012-12-05 09:51:41 +00:00
|
|
|
*
|
|
|
|
* An extension to #GstVideoCodecFrame with #GstVaapiDecoder specific
|
|
|
|
* information. Decoder frames are usually attached to codec frames as
|
|
|
|
* the user_data anchor point.
|
|
|
|
*/
|
2013-04-16 11:23:41 +00:00
|
|
|
struct _GstVaapiParserFrame {
|
2012-12-05 09:51:41 +00:00
|
|
|
/*< private >*/
|
2013-04-16 11:23:41 +00:00
|
|
|
GstVaapiMiniObject parent_instance;
|
2012-12-05 09:51:41 +00:00
|
|
|
|
2013-04-16 11:23:41 +00:00
|
|
|
guint output_offset;
|
|
|
|
GArray *units;
|
|
|
|
GArray *pre_units;
|
|
|
|
GArray *post_units;
|
2012-12-05 09:51:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
2013-04-16 11:23:41 +00:00
|
|
|
GstVaapiParserFrame *
|
|
|
|
gst_vaapi_parser_frame_new(guint width, guint height);
|
2012-12-05 09:51:41 +00:00
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
void
|
2013-04-16 11:23:41 +00:00
|
|
|
gst_vaapi_parser_frame_free(GstVaapiParserFrame *frame);
|
2012-12-05 09:51:41 +00:00
|
|
|
|
2013-01-07 12:41:59 +00:00
|
|
|
G_GNUC_INTERNAL
|
|
|
|
void
|
2013-04-16 11:23:41 +00:00
|
|
|
gst_vaapi_parser_frame_append_unit(GstVaapiParserFrame *frame,
|
2013-01-07 12:41:59 +00:00
|
|
|
GstVaapiDecoderUnit *unit);
|
|
|
|
|
2013-04-16 11:23:41 +00:00
|
|
|
#define gst_vaapi_parser_frame_ref(frame) \
|
2012-12-05 09:51:41 +00:00
|
|
|
gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(frame))
|
|
|
|
|
2013-04-16 11:23:41 +00:00
|
|
|
#define gst_vaapi_parser_frame_unref(frame) \
|
2012-12-05 09:51:41 +00:00
|
|
|
gst_vaapi_mini_object_unref(GST_VAAPI_MINI_OBJECT(frame))
|
|
|
|
|
2013-04-16 11:23:41 +00:00
|
|
|
#define gst_vaapi_parser_frame_replace(old_frame_p, new_frame) \
|
2012-12-05 09:51:41 +00:00
|
|
|
gst_vaapi_mini_object_replace((GstVaapiMiniObject **)(old_frame_p), \
|
|
|
|
(GstVaapiMiniObject *)(new_frame))
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2013-04-16 11:23:41 +00:00
|
|
|
#endif /* GST_VAAPI_PARSER_FRAME_H */
|