Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / gst / rtpmanager / gstrtpjitterbuffer.h
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., 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, 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
48 typedef struct _GstRtpJitterBuffer GstRtpJitterBuffer;
49 typedef struct _GstRtpJitterBufferClass GstRtpJitterBufferClass;
50 typedef struct _GstRtpJitterBufferPrivate GstRtpJitterBufferPrivate;
51
52 /**
53  * GstRtpJitterBuffer:
54  *
55  * Opaque jitterbuffer structure.
56  */
57 struct _GstRtpJitterBuffer
58 {
59   GstElement parent;
60
61   /*< private >*/
62   GstRtpJitterBufferPrivate *priv; /* FIXME: remove? */
63 };
64
65 struct _GstRtpJitterBufferClass
66 {
67   GstElementClass parent_class;
68
69   /* signals */
70   GstCaps* (*request_pt_map)   (GstRtpJitterBuffer *buffer, guint pt);
71
72   void     (*handle_sync)      (GstRtpJitterBuffer *buffer, GstStructure *s);
73   void     (*on_npt_stop)      (GstRtpJitterBuffer *buffer);
74
75   /* actions */
76   void     (*clear_pt_map)   (GstRtpJitterBuffer *buffer);
77
78   GstClockTime (*set_active)     (GstRtpJitterBuffer *buffer, gboolean active, guint64 elapsed);
79 };
80
81 GType gst_rtp_jitter_buffer_get_type (void);
82
83 G_END_DECLS
84
85 #endif /* __GST_RTP_JITTER_BUFFER_H__ */