2 * Copyright (C) <2005> Wim Taymans <wim@fluendo.com>
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_PAYLOAD_H__
21 #define __GST_BASE_RTP_PAYLOAD_H__
27 #define GST_TYPE_BASE_RTP_PAYLOAD \
28 (gst_basertppayload_get_type())
29 #define GST_BASE_RTP_PAYLOAD(obj) \
30 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_RTP_PAYLOAD,GstBaseRTPPayload))
31 #define GST_BASE_RTP_PAYLOAD_CLASS(klass) \
32 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_RTP_PAYLOAD,GstBaseRTPPayload))
33 #define GST_BASE_RTP_PAYLOAD_GET_CLASS(obj) \
34 (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_RTP_PAYLOAD, GstBaseRTPPayloadClass))
35 #define GST_IS_BASE_RTP_PAYLOAD(obj) \
36 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_RTP_PAYLOAD))
37 #define GST_IS_BASE_RTP_PAYLOAD_CLASS(obj) \
38 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_RTP_PAYLOAD))
40 typedef struct _GstBaseRTPPayload GstBaseRTPPayload;
41 typedef struct _GstBaseRTPPayloadClass GstBaseRTPPayloadClass;
43 #define GST_BASE_RTP_PAYLOAD_SINKPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->sinkpad)
44 #define GST_BASE_RTP_PAYLOAD_SRCPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->srcpad)
46 #define GST_BASE_RTP_PAYLOAD_PT(payload) (GST_BASE_RTP_PAYLOAD (payload)->pt)
47 #define GST_BASE_RTP_PAYLOAD_MTU(payload) (GST_BASE_RTP_PAYLOAD (payload)->mtu)
49 struct _GstBaseRTPPayload
82 gpointer _gst_reserved[GST_PADDING];
85 struct _GstBaseRTPPayloadClass
87 GstElementClass parent_class;
89 /* receive caps on the sink pad, configure the payloader. */
90 gboolean (*set_caps) (GstBaseRTPPayload *payload, GstCaps *caps);
91 /* handle a buffer, perform 0 or more gst_basertppayload_push() on
93 GstFlowReturn (*handle_buffer) (GstBaseRTPPayload *payload,
97 gpointer _gst_reserved[GST_PADDING];
100 GType gst_basertppayload_get_type (void);
102 void gst_basertppayload_set_options (GstBaseRTPPayload *payload,
103 gchar *media, gboolean dynamic,
104 gchar *encoding_name,
107 gboolean gst_basertppayload_set_outcaps (GstBaseRTPPayload *payload,
108 gchar *fieldname, ...);
110 gboolean gst_basertppayload_is_filled (GstBaseRTPPayload *payload,
111 guint size, GstClockTime duration);
113 GstFlowReturn gst_basertppayload_push (GstBaseRTPPayload *payload,
118 #endif /* __GST_BASE_RTP_PAYLOAD_H__ */