mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
systemclock: make more stuff private
This commit is contained in:
parent
10056f1833
commit
8909205b85
2 changed files with 12 additions and 12 deletions
|
@ -65,6 +65,10 @@
|
||||||
|
|
||||||
struct _GstSystemClockPrivate
|
struct _GstSystemClockPrivate
|
||||||
{
|
{
|
||||||
|
GThread *thread; /* thread for async notify */
|
||||||
|
gboolean stopping;
|
||||||
|
|
||||||
|
|
||||||
GstClockType clock_type;
|
GstClockType clock_type;
|
||||||
GstPoll *timer;
|
GstPoll *timer;
|
||||||
gint wakeup_count; /* the number of entries with a pending wakeup */
|
gint wakeup_count; /* the number of entries with a pending wakeup */
|
||||||
|
@ -195,7 +199,7 @@ gst_system_clock_dispose (GObject * object)
|
||||||
|
|
||||||
/* else we have to stop the thread */
|
/* else we have to stop the thread */
|
||||||
GST_OBJECT_LOCK (clock);
|
GST_OBJECT_LOCK (clock);
|
||||||
sysclock->stopping = TRUE;
|
sysclock->priv->stopping = TRUE;
|
||||||
/* unschedule all entries */
|
/* unschedule all entries */
|
||||||
for (entries = clock->entries; entries; entries = g_list_next (entries)) {
|
for (entries = clock->entries; entries; entries = g_list_next (entries)) {
|
||||||
GstClockEntry *entry = (GstClockEntry *) entries->data;
|
GstClockEntry *entry = (GstClockEntry *) entries->data;
|
||||||
|
@ -207,9 +211,9 @@ gst_system_clock_dispose (GObject * object)
|
||||||
gst_system_clock_add_wakeup (sysclock);
|
gst_system_clock_add_wakeup (sysclock);
|
||||||
GST_OBJECT_UNLOCK (clock);
|
GST_OBJECT_UNLOCK (clock);
|
||||||
|
|
||||||
if (sysclock->thread)
|
if (sysclock->priv->thread)
|
||||||
g_thread_join (sysclock->thread);
|
g_thread_join (sysclock->priv->thread);
|
||||||
sysclock->thread = NULL;
|
sysclock->priv->thread = NULL;
|
||||||
GST_CAT_DEBUG (GST_CAT_CLOCK, "joined thread");
|
GST_CAT_DEBUG (GST_CAT_CLOCK, "joined thread");
|
||||||
|
|
||||||
g_list_foreach (clock->entries, (GFunc) gst_clock_id_unref, NULL);
|
g_list_foreach (clock->entries, (GFunc) gst_clock_id_unref, NULL);
|
||||||
|
@ -372,7 +376,7 @@ gst_system_clock_async_thread (GstClock * clock)
|
||||||
/* signal spinup */
|
/* signal spinup */
|
||||||
GST_CLOCK_BROADCAST (clock);
|
GST_CLOCK_BROADCAST (clock);
|
||||||
/* now enter our (almost) infinite loop */
|
/* now enter our (almost) infinite loop */
|
||||||
while (!sysclock->stopping) {
|
while (!sysclock->priv->stopping) {
|
||||||
GstClockEntry *entry;
|
GstClockEntry *entry;
|
||||||
GstClockTime requested;
|
GstClockTime requested;
|
||||||
GstClockReturn res;
|
GstClockReturn res;
|
||||||
|
@ -384,7 +388,7 @@ gst_system_clock_async_thread (GstClock * clock)
|
||||||
GST_CLOCK_WAIT (clock);
|
GST_CLOCK_WAIT (clock);
|
||||||
GST_CAT_DEBUG (GST_CAT_CLOCK, "got signal");
|
GST_CAT_DEBUG (GST_CAT_CLOCK, "got signal");
|
||||||
/* clock was stopping, exit */
|
/* clock was stopping, exit */
|
||||||
if (sysclock->stopping)
|
if (sysclock->priv->stopping)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,10 +733,10 @@ gst_system_clock_start_async (GstSystemClock * clock)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
if (G_LIKELY (clock->thread != NULL))
|
if (G_LIKELY (clock->priv->thread != NULL))
|
||||||
return TRUE; /* Thread already running. Nothing to do */
|
return TRUE; /* Thread already running. Nothing to do */
|
||||||
|
|
||||||
clock->thread = g_thread_try_new ("GstSystemClock",
|
clock->priv->thread = g_thread_try_new ("GstSystemClock",
|
||||||
(GThreadFunc) gst_system_clock_async_thread, clock, &error);
|
(GThreadFunc) gst_system_clock_async_thread, clock, &error);
|
||||||
|
|
||||||
if (G_UNLIKELY (error))
|
if (G_UNLIKELY (error))
|
||||||
|
|
|
@ -64,10 +64,6 @@ struct _GstSystemClock {
|
||||||
GstClock clock;
|
GstClock clock;
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GThread *thread; /* thread for async notify */
|
|
||||||
gboolean stopping;
|
|
||||||
|
|
||||||
/* ABI added */
|
|
||||||
GstSystemClockPrivate *priv;
|
GstSystemClockPrivate *priv;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
|
|
Loading…
Reference in a new issue