From: Zeeshan A. K. <za...@us...> - 2002-08-08 19:57:33
|
CVS Root: /cvsroot/gstreamer Module: gst-plugins Changes by: zak147 Date: Thu Aug 08 2002 12:57:32 PDT Log message: xvideo sink should also handle discontinue even just like sdlvideosink does Modified files: sys/xvideo : xvideosink.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/sys/xvideo/xvideosink.c.diff?r1=1.18&r2=1.19 ====Begin Diffs==== Index: xvideosink.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/sys/xvideo/xvideosink.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- xvideosink.c 13 Jul 2002 23:13:43 -0000 1.18 +++ xvideosink.c 8 Aug 2002 19:57:20 -0000 1.19 @@ -396,6 +396,7 @@ GstXVideoSink *xvideosink; GstClockTime time = GST_BUFFER_TIMESTAMP (buf); gint64 jitter; + static gboolean first = TRUE; g_return_if_fail (pad != NULL); g_return_if_fail (GST_IS_PAD (pad)); @@ -403,6 +404,24 @@ xvideosink = GST_XVIDEOSINK (gst_pad_get_parent (pad)); + if (GST_IS_EVENT (buf)) { + GstEvent *event = GST_EVENT (buf); + gint64 offset; + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_DISCONTINUOUS: + offset = GST_EVENT_DISCONT_OFFSET (event, 0).value; + g_print ("xvideo discont %lld\n", offset); + gst_clock_handle_discont (xvideosink->clock, (guint64) GST_EVENT_DISCONT_OFFSET (event, 0).value); + break; + default: + gst_pad_event_default (pad, event); + break; + } + gst_event_unref (event); + return; + } + if (xvideosink->clock && time != -1) { GstClockReturn ret; @@ -458,6 +477,11 @@ xvideosink->send_xid = FALSE; } g_signal_emit (G_OBJECT (xvideosink), gst_xvideosink_signals[SIGNAL_FRAME_DISPLAYED], 0); + + if (first) { + g_print ("xvideosink: %d %d\n",xvideosink->width, xvideosink->height); + first = FALSE; + } gst_buffer_unref (buf); } |