From: <so...@fr...> - 2004-11-28 13:35:30
|
CVS Root: /cvs/gstreamer Module: gst-plugins Changes by: soto Date: Sun Nov 28 2004 05:35:56 PST Log message: 2004-11-28 Martin Soto <mar...@us...> * ext/alsa/gstalsasink.c (gst_alsa_sink_loop): * ext/alsa/gstalsa.h: * ext/alsa/gstalsa.c (gst_alsa_set_clock): Make alsasink actually honor gst_element_set_clock and use that clock instead of ist internal one. Modified files: . : ChangeLog ext/alsa : gstalsa.c gstalsa.h gstalsasink.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.1336&r2=1.1337 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/alsa/gstalsa.c.diff?r1=1.127&r2=1.128 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/alsa/gstalsa.h.diff?r1=1.43&r2=1.44 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/alsa/gstalsasink.c.diff?r1=1.33&r2=1.34 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.1336 retrieving revision 1.1337 diff -u -d -r1.1336 -r1.1337 --- ChangeLog 27 Nov 2004 20:28:27 -0000 1.1336 +++ ChangeLog 28 Nov 2004 13:35:43 -0000 1.1337 @@ -1,3 +1,11 @@ +2004-11-28 Martin Soto <mar...@us...> + + * ext/alsa/gstalsasink.c (gst_alsa_sink_loop): + * ext/alsa/gstalsa.h: + * ext/alsa/gstalsa.c (gst_alsa_set_clock): + Make alsasink actually honor gst_element_set_clock and use that + clock instead of ist internal one. 2004-11-27 Christophe Fergeau <te...@gn...> * gst/playback/gstplaybasebin.c: (setup_source): fixed a caps leak Index: gstalsa.c RCS file: /cvs/gstreamer/gst-plugins/ext/alsa/gstalsa.c,v retrieving revision 1.127 retrieving revision 1.128 diff -u -d -r1.127 -r1.128 --- gstalsa.c 26 Nov 2004 11:47:24 -0000 1.127 +++ gstalsa.c 28 Nov 2004 13:35:44 -0000 1.128 @@ -1213,7 +1213,9 @@ static void gst_alsa_set_clock (GstElement * element, GstClock * clock) -{ /* we need this function just so everybody knows we use a clock */ +{ + /* we need this function just so everybody knows we use a clock */ + GST_ALSA (element)->ext_clock = clock; } /*** AUDIO PROCESSING *********************************************************/ Index: gstalsa.h RCS file: /cvs/gstreamer/gst-plugins/ext/alsa/gstalsa.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- gstalsa.h 24 Jun 2004 12:53:17 -0000 1.43 +++ gstalsa.h 28 Nov 2004 13:35:44 -0000 1.44 @@ -156,6 +156,7 @@ /* clocking */ GstAlsaClock * clock; /* our provided clock */ + GstClock * ext_clock; /* externally set clock. */ snd_pcm_uframes_t played; /* samples transmitted since last sync This thing actually is our master clock. We will event insert silent samples or Index: gstalsasink.c RCS file: /cvs/gstreamer/gst-plugins/ext/alsa/gstalsasink.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- gstalsasink.c 13 Nov 2004 01:08:31 -0000 1.33 +++ gstalsasink.c 28 Nov 2004 13:35:44 -0000 1.34 @@ -405,7 +405,7 @@ * assumes that both calls return the same value. However they can be * wildly different, since snd_pcm_delay goes deep into the kernel. */ - if (gst_element_get_clock (element) == GST_CLOCK (this->clock)) { + if (this->ext_clock == GST_CLOCK (this->clock)) { /* FIXME: this is ugly because of the variables it uses but I * don't know a better way to get this info */ if (element->base_time > this->clock->start_time) { |