mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
a944d3f198
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_associate), (gst_rtp_bin_handle_sync), (create_stream), (free_stream), (new_ssrc_pad_found): Remove internal sync pad, use signals instead to get lip-sync notifications. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_base_init), (gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_internal_links), (create_rtcp_sink), (remove_rtcp_sink), (gst_rtp_jitter_buffer_request_new_pad), (gst_rtp_jitter_buffer_release_pad), (gst_rtp_jitter_buffer_sink_rtcp_event), (gst_rtp_jitter_buffer_chain_rtcp), (gst_rtp_jitter_buffer_get_property): * gst/rtpmanager/gstrtpjitterbuffer.h: Make it possible to send SR packets to the jitterbuffer. Check if the SR timestamps are valid by comparing them to the RTP timestamps. Signal the SR packet and the timing information to listeners. * gst/rtpmanager/gstrtpssrcdemux.c: (create_demux_pad_for_ssrc), (gst_rtp_ssrc_demux_rtcp_chain), (gst_rtp_ssrc_demux_src_query): Remove some unused code. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_reset_skew), (calculate_skew), (rtp_jitter_buffer_get_sync): * gst/rtpmanager/rtpjitterbuffer.h: Keep track of the last seen RTP timestamp so that we can filter out invalid SR packets.
87 lines
2.5 KiB
C
87 lines
2.5 KiB
C
/*
|
|
* Farsight Voice+Video library
|
|
*
|
|
* Copyright 2007 Collabora Ltd,
|
|
* Copyright 2007 Nokia Corporation
|
|
* @author: Philippe Kalaf <philippe.kalaf@collabora.co.uk>.
|
|
* Copyright 2007 Wim Taymans <wim.taymans@gmail.com>
|
|
*
|
|
* 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_RTP_JITTER_BUFFER_H__
|
|
#define __GST_RTP_JITTER_BUFFER_H__
|
|
|
|
#include <gst/gst.h>
|
|
#include <gst/rtp/gstrtpbuffer.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
/* #define's don't like whitespacey bits */
|
|
#define GST_TYPE_RTP_JITTER_BUFFER \
|
|
(gst_rtp_jitter_buffer_get_type())
|
|
#define GST_RTP_JITTER_BUFFER(obj) \
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
|
GST_TYPE_RTP_JITTER_BUFFER,GstRtpJitterBuffer))
|
|
#define GST_RTP_JITTER_BUFFER_CLASS(klass) \
|
|
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
|
GST_TYPE_RTP_JITTER_BUFFER,GstRtpJitterBufferClass))
|
|
#define GST_IS_RTP_JITTER_BUFFER(obj) \
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_JITTER_BUFFER))
|
|
#define GST_IS_RTP_JITTER_BUFFER_CLASS(obj) \
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_JITTER_BUFFER))
|
|
|
|
typedef struct _GstRtpJitterBuffer GstRtpJitterBuffer;
|
|
typedef struct _GstRtpJitterBufferClass GstRtpJitterBufferClass;
|
|
typedef struct _GstRtpJitterBufferPrivate GstRtpJitterBufferPrivate;
|
|
|
|
/**
|
|
* GstRtpJitterBuffer:
|
|
*
|
|
* Opaque jitterbuffer structure.
|
|
*/
|
|
struct _GstRtpJitterBuffer
|
|
{
|
|
GstElement parent;
|
|
|
|
/*< private >*/
|
|
GstRtpJitterBufferPrivate *priv;
|
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
|
};
|
|
|
|
struct _GstRtpJitterBufferClass
|
|
{
|
|
GstElementClass parent_class;
|
|
|
|
/* signals */
|
|
GstCaps* (*request_pt_map) (GstRtpJitterBuffer *buffer, guint pt);
|
|
|
|
void (*handle_sync) (GstRtpJitterBuffer *buffer, GstStructure *s);
|
|
|
|
/* actions */
|
|
void (*clear_pt_map) (GstRtpJitterBuffer *buffer);
|
|
|
|
/*< private > */
|
|
gpointer _gst_reserved[GST_PADDING];
|
|
};
|
|
|
|
GType gst_rtp_jitter_buffer_get_type (void);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GST_RTP_JITTER_BUFFER_H__ */
|