gboolean eos_sent; /* when EOS was sent downstream */
gboolean flushing; /* set after flush-start and before flush-stop */
gboolean seen_data;
+ gboolean send_gap_event;
GstClockTime gap_duration;
GstStreamFlags flags;
break;
}
- if (self->send_gap_event) {
+ if (stream->send_gap_event) {
GstEvent *event;
if (!GST_CLOCK_TIME_IS_VALID (stream->segment.position)) {
GST_WARNING_OBJECT (pad, "Have no position and can't send GAP event");
- self->send_gap_event = FALSE;
+ stream->send_gap_event = FALSE;
continue;
}
if (!ret) {
return ret;
}
- self->send_gap_event = FALSE;
+ stream->send_gap_event = FALSE;
/* force a check on the loop conditions as we unlocked a
* few lines above and those variables could have changed */
g_slist_free (pads);
} else {
if (seen_data) {
- self->send_gap_event = TRUE;
+ stream->send_gap_event = TRUE;
stream->gap_duration = GST_CLOCK_TIME_NONE;
stream->wait = TRUE;
ret = gst_stream_synchronizer_wait (self, srcpad);
ostream->segment.position = new_start;
- self->send_gap_event = TRUE;
+ ostream->send_gap_event = TRUE;
ostream->gap_duration = new_start - position;
g_cond_broadcast (&ostream->stream_finish_cond);
}
stream->segment_seqnum = G_MAXUINT32;
stream->group_id = G_MAXUINT;
stream->seen_data = FALSE;
+ stream->send_gap_event = FALSE;
tmp = g_strdup_printf ("sink_%u", self->current_stream_number);
stream->sinkpad = gst_pad_new_from_static_template (&sinktemplate, tmp);
case GST_STATE_CHANGE_NULL_TO_READY:
GST_DEBUG_OBJECT (self, "State change NULL->READY");
self->shutdown = FALSE;
- self->send_gap_event = FALSE;
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
GST_DEBUG_OBJECT (self, "State change READY->PAUSED");
* chain () will be blocked on pad_push (), so can't trigger the track
* which reach EOS to send GAP event. */
if (stream->is_eos && !stream->eos_sent) {
- self->send_gap_event = TRUE;
+ stream->send_gap_event = TRUE;
stream->gap_duration = GST_CLOCK_TIME_NONE;
g_cond_broadcast (&stream->stream_finish_cond);
}
self->group_start_time = 0;
GST_STREAM_SYNCHRONIZER_LOCK (self);
- self->send_gap_event = FALSE;
for (l = self->streams; l; l = l->next) {
GstSyncStream *stream = l->data;
stream->is_eos = FALSE;
stream->eos_sent = FALSE;
stream->flushing = FALSE;
+ stream->send_gap_event = FALSE;
}
GST_STREAM_SYNCHRONIZER_UNLOCK (self);
break;