2 * Copyright (C) <2006> Philippe Khalaf <philippe.kalaf@collabora.co.uk>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __GST_BASE_RTP_AUDIO_PAYLOAD_H__
21 #define __GST_BASE_RTP_AUDIO_PAYLOAD_H__
24 #include <gst/rtp/gstbasertppayload.h>
25 #include <gst/base/gstadapter.h>
29 typedef struct _GstBaseRTPAudioPayload GstBaseRTPAudioPayload;
30 typedef struct _GstBaseRTPAudioPayloadClass GstBaseRTPAudioPayloadClass;
32 typedef struct _GstBaseRTPAudioPayloadPrivate GstBaseRTPAudioPayloadPrivate;
34 #define GST_TYPE_BASE_RTP_AUDIO_PAYLOAD \
35 (gst_base_rtp_audio_payload_get_type())
36 #define GST_BASE_RTP_AUDIO_PAYLOAD(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
38 GST_TYPE_BASE_RTP_AUDIO_PAYLOAD,GstBaseRTPAudioPayload))
39 #define GST_BASE_RTP_AUDIO_PAYLOAD_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_CAST((klass), \
41 GST_TYPE_BASE_RTP_AUDIO_PAYLOAD,GstBaseRTPAudioPayloadClass))
42 #define GST_IS_BASE_RTP_AUDIO_PAYLOAD(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_RTP_AUDIO_PAYLOAD))
44 #define GST_IS_BASE_RTP_AUDIO_PAYLOAD_CLASS(klass) \
45 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_RTP_AUDIO_PAYLOAD))
46 #define GST_BASE_RTP_AUDIO_PAYLOAD_CAST(obj) \
47 ((GstBaseRTPAudioPayload *) (obj))
49 struct _GstBaseRTPAudioPayload
51 GstBaseRTPPayload payload;
53 GstBaseRTPAudioPayloadPrivate *priv;
61 gpointer _gst_reserved[GST_PADDING];
65 * GstBaseRTPAudioPayloadClass:
66 * @parent_class: the parent class
68 * Base class for audio RTP payloader.
70 struct _GstBaseRTPAudioPayloadClass
72 GstBaseRTPPayloadClass parent_class;
75 gpointer _gst_reserved[GST_PADDING];
78 GType gst_base_rtp_audio_payload_get_type (void);
80 /* configure frame based */
81 void gst_base_rtp_audio_payload_set_frame_based (GstBaseRTPAudioPayload *basertpaudiopayload);
83 void gst_base_rtp_audio_payload_set_frame_options (GstBaseRTPAudioPayload *basertpaudiopayload,
84 gint frame_duration, gint frame_size);
86 /* configure sample based */
87 void gst_base_rtp_audio_payload_set_sample_based (GstBaseRTPAudioPayload *basertpaudiopayload);
88 void gst_base_rtp_audio_payload_set_sample_options (GstBaseRTPAudioPayload *basertpaudiopayload,
90 void gst_base_rtp_audio_payload_set_samplebits_options (GstBaseRTPAudioPayload *basertpaudiopayload,
93 /* get the internal adapter */
94 GstAdapter* gst_base_rtp_audio_payload_get_adapter (GstBaseRTPAudioPayload *basertpaudiopayload);
96 /* push and flushing data */
97 GstFlowReturn gst_base_rtp_audio_payload_push (GstBaseRTPAudioPayload * baseaudiopayload,
98 const guint8 * data, guint payload_len,
99 GstClockTime timestamp);
100 GstFlowReturn gst_base_rtp_audio_payload_flush (GstBaseRTPAudioPayload * baseaudiopayload,
101 guint payload_len, GstClockTime timestamp);
105 #endif /* __GST_BASE_RTP_AUDIO_PAYLOAD_H__ */