1 /* 2 * Farsight Voice+Video library 3 * 4 * Copyright 2007 Collabora Ltd, 5 * Copyright 2007 Nokia Corporation 6 * @author: Philippe Kalaf <philippe.kalaf@collabora.co.uk>. 7 * Copyright 2007 Wim Taymans <wim.taymans@gmail.com> 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Library General Public 11 * License as published by the Free Software Foundation; either 12 * version 2 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Library General Public License for more details. 18 * 19 * You should have received a copy of the GNU Library General Public 20 * License along with this library; if not, write to the 21 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 22 * Boston, MA 02110-1301, USA. 23 * 24 */ 25 26 #ifndef __GST_RTP_JITTER_BUFFER_H__ 27 #define __GST_RTP_JITTER_BUFFER_H__ 28 29 #include <gst/gst.h> 30 #include <gst/rtp/gstrtpbuffer.h> 31 32 G_BEGIN_DECLS 33 34 /* #define's don't like whitespacey bits */ 35 #define GST_TYPE_RTP_JITTER_BUFFER \ 36 (gst_rtp_jitter_buffer_get_type()) 37 #define GST_RTP_JITTER_BUFFER(obj) \ 38 (G_TYPE_CHECK_INSTANCE_CAST((obj), \ 39 GST_TYPE_RTP_JITTER_BUFFER,GstRtpJitterBuffer)) 40 #define GST_RTP_JITTER_BUFFER_CLASS(klass) \ 41 (G_TYPE_CHECK_CLASS_CAST((klass), \ 42 GST_TYPE_RTP_JITTER_BUFFER,GstRtpJitterBufferClass)) 43 #define GST_IS_RTP_JITTER_BUFFER(obj) \ 44 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_JITTER_BUFFER)) 45 #define GST_IS_RTP_JITTER_BUFFER_CLASS(obj) \ 46 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_JITTER_BUFFER)) 47 #define GST_RTP_JITTER_BUFFER_CAST(obj) \ 48 ((GstRtpJitterBuffer *)(obj)) 49 50 typedef struct _GstRtpJitterBuffer GstRtpJitterBuffer; 51 typedef struct _GstRtpJitterBufferClass GstRtpJitterBufferClass; 52 typedef struct _GstRtpJitterBufferPrivate GstRtpJitterBufferPrivate; 53 54 /** 55 * GstRtpJitterBuffer: 56 * 57 * Opaque jitterbuffer structure. 58 */ 59 struct _GstRtpJitterBuffer 60 { 61 GstElement parent; 62 63 /*< private >*/ 64 GstRtpJitterBufferPrivate *priv; /* FIXME: remove? */ 65 }; 66 67 struct _GstRtpJitterBufferClass 68 { 69 GstElementClass parent_class; 70 71 /* signals */ 72 GstCaps* (*request_pt_map) (GstRtpJitterBuffer *buffer, guint pt); 73 74 void (*handle_sync) (GstRtpJitterBuffer *buffer, GstStructure *s); 75 void (*on_npt_stop) (GstRtpJitterBuffer *buffer); 76 77 /* actions */ 78 void (*clear_pt_map) (GstRtpJitterBuffer *buffer); 79 80 GstClockTime (*set_active) (GstRtpJitterBuffer *buffer, gboolean active, guint64 elapsed); 81 }; 82 83 GType gst_rtp_jitter_buffer_get_type (void); 84 85 GST_ELEMENT_REGISTER_DECLARE (rtpjitterbuffer); 86 87 G_END_DECLS 88 89 #endif /* __GST_RTP_JITTER_BUFFER_H__ */ 90