*
* 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.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
#ifndef __GST_RTPBUFFER_H__
/**
* GstRTPBuffer:
* @buffer: pointer to RTP buffer
+ * @state: internal state
+ * @data: array of data
+ * @size: array of size
+ * @map: array of #GstMapInfo
*
* Data structure that points to an RTP packet.
* The size of the structure is made public to allow stack allocations.
struct _GstRTPBuffer
{
GstBuffer *buffer;
- GstMapFlags flags;
- guint8 *data;
- gsize size;
- gsize maxsize;
+ guint state;
+ gpointer data[4];
+ gsize size[4];
+ GstMapInfo map[4];
};
+#define GST_RTP_BUFFER_INIT { NULL, 0, { NULL, NULL, NULL, NULL}, { 0, 0, 0, 0 }, \
+ { GST_MAP_INFO_INIT, GST_MAP_INFO_INIT, GST_MAP_INFO_INIT, GST_MAP_INFO_INIT} }
+
/* creating buffers */
void gst_rtp_buffer_allocate_data (GstBuffer *buffer, guint payload_len,
guint8 pad_len, guint8 csrc_count);
guint gst_rtp_buffer_calc_packet_len (guint payload_len, guint8 pad_len, guint8 csrc_count);
guint gst_rtp_buffer_calc_payload_len (guint packet_len, guint8 pad_len, guint8 csrc_count);
-gboolean gst_rtp_buffer_validate_data (guint8 *data, gsize len);
-gboolean gst_rtp_buffer_validate (GstBuffer *buffer);
-
-
gboolean gst_rtp_buffer_map (GstBuffer *buffer, GstMapFlags flags, GstRTPBuffer *rtp);
-gboolean gst_rtp_buffer_unmap (GstRTPBuffer *rtp);
+void gst_rtp_buffer_unmap (GstRTPBuffer *rtp);
void gst_rtp_buffer_set_packet_len (GstRTPBuffer *rtp, guint len);
guint gst_rtp_buffer_get_packet_len (GstRTPBuffer *rtp);