do_async_start (playsink);
ret = GST_STATE_CHANGE_ASYNC;
break;
- case GST_STATE_CHANGE_PAUSED_TO_READY:{
- if (playsink->video_sinkpad_stream_synchronizer) {
- gst_element_release_request_pad (GST_ELEMENT_CAST
- (playsink->stream_synchronizer),
- playsink->video_sinkpad_stream_synchronizer);
- gst_object_unref (playsink->video_sinkpad_stream_synchronizer);
- playsink->video_sinkpad_stream_synchronizer = NULL;
- gst_object_unref (playsink->video_srcpad_stream_synchronizer);
- playsink->video_srcpad_stream_synchronizer = NULL;
- }
- if (playsink->audio_sinkpad_stream_synchronizer) {
- gst_element_release_request_pad (GST_ELEMENT_CAST
- (playsink->stream_synchronizer),
- playsink->audio_sinkpad_stream_synchronizer);
- gst_object_unref (playsink->audio_sinkpad_stream_synchronizer);
- playsink->audio_sinkpad_stream_synchronizer = NULL;
- gst_object_unref (playsink->audio_srcpad_stream_synchronizer);
- playsink->audio_srcpad_stream_synchronizer = NULL;
- }
- if (playsink->text_sinkpad_stream_synchronizer) {
- gst_element_release_request_pad (GST_ELEMENT_CAST
- (playsink->stream_synchronizer),
- playsink->text_sinkpad_stream_synchronizer);
- gst_object_unref (playsink->text_sinkpad_stream_synchronizer);
- playsink->text_sinkpad_stream_synchronizer = NULL;
- gst_object_unref (playsink->text_srcpad_stream_synchronizer);
- playsink->text_srcpad_stream_synchronizer = NULL;
- }
- }
- /* fall through */
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
case GST_STATE_CHANGE_READY_TO_NULL:
if (playsink->audiochain && playsink->audiochain->sink_volume) {
/* remove our links to the mute and volume elements when they were
/* FIXME Release audio device when we implement that */
playsink->need_async_start = TRUE;
break;
- case GST_STATE_CHANGE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:{
+ if (playsink->video_sinkpad_stream_synchronizer) {
+ gst_element_release_request_pad (GST_ELEMENT_CAST
+ (playsink->stream_synchronizer),
+ playsink->video_sinkpad_stream_synchronizer);
+ gst_object_unref (playsink->video_sinkpad_stream_synchronizer);
+ playsink->video_sinkpad_stream_synchronizer = NULL;
+ gst_object_unref (playsink->video_srcpad_stream_synchronizer);
+ playsink->video_srcpad_stream_synchronizer = NULL;
+ }
+ if (playsink->audio_sinkpad_stream_synchronizer) {
+ gst_element_release_request_pad (GST_ELEMENT_CAST
+ (playsink->stream_synchronizer),
+ playsink->audio_sinkpad_stream_synchronizer);
+ gst_object_unref (playsink->audio_sinkpad_stream_synchronizer);
+ playsink->audio_sinkpad_stream_synchronizer = NULL;
+ gst_object_unref (playsink->audio_srcpad_stream_synchronizer);
+ playsink->audio_srcpad_stream_synchronizer = NULL;
+ }
+ if (playsink->text_sinkpad_stream_synchronizer) {
+ gst_element_release_request_pad (GST_ELEMENT_CAST
+ (playsink->stream_synchronizer),
+ playsink->text_sinkpad_stream_synchronizer);
+ gst_object_unref (playsink->text_sinkpad_stream_synchronizer);
+ playsink->text_sinkpad_stream_synchronizer = NULL;
+ gst_object_unref (playsink->text_srcpad_stream_synchronizer);
+ playsink->text_srcpad_stream_synchronizer = NULL;
+ }
+ }
+ /* fall through */
case GST_STATE_CHANGE_READY_TO_NULL:
/* remove sinks we added */
if (playsink->videodeinterlacechain) {
GST_TIME_ARGS (stream->segment.accum));
stream->running_time_diff = stream->segment.accum;
} else if (stream) {
- GST_ERROR_OBJECT (pad, "Non-TIME segment");
+ GST_WARNING_OBJECT (pad, "Non-TIME segment: %s",
+ gst_format_get_name (format));
gst_segment_init (&stream->segment, GST_FORMAT_UNDEFINED);
}
GST_STREAM_SYNCHRONIZER_UNLOCK (self);
gst_pad_set_element_private (stream->srcpad, NULL);
gst_pad_set_element_private (stream->sinkpad, NULL);
gst_pad_set_active (stream->srcpad, FALSE);
- gst_pad_set_active (stream->sinkpad, FALSE);
gst_element_remove_pad (GST_ELEMENT_CAST (self), stream->srcpad);
+ gst_pad_set_active (stream->sinkpad, FALSE);
gst_element_remove_pad (GST_ELEMENT_CAST (self), stream->sinkpad);
if (stream->segment.format == GST_FORMAT_TIME) {
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
GST_DEBUG_OBJECT (self, "State change READY->PAUSED");
+ self->group_start_time = 0;
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
GST_DEBUG_OBJECT (self, "State change PAUSED->PLAYING");
break;
- case GST_STATE_CHANGE_READY_TO_NULL:{
- GST_DEBUG_OBJECT (self, "State change READY->NULL");
-
- GST_STREAM_SYNCHRONIZER_LOCK (self);
- g_cond_broadcast (self->stream_finish_cond);
- while (self->streams)
- gst_stream_synchronizer_release_stream (self, self->streams->data);
- self->current_stream_number = 0;
- GST_STREAM_SYNCHRONIZER_UNLOCK (self);
- break;
- }
default:
break;
}
}
case GST_STATE_CHANGE_READY_TO_NULL:{
GST_DEBUG_OBJECT (self, "State change READY->NULL");
+
+ GST_STREAM_SYNCHRONIZER_LOCK (self);
+ g_cond_broadcast (self->stream_finish_cond);
+ while (self->streams)
+ gst_stream_synchronizer_release_stream (self, self->streams->data);
+ self->current_stream_number = 0;
+ GST_STREAM_SYNCHRONIZER_UNLOCK (self);
break;
}
default: