1 /*  GStreamer RTP SBC payloader
2  *  BlueZ - Bluetooth protocol stack for Linux
3  *
4  *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
5  *
6  *  This library is free software; you can redistribute it and/or
7  *  modify it under the terms of the GNU Lesser General Public
8  *  License as published by the Free Software Foundation; either
9  *  version 2.1 of the License, or (at your option) any later version.
10  *
11  *  This library is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  *  Lesser General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Lesser General Public
17  *  License along with this library; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21 
22 #include <gst/gst.h>
23 #include <gst/base/gstadapter.h>
24 #include <gst/rtp/gstrtpbasepayload.h>
25 #include <gst/rtp/gstrtpbuffer.h>
26 
27 G_BEGIN_DECLS
28 
29 #define GST_TYPE_RTP_SBC_PAY \
30   (gst_rtp_sbc_pay_get_type())
31 #define GST_RTP_SBC_PAY(obj) \
32   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_SBC_PAY,\
33                               GstRtpSBCPay))
34 #define GST_RTP_SBC_PAY_CLASS(klass) \
35   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_SBC_PAY,\
36                            GstRtpSBCPayClass))
37 #define GST_IS_RTP_SBC_PAY(obj) \
38   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_SBC_PAY))
39 #define GST_IS_RTP_SBC_PAY_CLASS(obj) \
40   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_SBC_PAY))
41 
42 typedef struct _GstRtpSBCPay GstRtpSBCPay;
43 typedef struct _GstRtpSBCPayClass GstRtpSBCPayClass;
44 
45 struct _GstRtpSBCPay {
46   GstRTPBasePayload base;
47 
48   GstAdapter *adapter;
49   GstClockTime last_timestamp;
50 
51   guint frame_length;
52   GstClockTime frame_duration;
53 
54   guint min_frames;
55 };
56 
57 struct _GstRtpSBCPayClass {
58   GstRTPBasePayloadClass parent_class;
59 };
60 
61 GType gst_rtp_sbc_pay_get_type(void);
62 
63 gboolean gst_rtp_sbc_pay_plugin_init (GstPlugin * plugin);
64 
65 G_END_DECLS
66