Moved clock set/get to class functions.

Original commit message from CVS:
Moved clock set/get to class functions.
This commit is contained in:
Wim Taymans 2002-11-27 20:54:42 +00:00
parent 56d167f25c
commit 15c9d99874
2 changed files with 6 additions and 3 deletions

View file

@ -60,6 +60,8 @@ enum {
static void gst_sdlvideosink_class_init (GstSDLVideoSinkClass *klass);
static void gst_sdlvideosink_init (GstSDLVideoSink *sdlvideosink);
static void gst_sdlvideosink_set_clock (GstElement *element, GstClock *clock);
static gboolean gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink,
gboolean showlogo);
static GstPadConnectReturn gst_sdlvideosink_sinkconnect (GstPad *pad,
@ -152,6 +154,7 @@ gst_sdlvideosink_class_init (GstSDLVideoSinkClass *klass)
gstelement_class->change_state = gst_sdlvideosink_change_state;
gstelement_class->set_clock = gst_sdlvideosink_set_clock;
}
@ -188,7 +191,6 @@ gst_sdlvideosink_init (GstSDLVideoSink *sdlvideosink)
sdlvideosink->capslist = capslist;
sdlvideosink->clock = NULL;
GST_ELEMENT (sdlvideosink)->setclockfunc = gst_sdlvideosink_set_clock;
GST_FLAG_SET(sdlvideosink, GST_ELEMENT_THREAD_SUGGESTED);
GST_FLAG_SET(sdlvideosink, GST_ELEMENT_EVENT_AWARE);
@ -433,7 +435,7 @@ gst_sdlvideosink_chain (GstPad *pad, GstBuffer *buf)
case GST_EVENT_DISCONTINUOUS:
offset = GST_EVENT_DISCONT_OFFSET (event, 0).value;
g_print ("sdl discont %lld\n", offset);
gst_clock_handle_discont (sdlvideosink->clock, (guint64) GST_EVENT_DISCONT_OFFSET (event, 0).value);
//gst_clock_handle_discont (sdlvideosink->clock, (guint64) GST_EVENT_DISCONT_OFFSET (event, 0).value);
break;
default:
gst_pad_event_default (pad, event);

View file

@ -269,6 +269,8 @@ play_on_demand_class_init (GstPlayOnDemandClass *klass)
gobject_class->set_property = play_on_demand_set_property;
gobject_class->get_property = play_on_demand_get_property;
gstelement_class->set_clock = play_on_demand_set_clock;
}
static void
@ -297,7 +299,6 @@ play_on_demand_init (GstPlayOnDemand *filter)
filter->play_from_beginning = TRUE;
filter->silent = TRUE;
GST_ELEMENT (filter)->setclockfunc = play_on_demand_set_clock;
filter->clock = NULL;
filter->last_time = 0;