aa_imgwidth (aasink->context), /* dw */
aa_imgheight (aasink->context)); /* dh */
- if (!GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLUSH)) {
- GST_DEBUG (0,"videosink: clock wait: %llu\n", GST_BUFFER_TIMESTAMP(buf));
+ GST_DEBUG (0,"videosink: clock wait: %llu\n", GST_BUFFER_TIMESTAMP(buf));
- jitter = gst_clock_current_diff(aasink->clock, GST_BUFFER_TIMESTAMP (buf));
+ jitter = gst_clock_current_diff(aasink->clock, GST_BUFFER_TIMESTAMP (buf));
- if (jitter > 500000 || jitter < -500000)
- {
- GST_DEBUG (0, "jitter: %lld\n", jitter);
- gst_clock_set (aasink->clock, GST_BUFFER_TIMESTAMP (buf));
- }
- else {
- gst_clock_wait(aasink->clock, GST_BUFFER_TIMESTAMP(buf), GST_OBJECT(aasink));
- }
+ if (jitter > 500000 || jitter < -500000)
+ {
+ GST_DEBUG (0, "jitter: %lld\n", jitter);
+ gst_clock_set (aasink->clock, GST_BUFFER_TIMESTAMP (buf));
+ }
+ else {
+ gst_clock_wait(aasink->clock, GST_BUFFER_TIMESTAMP(buf), GST_OBJECT(aasink));
}
aa_render (aasink->context, &aasink->ascii_parms,
if ( need_sync == 1 )
{
- GST_BUFFER_FLAG_SET (outdata, GST_BUFFER_FLUSH);
+ /* FIXME, send a flush event or something */
need_sync = 0 ;
}
gst_pad_push( srcpad, outdata );
gst_element_yield (element);
}
else {
- gst_element_set_state (GST_ELEMENT (mikmod), GST_STATE_PAUSED);
- gst_pad_push (mikmod->srcpad, gst_event_new (GST_EVENT_EOS));
+ gst_element_set_eos (GST_ELEMENT (mikmod));
+ gst_pad_push (mikmod->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
}
}
gst_reader = ( GST_READER * ) reader;
- /*tmp->mik->Buffer = gst_pad_pullregion( tmp->mik->sinkpad, GST_REGION_OFFSET_LEN, tmp->offset, size );*/
-
memcpy( ptr, GST_BUFFER_DATA( gst_reader->mik->Buffer ) + gst_reader->offset, size);
gst_reader->offset = gst_reader->offset + size;
-/* if ( GST_BUFFER_SIZE( tmp->mik->Buffer ) != size )
- tmp->eof = 1;
- else
- tmp->eof = 0;
-
- if (GST_BUFFER_FLAG_IS_SET (tmp->mik->Buffer, GST_BUFFER_FLUSH))
- need_sync = 1;
-
- gst_buffer_unref( tmp->mik->Buffer );*/
-
return 1;
}
gst_reader = ( GST_READER * ) reader;
- /*tmp->mik->Buffer = gst_pad_pullregion( tmp->mik->sinkpad, GST_REGION_OFFSET_LEN, tmp->offset, 1 );*/
res = *( GST_BUFFER_DATA( gst_reader->mik->Buffer ) + gst_reader->offset );
gst_reader->offset += 1;
-/* if ( GST_BUFFER_SIZE( tmp->mik->Buffer ) != 1 )
- tmp->eof = 1;
- else
- tmp->eof = 0;
-
- gst_buffer_unref( tmp->mik->Buffer );*/
-
return res;
}
avi_demux->next_time += avi_demux->time_interval;
if (avi_demux->video_need_flush[0]) {
+ /* FIXME, do some flush event here */
avi_demux->video_need_flush[0] = FALSE;
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLUSH);
}
GST_DEBUG (0,"gst_avi_demux_chain: send video buffer %08x\n", *chunksize);
if (avi_demux->audio_need_flush[0]) {
GST_DEBUG (0,"audio flush\n");
avi_demux->audio_need_flush[0] = FALSE;
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLUSH);
+ /* FIXME, do some flush event here */
}
GST_DEBUG (0,"gst_avi_demux_chain: send audio buffer %08x\n", *chunksize);
GST_BUFFER_DATA(flxdec->frame),
GST_BUFFER_DATA(flxdec->out));
- //GST_BUFFER_FLAG_SET(flxdec->out, GST_BUFFER_FLUSH);
gst_pad_push(flxdec->srcpad, flxdec->out);
break;
// g_return_if_fail(GST_FLAG_IS_SET(osssink,GST_STATE_RUNNING));
if (GST_IS_EVENT (buf)) {
- g_print ("eos on osssink\n");
- gst_element_set_state (GST_ELEMENT (osssink), GST_STATE_PAUSED);
- gst_event_free (GST_EVENT (buf));
+ gst_pad_event_default (pad, GST_EVENT (buf));
return;
}