mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
clock: remove _full version
Rename gst_clock_id_wait_async_full() to gst_clock_id_wait_async() and remove the old gst_clock_id_wait_async() version.
This commit is contained in:
parent
ac54190c29
commit
d7d5306009
7 changed files with 30 additions and 52 deletions
|
@ -361,6 +361,10 @@ The 0.11 porting guide
|
|||
gst_caps_union() -> gst_caps_merge(): Be careful because _merge takes
|
||||
ownership of the arguments.
|
||||
|
||||
* GstClock
|
||||
gst_clock_id_wait_async_full() was renamed to gst_clock_id_wait_async() and
|
||||
the old gst_clock_id_wait_async() function was removed.
|
||||
|
||||
* GstSegment
|
||||
abs_rate was removed from the public fields, it can be trivially calculated
|
||||
from the rate field.
|
||||
|
|
|
@ -539,7 +539,7 @@ not_supported:
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_clock_id_wait_async_full:
|
||||
* gst_clock_id_wait_async:
|
||||
* @id: a #GstClockID to wait on
|
||||
* @func: The callback function
|
||||
* @user_data: User data passed in the callback
|
||||
|
@ -561,7 +561,7 @@ not_supported:
|
|||
* Since: 0.10.30
|
||||
*/
|
||||
GstClockReturn
|
||||
gst_clock_id_wait_async_full (GstClockID id,
|
||||
gst_clock_id_wait_async (GstClockID id,
|
||||
GstClockCallback func, gpointer user_data, GDestroyNotify destroy_data)
|
||||
{
|
||||
GstClockEntry *entry;
|
||||
|
@ -609,32 +609,6 @@ not_supported:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_clock_id_wait_async:
|
||||
* @id: a #GstClockID to wait on
|
||||
* @func: The callback function
|
||||
* @user_data: User data passed in the callback
|
||||
*
|
||||
* Register a callback on the given #GstClockID @id with the given
|
||||
* function and user_data. When passing a #GstClockID with an invalid
|
||||
* time to this function, the callback will be called immediately
|
||||
* with a time set to GST_CLOCK_TIME_NONE. The callback will
|
||||
* be called when the time of @id has been reached.
|
||||
*
|
||||
* The callback @func can be invoked from any thread, either provided by the
|
||||
* core or from a streaming thread. The application should be prepared for this.
|
||||
*
|
||||
* Returns: the result of the non blocking wait.
|
||||
*
|
||||
* MT safe.
|
||||
*/
|
||||
GstClockReturn
|
||||
gst_clock_id_wait_async (GstClockID id,
|
||||
GstClockCallback func, gpointer user_data)
|
||||
{
|
||||
return gst_clock_id_wait_async_full (id, func, user_data, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_clock_id_unschedule:
|
||||
* @id: The id to unschedule
|
||||
|
@ -1178,7 +1152,7 @@ gst_clock_set_master (GstClock * clock, GstClock * master)
|
|||
* clock calibration. */
|
||||
priv->clockid = gst_clock_new_periodic_id (master,
|
||||
gst_clock_get_time (master), priv->timeout);
|
||||
gst_clock_id_wait_async_full (priv->clockid,
|
||||
gst_clock_id_wait_async (priv->clockid,
|
||||
(GstClockCallback) gst_clock_slave_callback,
|
||||
gst_object_ref (clock), (GDestroyNotify) gst_object_unref);
|
||||
}
|
||||
|
|
|
@ -508,9 +508,6 @@ GstClockTime gst_clock_id_get_time (GstClockID id);
|
|||
GstClockReturn gst_clock_id_wait (GstClockID id,
|
||||
GstClockTimeDiff *jitter);
|
||||
GstClockReturn gst_clock_id_wait_async (GstClockID id,
|
||||
GstClockCallback func,
|
||||
gpointer user_data);
|
||||
GstClockReturn gst_clock_id_wait_async_full (GstClockID id,
|
||||
GstClockCallback func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy_data);
|
||||
|
|
|
@ -124,9 +124,9 @@ gst_meta_api_type_has_tag (GType api, GQuark tag)
|
|||
* @api: the type of the #GstMeta API
|
||||
* @impl: the name of the #GstMeta implementation
|
||||
* @size: the size of the #GstMeta structure
|
||||
* @init_func: a #GstMetaInitFunction
|
||||
* @free_func: a #GstMetaFreeFunction
|
||||
* @transform_func: a #GstMetaTransformFunction
|
||||
* @init_func: (scope async) a #GstMetaInitFunction
|
||||
* @free_func: (scope async) a #GstMetaFreeFunction
|
||||
* @transform_func: (scope async) a #GstMetaTransformFunction
|
||||
*
|
||||
* Register a new #GstMeta implementation.
|
||||
*
|
||||
|
|
|
@ -150,7 +150,7 @@ GST_START_TEST (test_single_shot)
|
|||
|
||||
id = gst_clock_new_single_shot_id (clock, base + 2 * TIME_UNIT);
|
||||
GST_DEBUG ("waiting one second async id %p", id);
|
||||
result = gst_clock_id_wait_async (id, ok_callback, NULL);
|
||||
result = gst_clock_id_wait_async (id, ok_callback, NULL, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
g_usleep (TIME_UNIT / (2 * 1000));
|
||||
gst_clock_id_unschedule (id);
|
||||
|
@ -158,7 +158,7 @@ GST_START_TEST (test_single_shot)
|
|||
|
||||
id = gst_clock_new_single_shot_id (clock, base + 5 * TIME_UNIT);
|
||||
GST_DEBUG ("waiting one second async, with cancel on id %p", id);
|
||||
result = gst_clock_id_wait_async (id, error_callback, NULL);
|
||||
result = gst_clock_id_wait_async (id, error_callback, NULL, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
g_usleep (TIME_UNIT / (2 * 1000));
|
||||
GST_DEBUG ("cancel id %p after half a time unit", id);
|
||||
|
@ -170,11 +170,11 @@ GST_START_TEST (test_single_shot)
|
|||
id = gst_clock_new_single_shot_id (clock, base + 5 * TIME_UNIT);
|
||||
id2 = gst_clock_new_single_shot_id (clock, base + 6 * TIME_UNIT);
|
||||
GST_DEBUG ("waiting id %p", id);
|
||||
result = gst_clock_id_wait_async (id, ok_callback, NULL);
|
||||
result = gst_clock_id_wait_async (id, ok_callback, NULL, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
|
||||
GST_DEBUG ("waiting id %p", id2);
|
||||
result = gst_clock_id_wait_async (id2, error_callback, NULL);
|
||||
result = gst_clock_id_wait_async (id2, error_callback, NULL, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
g_usleep (TIME_UNIT / (2 * 1000));
|
||||
GST_DEBUG ("cancel id %p after half a time unit", id2);
|
||||
|
@ -221,12 +221,12 @@ GST_START_TEST (test_periodic_shot)
|
|||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
|
||||
GST_DEBUG ("waiting for the next async %p", id);
|
||||
result = gst_clock_id_wait_async (id, ok_callback, NULL);
|
||||
result = gst_clock_id_wait_async (id, ok_callback, NULL, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
g_usleep (TIME_UNIT / (2 * 1000));
|
||||
|
||||
GST_DEBUG ("waiting some more for the next async %p", id);
|
||||
result = gst_clock_id_wait_async (id, ok_callback, NULL);
|
||||
result = gst_clock_id_wait_async (id, ok_callback, NULL, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
g_usleep (TIME_UNIT / (2 * 1000));
|
||||
|
||||
|
@ -234,7 +234,7 @@ GST_START_TEST (test_periodic_shot)
|
|||
fail_unless (id2 != NULL, "Could not create second periodic id");
|
||||
|
||||
GST_DEBUG ("waiting some more for another async %p", id2);
|
||||
result = gst_clock_id_wait_async (id2, ok_callback, NULL);
|
||||
result = gst_clock_id_wait_async (id2, ok_callback, NULL, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
g_usleep (TIME_UNIT / (2 * 1000));
|
||||
|
||||
|
@ -242,7 +242,7 @@ GST_START_TEST (test_periodic_shot)
|
|||
gst_clock_id_unschedule (id);
|
||||
|
||||
/* entry cannot be used again */
|
||||
result = gst_clock_id_wait_async (id, error_callback, NULL);
|
||||
result = gst_clock_id_wait_async (id, error_callback, NULL, NULL);
|
||||
fail_unless (result == GST_CLOCK_UNSCHEDULED,
|
||||
"Waiting did not return UNSCHEDULED");
|
||||
result = gst_clock_id_wait (id, NULL);
|
||||
|
@ -278,10 +278,10 @@ GST_START_TEST (test_async_order)
|
|||
|
||||
id1 = gst_clock_new_single_shot_id (clock, base + 2 * TIME_UNIT);
|
||||
id2 = gst_clock_new_single_shot_id (clock, base + 1 * TIME_UNIT);
|
||||
result = gst_clock_id_wait_async (id1, store_callback, &cb_list);
|
||||
result = gst_clock_id_wait_async (id1, store_callback, &cb_list, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
g_usleep (TIME_UNIT / (2 * 1000));
|
||||
result = gst_clock_id_wait_async (id2, store_callback, &cb_list);
|
||||
result = gst_clock_id_wait_async (id2, store_callback, &cb_list, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
g_usleep (TIME_UNIT / 1000);
|
||||
/* at this point at least one of the timers should have timed out */
|
||||
|
@ -379,7 +379,7 @@ GST_START_TEST (test_async_sync_interaction)
|
|||
g_mutex_unlock (td.lock);
|
||||
|
||||
result = gst_clock_id_wait_async (td.async_id,
|
||||
test_async_sync_interaction_cb, &td);
|
||||
test_async_sync_interaction_cb, &td, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
|
||||
/* Wait 10ms, then unschedule async_id and schedule async_id2 */
|
||||
|
@ -388,13 +388,13 @@ GST_START_TEST (test_async_sync_interaction)
|
|||
"Waiting did not return OK or EARLY");
|
||||
/* async_id2 is earlier than async_id - should become head of the queue */
|
||||
result = gst_clock_id_wait_async (td.async_id2,
|
||||
test_async_sync_interaction_cb, &td);
|
||||
test_async_sync_interaction_cb, &td, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
gst_clock_id_unschedule (td.async_id);
|
||||
|
||||
/* async_id3 is earlier than async_id2 - should become head of the queue */
|
||||
result = gst_clock_id_wait_async (td.async_id3,
|
||||
test_async_sync_interaction_cb, &td);
|
||||
test_async_sync_interaction_cb, &td, NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
|
||||
|
||||
/* While this is sleeping, the async3 id should fire and unschedule it */
|
||||
|
@ -444,7 +444,8 @@ GST_START_TEST (test_periodic_multi)
|
|||
clock_id_async =
|
||||
gst_clock_new_periodic_id (clock, base + TIME_UNIT, TIME_UNIT);
|
||||
result =
|
||||
gst_clock_id_wait_async (clock_id_async, notify_callback, &got_callback);
|
||||
gst_clock_id_wait_async (clock_id_async, notify_callback, &got_callback,
|
||||
NULL);
|
||||
fail_unless (result == GST_CLOCK_OK, "Async waiting did not return OK");
|
||||
|
||||
result = gst_clock_id_wait (clock_id, NULL);
|
||||
|
@ -544,7 +545,7 @@ GST_START_TEST (test_mixed)
|
|||
g_usleep (G_USEC_PER_SEC / 2);
|
||||
|
||||
/* start scheduling the entry */
|
||||
gst_clock_id_wait_async (id, mixed_async_cb, NULL);
|
||||
gst_clock_id_wait_async (id, mixed_async_cb, NULL, NULL);
|
||||
|
||||
/* wait for thread to finish */
|
||||
g_thread_join (thread);
|
||||
|
@ -609,7 +610,7 @@ GST_START_TEST (test_async_full)
|
|||
g_mutex_lock (af_lock);
|
||||
clockid = gst_clock_new_periodic_id (master,
|
||||
gst_clock_get_time (master), gst_clock_get_timeout (slave));
|
||||
gst_clock_id_wait_async_full (clockid,
|
||||
gst_clock_id_wait_async (clockid,
|
||||
(GstClockCallback) test_async_full_slave_callback,
|
||||
gst_object_ref (slave), (GDestroyNotify) gst_object_unref);
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@ EXPORTS
|
|||
gst_net_address_meta_get_info
|
||||
gst_net_client_clock_get_type
|
||||
gst_net_client_clock_new
|
||||
gst_net_time_packet_copy
|
||||
gst_net_time_packet_free
|
||||
gst_net_time_packet_get_type
|
||||
gst_net_time_packet_new
|
||||
gst_net_time_packet_receive
|
||||
gst_net_time_packet_send
|
||||
|
|
|
@ -241,7 +241,6 @@ EXPORTS
|
|||
gst_clock_id_unschedule
|
||||
gst_clock_id_wait
|
||||
gst_clock_id_wait_async
|
||||
gst_clock_id_wait_async_full
|
||||
gst_clock_new_periodic_id
|
||||
gst_clock_new_single_shot_id
|
||||
gst_clock_periodic_id_reinit
|
||||
|
|
Loading…
Reference in a new issue