~ubuntu-branches/ubuntu/precise/gst-plugins-bad0.10/precise-proposed

« back to all changes in this revision

Viewing changes to gst/sdp/gstsdpdemux.h

Tags: upstream-0.10.5.3
Import upstream version 0.10.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GStreamer
 
2
 * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 */
 
19
 
 
20
#ifndef __GST_SDP_DEMUX_H__
 
21
#define __GST_SDP_DEMUX_H__
 
22
 
 
23
#include <gst/gst.h>
 
24
#include <gst/base/gstadapter.h>
 
25
 
 
26
G_BEGIN_DECLS
 
27
 
 
28
#define GST_TYPE_SDP_DEMUX \
 
29
  (gst_sdp_demux_get_type())
 
30
#define GST_SDP_DEMUX(obj) \
 
31
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SDP_DEMUX,GstSDPDemux))
 
32
#define GST_SDP_DEMUX_CLASS(klass) \
 
33
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SDP_DEMUX,GstSDPDemuxClass))
 
34
#define GST_IS_SDP_DEMUX(obj) \
 
35
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SDP_DEMUX))
 
36
#define GST_IS_SDP_DEMUX_CLASS(klass) \
 
37
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SDP_DEMUX))
 
38
#define GST_SDP_DEMUX_CAST(obj) \
 
39
  ((GstSDPDemux *)(obj))
 
40
 
 
41
typedef struct _GstSDPDemux GstSDPDemux;
 
42
typedef struct _GstSDPDemuxClass GstSDPDemuxClass;
 
43
 
 
44
#define GST_SDP_STREAM_GET_LOCK(sdp)   (GST_SDP_DEMUX_CAST(sdp)->stream_rec_lock)
 
45
#define GST_SDP_STREAM_LOCK(sdp)       (g_static_rec_mutex_lock (GST_SDP_STREAM_GET_LOCK(sdp)))
 
46
#define GST_SDP_STREAM_UNLOCK(sdp)     (g_static_rec_mutex_unlock (GST_SDP_STREAM_GET_LOCK(sdp)))
 
47
 
 
48
typedef struct _GstSDPStream GstSDPStream;
 
49
 
 
50
struct _GstSDPStream {
 
51
  gint          id;
 
52
 
 
53
  GstSDPDemux    *parent; /* parent, no extra ref to parent is taken */
 
54
 
 
55
  /* pad we expose or NULL when it does not have an actual pad */
 
56
  GstPad       *srcpad;
 
57
  GstFlowReturn last_ret;
 
58
  gboolean      added;
 
59
  gboolean      disabled;
 
60
  GstCaps      *caps;
 
61
  gboolean      eos;
 
62
 
 
63
  /* our udp sources */
 
64
  GstElement   *udpsrc[2];
 
65
  GstPad       *channelpad[2];
 
66
  guint         rtp_port;
 
67
  guint         rtcp_port;
 
68
 
 
69
  gchar        *destination;
 
70
  guint         ttl;
 
71
 
 
72
  /* our udp sink back to the server */
 
73
  GstElement   *udpsink;
 
74
  GstPad       *rtcppad;
 
75
 
 
76
  /* state */
 
77
  gint          pt;
 
78
  gboolean      container;
 
79
};
 
80
 
 
81
struct _GstSDPDemux {
 
82
  GstBin           parent;
 
83
 
 
84
  GstPad          *sinkpad;
 
85
  GstAdapter      *adapter;
 
86
  GstState         target;
 
87
 
 
88
  /* task for UDP loop */
 
89
  gboolean         ignore_timeout;
 
90
 
 
91
  gint             numstreams;
 
92
  GStaticRecMutex *stream_rec_lock;
 
93
  GList           *streams;
 
94
 
 
95
  /* properties */
 
96
  gboolean          debug;
 
97
  guint64           udp_timeout;
 
98
  guint             latency;
 
99
 
 
100
  /* session management */
 
101
  GstElement      *session;
 
102
  gulong           session_sig_id;
 
103
  gulong           session_ptmap_id;
 
104
};
 
105
 
 
106
struct _GstSDPDemuxClass {
 
107
  GstBinClass parent_class;
 
108
};
 
109
 
 
110
GType gst_sdp_demux_get_type(void);
 
111
 
 
112
G_END_DECLS
 
113
 
 
114
#endif /* __GST_SDP_DEMUX_H__ */