2006-04-13 03:55:12 +00:00
|
|
|
/* GStreamer
|
2007-03-14 21:11:18 +00:00
|
|
|
* Copyright (C) <2006> Philippe Khalaf <philippe.kalaf@collabora.co.uk>
|
2006-04-13 03:55:12 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_BASE_RTP_AUDIO_PAYLOAD_H__
|
|
|
|
#define __GST_BASE_RTP_AUDIO_PAYLOAD_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/rtp/gstbasertppayload.h>
|
2007-03-14 21:11:18 +00:00
|
|
|
#include <gst/base/gstadapter.h>
|
2006-04-13 03:55:12 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct _GstBaseRTPAudioPayload GstBaseRTPAudioPayload;
|
|
|
|
typedef struct _GstBaseRTPAudioPayloadClass GstBaseRTPAudioPayloadClass;
|
|
|
|
|
2006-09-27 00:13:29 +00:00
|
|
|
typedef struct _GstBaseRTPAudioPayloadPrivate GstBaseRTPAudioPayloadPrivate;
|
|
|
|
|
2006-04-13 03:55:12 +00:00
|
|
|
#define GST_TYPE_BASE_RTP_AUDIO_PAYLOAD \
|
2006-09-27 00:13:29 +00:00
|
|
|
(gst_base_rtp_audio_payload_get_type())
|
2006-04-13 03:55:12 +00:00
|
|
|
#define GST_BASE_RTP_AUDIO_PAYLOAD(obj) \
|
2006-05-18 23:00:02 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
|
|
|
GST_TYPE_BASE_RTP_AUDIO_PAYLOAD,GstBaseRTPAudioPayload))
|
2006-04-13 03:55:12 +00:00
|
|
|
#define GST_BASE_RTP_AUDIO_PAYLOAD_CLASS(klass) \
|
2006-05-18 23:00:02 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
2006-06-01 19:19:51 +00:00
|
|
|
GST_TYPE_BASE_RTP_AUDIO_PAYLOAD,GstBaseRTPAudioPayloadClass))
|
2006-04-13 03:55:12 +00:00
|
|
|
#define GST_IS_BASE_RTP_AUDIO_PAYLOAD(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_RTP_AUDIO_PAYLOAD))
|
2006-06-01 19:19:51 +00:00
|
|
|
#define GST_IS_BASE_RTP_AUDIO_PAYLOAD_CLASS(klass) \
|
2006-04-13 03:55:12 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_RTP_AUDIO_PAYLOAD))
|
|
|
|
|
|
|
|
struct _GstBaseRTPAudioPayload
|
|
|
|
{
|
|
|
|
GstBaseRTPPayload payload;
|
|
|
|
|
2006-11-19 17:07:34 +00:00
|
|
|
GstBaseRTPAudioPayloadPrivate *priv;
|
|
|
|
|
2006-05-18 23:00:02 +00:00
|
|
|
GstClockTime base_ts;
|
2006-04-13 03:55:12 +00:00
|
|
|
gint frame_size;
|
|
|
|
gint frame_duration;
|
|
|
|
|
|
|
|
gint sample_size;
|
|
|
|
|
2006-05-18 23:00:02 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2006-04-13 03:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstBaseRTPAudioPayloadClass
|
|
|
|
{
|
|
|
|
GstBaseRTPPayloadClass parent_class;
|
2006-05-18 23:00:02 +00:00
|
|
|
|
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2006-04-13 03:55:12 +00:00
|
|
|
};
|
|
|
|
|
2006-09-27 00:13:29 +00:00
|
|
|
GType gst_base_rtp_audio_payload_get_type (void);
|
2006-04-13 03:55:12 +00:00
|
|
|
|
|
|
|
void
|
2006-09-27 00:13:29 +00:00
|
|
|
gst_base_rtp_audio_payload_set_frame_based (GstBaseRTPAudioPayload
|
2006-05-18 23:00:02 +00:00
|
|
|
*basertpaudiopayload);
|
2006-04-13 03:55:12 +00:00
|
|
|
|
|
|
|
void
|
2006-09-27 00:13:29 +00:00
|
|
|
gst_base_rtp_audio_payload_set_sample_based (GstBaseRTPAudioPayload
|
2006-05-18 23:00:02 +00:00
|
|
|
*basertpaudiopayload);
|
2006-04-13 03:55:12 +00:00
|
|
|
|
|
|
|
void
|
2006-09-27 00:13:29 +00:00
|
|
|
gst_base_rtp_audio_payload_set_frame_options (GstBaseRTPAudioPayload
|
2006-04-13 03:55:12 +00:00
|
|
|
*basertpaudiopayload, gint frame_duration, gint frame_size);
|
|
|
|
|
|
|
|
void
|
2006-09-27 00:13:29 +00:00
|
|
|
gst_base_rtp_audio_payload_set_sample_options (GstBaseRTPAudioPayload
|
2006-04-13 03:55:12 +00:00
|
|
|
*basertpaudiopayload, gint sample_size);
|
|
|
|
|
2008-03-03 16:11:50 +00:00
|
|
|
void
|
|
|
|
gst_base_rtp_audio_payload_set_samplebits_options (GstBaseRTPAudioPayload
|
|
|
|
*basertpaudiopayload, gint sample_size);
|
|
|
|
|
2007-03-14 21:11:18 +00:00
|
|
|
GstFlowReturn
|
2007-04-21 14:40:45 +00:00
|
|
|
gst_base_rtp_audio_payload_push (GstBaseRTPAudioPayload * baseaudiopayload,
|
2007-03-14 21:11:18 +00:00
|
|
|
const guint8 * data, guint payload_len, GstClockTime timestamp);
|
|
|
|
|
|
|
|
GstAdapter*
|
|
|
|
gst_base_rtp_audio_payload_get_adapter (GstBaseRTPAudioPayload
|
|
|
|
*basertpaudiopayload);
|
|
|
|
|
2006-04-13 03:55:12 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_BASE_RTP_AUDIO_PAYLOAD_H__ */
|