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

« back to all changes in this revision

Viewing changes to gst/rtpmux/gstrtpmux.c

Tags: upstream-0.10.17.2
Import upstream version 0.10.17.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
    const GValue * value, GParamSpec * pspec);
98
98
static void gst_rtp_mux_get_property (GObject * object, guint prop_id,
99
99
    GValue * value, GParamSpec * pspec);
100
 
 
 
100
static void gst_rtp_mux_dispose (GObject * object);
101
101
 
102
102
GST_BOILERPLATE (GstRTPMux, gst_rtp_mux, GstElement, GST_TYPE_ELEMENT);
103
103
 
125
125
 
126
126
  gobject_class->get_property = gst_rtp_mux_get_property;
127
127
  gobject_class->set_property = gst_rtp_mux_set_property;
 
128
  gobject_class->dispose = gst_rtp_mux_dispose;
128
129
 
129
130
  g_object_class_install_property (G_OBJECT_CLASS (klass),
130
131
      PROP_TIMESTAMP_OFFSET, g_param_spec_int ("timestamp-offset",
152
153
  klass->chain_func = gst_rtp_mux_chain;
153
154
}
154
155
 
 
156
static void
 
157
gst_rtp_mux_dispose (GObject * object)
 
158
{
 
159
  GList *item;
 
160
 
 
161
restart:
 
162
  for (item = GST_ELEMENT_PADS (object); item; item = g_list_next (item)) {
 
163
    GstPad *pad = GST_PAD (item->data);
 
164
    if (GST_PAD_IS_SINK (pad)) {
 
165
      gst_element_release_request_pad (GST_ELEMENT (object), pad);
 
166
      goto restart;
 
167
    }
 
168
  }
 
169
 
 
170
  G_OBJECT_CLASS (parent_class)->dispose (object);
 
171
}
 
172
 
155
173
static gboolean
156
174
gst_rtp_mux_src_event (GstPad * pad, GstEvent * event)
157
175
{
407
425
      "setting caps %" GST_PTR_FORMAT " on src pad..", caps);
408
426
  ret = gst_pad_set_caps (rtp_mux->srcpad, caps);
409
427
 
 
428
  if (rtp_mux->ssrc == -1) {
 
429
    if (gst_structure_has_field_typed (structure, "ssrc", G_TYPE_UINT)) {
 
430
      rtp_mux->current_ssrc = g_value_get_uint
 
431
          (gst_structure_get_value (structure, "ssrc"));
 
432
    }
 
433
  }
 
434
 
410
435
  if (ret) {
411
436
    GST_OBJECT_LOCK (rtp_mux);
412
437
    padpriv = gst_pad_get_element_private (pad);