matroskamux: Update for the new collectpads2 event handling API

This commit is contained in:
Sebastian Dröge 2012-01-26 10:37:52 +01:00
parent 76a22a6ebb
commit a54c4d6bc4

View file

@ -735,6 +735,7 @@ gst_matroska_mux_handle_sink_event (GstCollectPads2 * pads,
GstMatroskaMux *mux;
GstPad *pad;
GstTagList *list;
gboolean ret = FALSE;
mux = GST_MATROSKA_MUX (user_data);
collect_pad = (GstMatroskaPad *) data;
@ -749,7 +750,7 @@ gst_matroska_mux_handle_sink_event (GstCollectPads2 * pads,
collect_pad = (GstMatroskaPad *) gst_pad_get_element_private (pad);
gst_event_parse_caps (event, &caps);
collect_pad->capsfunc (pad, caps);
ret = collect_pad->capsfunc (pad, caps);
gst_event_unref (event);
event = NULL;
break;
@ -781,6 +782,7 @@ gst_matroska_mux_handle_sink_event (GstCollectPads2 * pads,
gst_event_unref (event);
/* handled this, don't want collectpads to forward it downstream */
event = NULL;
ret = TRUE;
break;
}
case GST_EVENT_SEGMENT:{
@ -788,9 +790,11 @@ gst_matroska_mux_handle_sink_event (GstCollectPads2 * pads,
gst_event_parse_segment (event, &segment);
if (segment->format != GST_FORMAT_TIME) {
gst_event_unref (event);
event = NULL;
ret = FALSE;
}
gst_event_unref (event);
event = NULL;
ret = TRUE;
break;
}
case GST_EVENT_CUSTOM_DOWNSTREAM:{
@ -827,14 +831,18 @@ gst_matroska_mux_handle_sink_event (GstCollectPads2 * pads,
/* transform into private data for stream; text form */
gst_matroska_mux_build_vobsub_private (context, clut);
}
break;
}
/* fall through */
default:
ret = gst_pad_event_default (data->pad, GST_OBJECT (mux), event);
break;
case GST_EVENT_EOS:
gst_event_unref (event);
ret = TRUE;
break;
}
/* now GstCollectPads2 can take care of the rest, e.g. EOS */
return (event == NULL);
return ret;
}
static void