Tizen 2.0 Release
[framework/multimedia/gst-plugins-bad0.10.git] / gst / rtpvp8 / gstrtpvp8pay.h
1 /*
2  * gst-rtp-vp8-pay.h - Header for GstRtpVP8Pay
3  * Copyright (C) 2011 Sjoerd Simons <sjoerd@luon.net>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19
20 #ifndef __GST_RTP_VP8_PAY_H__
21 #define __GST_RTP_VP8_PAY_H__
22
23 #include <glib-object.h>
24 #include <gst/base/gstadapter.h>
25 #include <gst/rtp/gstbasertppayload.h>
26
27 G_BEGIN_DECLS typedef struct _GstRtpVP8Pay GstRtpVP8Pay;
28 typedef struct _GstRtpVP8PayClass GstRtpVP8PayClass;
29 typedef enum _PictureIDMode PictureIDMode;
30
31 enum _PictureIDMode {
32   VP8_PAY_NO_PICTURE_ID,
33   VP8_PAY_PICTURE_ID_7BITS,
34   VP8_PAY_PICTURE_ID_15BITS,
35 };
36
37 struct _GstRtpVP8PayClass
38 {
39   GstBaseRTPPayloadClass parent_class;
40 };
41
42 struct _GstRtpVP8Pay
43 {
44   GstBaseRTPPayload parent;
45   gboolean is_keyframe;
46   gint n_partitions;
47   /* Treat frame header & tag & partition size block as the first partition,
48    * folowed by max. 8 data partitions. last offset is the end of the buffer */
49   guint partition_offset[10];
50   guint partition_size[9];
51   PictureIDMode picture_id_mode;
52   guint16 picture_id;
53 };
54
55 GType gst_rtp_vp8_pay_get_type (void);
56
57 /* TYPE MACROS */
58 #define GST_TYPE_RTP_VP8_PAY \
59   (gst_rtp_vp8_pay_get_type())
60 #define GST_RTP_VP8_PAY(obj) \
61   (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_RTP_VP8_PAY, GstRtpVP8Pay))
62 #define GST_RTP_VP8_PAY_CLASS(klass) \
63   (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_RTP_VP8_PAY, GstRtpVP8PayClass))
64 #define GST_IS_RTP_VP8_PAY(obj) \
65   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_RTP_VP8_PAY))
66 #define GST_IS_RTP_VP8_PAY_CLASS(klass) \
67   (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_RTP_VP8_PAY))
68 #define GST_RTP_VP8_PAY_GET_CLASS(obj) \
69   (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTP_VP8_PAY, GstRtpVP8PayClass))
70
71 gboolean gst_rtp_vp8_pay_plugin_init (GstPlugin * plugin);
72
73 G_END_DECLS
74 #endif /* #ifndef __GST_RTP_VP8_PAY_H__ */