| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#ifndef __GST_VP8_PICTURE_H__ |
| 21 |
#define __GST_VP8_PICTURE_H__ |
| 22 |
|
| 23 |
#include <gst/codecs/codecs-prelude.h> |
| 24 |
#include <gst/codecs/gstcodecpicture.h> |
| 25 |
#include <gst/codecparsers/gstvp8parser.h> |
| 26 |
#include <gst/video/video.h> |
| 27 |
|
| 28 |
G_BEGIN_DECLS |
| 29 |
|
| 30 |
#define GST_TYPE_VP8_PICTURE (gst_vp8_picture_get_type()) |
| 31 |
#define GST_IS_VP8_PICTURE(obj) (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_VP8_PICTURE)) |
| 32 |
#define GST_VP8_PICTURE(obj) ((GstVp8Picture *)obj) |
| 33 |
#define GST_VP8_PICTURE_CAST(obj) (GST_VP8_PICTURE(obj)) |
| 34 |
|
| 35 |
typedef struct _GstVp8Picture GstVp8Picture; |
| 36 |
|
| 37 |
struct _GstVp8Picture |
| 38 |
{ |
| 39 |
|
| 40 |
GstCodecPicture parent; |
| 41 |
|
| 42 |
GstVp8FrameHdr frame_hdr; |
| 43 |
|
| 44 |
|
| 45 |
const guint8 * data; |
| 46 |
gsize size; |
| 47 |
}; |
| 48 |
|
| 49 |
GST_CODECS_API |
| 50 |
GType gst_vp8_picture_get_type (void); |
| 51 |
|
| 52 |
GST_CODECS_API |
| 53 |
GstVp8Picture * gst_vp8_picture_new (void) G_GNUC_WARN_UNUSED_RESULT; |
| 54 |
|
| 55 |
static inline GstVp8Picture * |
| 56 |
gst_vp8_picture_ref (GstVp8Picture * picture) |
| 57 |
{ |
| 58 |
return (GstVp8Picture *) gst_mini_object_ref (GST_MINI_OBJECT_CAST (picture)); |
| 59 |
} |
| 60 |
|
| 61 |
static inline void |
| 62 |
gst_vp8_picture_unref (GstVp8Picture * picture) |
| 63 |
{ |
| 64 |
gst_mini_object_unref (GST_MINI_OBJECT_CAST (picture)); |
| 65 |
} |
| 66 |
|
| 67 |
static inline gboolean |
| 68 |
gst_vp8_picture_replace (GstVp8Picture ** old_picture, |
| 69 |
GstVp8Picture * new_picture) |
| 70 |
{ |
| 71 |
return gst_mini_object_replace ((GstMiniObject **) old_picture, |
| 72 |
(GstMiniObject *) new_picture); |
| 73 |
} |
| 74 |
|
| 75 |
static inline void |
| 76 |
gst_clear_vp8_picture (GstVp8Picture ** picture) |
| 77 |
{ |
| 78 |
if (picture && *picture) { |
| 79 |
gst_vp8_picture_unref (*picture); |
| 80 |
*picture = NULL; |
| 81 |
} |
| 82 |
} |
| 83 |
|
| 84 |
static inline void |
| 85 |
gst_vp8_picture_set_user_data (GstVp8Picture * picture, gpointer user_data, |
| 86 |
GDestroyNotify notify) |
| 87 |
{ |
| 88 |
gst_codec_picture_set_user_data (GST_CODEC_PICTURE (picture), |
| 89 |
user_data, notify); |
| 90 |
} |
| 91 |
|
| 92 |
static inline gpointer |
| 93 |
gst_vp8_picture_get_user_data (GstVp8Picture * picture) |
| 94 |
{ |
| 95 |
return gst_codec_picture_get_user_data (GST_CODEC_PICTURE (picture)); |
| 96 |
} |
| 97 |
|
| 98 |
static inline void |
| 99 |
gst_vp8_picture_set_discont_state (GstVp8Picture * picture, |
| 100 |
GstVideoCodecState * discont_state) |
| 101 |
{ |
| 102 |
gst_codec_picture_set_discont_state (GST_CODEC_PICTURE (picture), |
| 103 |
discont_state); |
| 104 |
} |
| 105 |
|
| 106 |
G_END_DECLS |
| 107 |
|
| 108 |
#endif |