}
} else {
/* buffering busy */
- if (buffering == FALSE && target_state == GST_STATE_PLAYING) {
+ if (!buffering && target_state == GST_STATE_PLAYING) {
/* we were not buffering but PLAYING, PAUSE the pipeline. */
gst_element_set_state (pipeline, GST_STATE_PAUSED);
}
if (percent < 100) {
/* buffering busy */
- if (is_buffering == FALSE) {
+ if (!is_buffering) {
is_buffering = TRUE;
if (target_state == GST_STATE_PLAYING) {
/* we were not buffering but PLAYING, PAUSE the pipeline. */
{
GstElement *pipeline = user_data;
- if (is_buffering == FALSE)
+ if (!is_buffering)
gst_element_set_state (pipeline, target_state);
else
g_timeout_add (500, buffer_timeout, pipeline);
fold->max = max;
else if (max < fold->max)
fold->max = max;
- if (fold->live == FALSE)
+ if (!fold->live)
fold->live = live;
}
} else {
if ((GST_MESSAGE_TYPE (message) & types) != 0) {
/* Extra check to ensure extended types don't get matched unless
* asked for */
- if ((GST_MESSAGE_TYPE_IS_EXTENDED (message) == FALSE)
+ if ((!GST_MESSAGE_TYPE_IS_EXTENDED (message))
|| (types & GST_MESSAGE_EXTENDED)) {
/* exit the loop, we have a message */
goto beach;
gst_control_binding_is_disabled (GstControlBinding * binding)
{
g_return_val_if_fail (GST_IS_CONTROL_BINDING (binding), TRUE);
- return (binding->disabled == TRUE);
+ return ! !binding->disabled;
}
{
GstDeviceMonitor *self = GST_DEVICE_MONITOR (object);
- g_return_if_fail (self->priv->started == FALSE);
+ g_return_if_fail (!self->priv->started);
if (self->priv->providers) {
while (self->priv->providers->len)
GstPad *pad, *internal;
g_return_val_if_fail (GST_IS_GHOST_PAD (gpad), FALSE);
- g_return_val_if_fail (GST_GHOST_PAD_PRIVATE (gpad)->constructed == FALSE,
- FALSE);
+ g_return_val_if_fail (!GST_GHOST_PAD_PRIVATE (gpad)->constructed, FALSE);
g_object_get (gpad, "direction", &dir, "template", &templ, NULL);
g_assert (list);
- if (reset == TRUE)
+ if (reset)
gst_debug_set_default_threshold (0);
split = g_strsplit (list, ",", 0);
GST_CAT_DEBUG (GST_CAT_PLUGIN_LOADING, "attempt to load plugin \"%s\"",
filename);
- if (g_module_supported () == FALSE) {
+ if (!g_module_supported ()) {
GST_CAT_DEBUG (GST_CAT_PLUGIN_LOADING, "module loading not supported");
g_set_error (error,
GST_PLUGIN_ERROR,
s++;
ret = gst_structure_parse_value (s, &s, &value1, type);
- if (ret == FALSE)
+ if (!ret)
return FALSE;
while (g_ascii_isspace (*s))
s++;
ret = gst_structure_parse_value (s, &s, &value2, type);
- if (ret == FALSE)
+ if (!ret)
return FALSE;
while (g_ascii_isspace (*s))
s++;
ret = gst_structure_parse_value (s, &s, &value3, type);
- if (ret == FALSE)
+ if (!ret)
return FALSE;
while (g_ascii_isspace (*s))
}
ret = gst_structure_parse_value (s, &s, &list_value, type);
- if (ret == FALSE)
+ if (!ret)
return FALSE;
g_array_append_val (array, list_value);
memset (&list_value, 0, sizeof (list_value));
ret = gst_structure_parse_value (s, &s, &list_value, type);
- if (ret == FALSE)
+ if (!ret)
return FALSE;
g_array_append_val (array, list_value);
if (clock == NULL) {
GST_CAT_DEBUG (GST_CAT_CLOCK, "creating new static system clock");
- g_assert (_external_default_clock == FALSE);
+ g_assert (!_external_default_clock);
clock = g_object_new (GST_TYPE_SYSTEM_CLOCK,
"name", "GstSystemClock", NULL);
if (diff <= 0) {
/* timeout, this is fine, we can report success now */
- if (G_UNLIKELY (!CAS_ENTRY_STATUS (entry, GST_CLOCK_DONE, GST_CLOCK_OK))) {
- GST_CAT_DEBUG (GST_CAT_CLOCK, "unexpected status for entry %p", entry);
+ if (G_UNLIKELY (!CAS_ENTRY_STATUS (entry, GST_CLOCK_DONE,
+ GST_CLOCK_OK))) {
+ GST_CAT_DEBUG (GST_CAT_CLOCK, "unexpected status for entry %p",
+ entry);
status = GET_ENTRY_STATUS (entry);
goto done;
} else {
/* assume we will use the clock for getting the current position */
with_clock = TRUE;
- if (basesink->sync == FALSE)
+ if (!basesink->sync)
with_clock = FALSE;
/* and we need a clock */
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
GST_OBJECT_LOCK (trans);
- if (passthrough == FALSE) {
+ if (!passthrough) {
if (bclass->transform_ip || bclass->transform)
trans->priv->passthrough = FALSE;
} else {
pads->priv->numpads, GST_DEBUG_FUNCPTR_NAME (func));
if (G_UNLIKELY (g_atomic_int_compare_and_exchange (&pads->priv->seeking,
- TRUE, FALSE) == TRUE)) {
+ TRUE, FALSE))) {
GST_INFO_OBJECT (pads, "finished seeking");
}
do {
GST_DEBUG_FUNCPTR_NAME (func));
if (G_UNLIKELY (g_atomic_int_compare_and_exchange (&pads->priv->seeking,
- TRUE, FALSE) == TRUE)) {
+ TRUE, FALSE))) {
GST_INFO_OBJECT (pads, "finished seeking");
}
flow_ret = func (pads, user_data);
{
if (g_atomic_int_get (&pads->priv->seeking)) {
/* drop all but the first FLUSH_STARTs when seeking */
- if (g_atomic_int_compare_and_exchange (&pads->priv->pending_flush_start,
- TRUE, FALSE) == FALSE)
+ if (!g_atomic_int_compare_and_exchange (&pads->
+ priv->pending_flush_start, TRUE, FALSE))
goto eat;
/* unblock collect pads */
* Since: 1.6
*/
void
-gst_check_objects_destroyed_on_unref (gpointer object_to_unref, gpointer first_object, ...)
+gst_check_objects_destroyed_on_unref (gpointer object_to_unref,
+ gpointer first_object, ...)
{
GObject *object;
GList *objs = NULL, *tmp;
for (tmp = objs; tmp; tmp = tmp->next) {
DestroyedObjectStruct *destroyed = tmp->data;
- if (destroyed->destroyed == FALSE) {
- fail_unless (destroyed->destroyed == TRUE,
+ if (!destroyed->destroyed) {
+ fail_unless (destroyed->destroyed,
"%s_%p is not destroyed, %d refcounts left!",
- GST_IS_OBJECT (destroyed->object) ? GST_OBJECT_NAME (destroyed->object) :
- G_OBJECT_TYPE_NAME (destroyed),
- destroyed->object, destroyed->object->ref_count);
+ GST_IS_OBJECT (destroyed->
+ object) ? GST_OBJECT_NAME (destroyed->object) :
+ G_OBJECT_TYPE_NAME (destroyed), destroyed->object,
+ destroyed->object->ref_count);
}
g_slice_free (DestroyedObjectStruct, tmp->data);
}
g_usleep (1); \
} G_STMT_END;
-#define THREAD_TEST_RUNNING() (_gst_check_threads_running == TRUE)
+#define THREAD_TEST_RUNNING() (!!_gst_check_threads_running)
/* additional assertions */
#define ASSERT_CRITICAL(code) \
* g_assert_cmpint (GST_BUFFER_TIMESTAMP (buf), ==, latency);
* gst_buffer_unref (buf);
* GST_INFO ("Check that element does not wait for any clock notification\n");
- * g_assert (gst_test_clock_peek_next_pending_id (test_clock, NULL) == FALSE);
+ * g_assert (!gst_test_clock_peek_next_pending_id (test_clock, NULL));
*
* GST_INFO ("Set time, create and push the second buffer\n");
* gst_test_clock_advance_time (test_clock, 10 * GST_SECOND);
* 10 * GST_SECOND + latency + 7 * GST_MSECOND);
* gst_buffer_unref (buf);
* GST_INFO ("Check that element does not wait for any clock notification\n");
- * g_assert (gst_test_clock_peek_next_pending_id (test_clock, NULL) == FALSE);
+ * g_assert (!gst_test_clock_peek_next_pending_id (test_clock, NULL));
* ...
* </programlisting>
* </example>
for (item = element->sinkpads; item != NULL; item = g_list_next (item)) {
GstFunnelPad *sinkpad = GST_FUNNEL_PAD_CAST (item->data);
- if (sinkpad->got_eos == FALSE) {
+ if (!sinkpad->got_eos) {
return FALSE;
}
}
}
if (identity->single_segment && (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT)) {
- if (trans->have_segment == FALSE) {
+ if (!trans->have_segment) {
GstEvent *news;
GstSegment segment;
resmax = max;
else if (max < resmax)
resmax = max;
- if (reslive == FALSE)
+ if (!reslive)
reslive = live;
}
}
return FALSE;
}
-#if defined(G_OS_WIN32) /* G_OS_UNIX */
+#if defined(G_OS_WIN32) /* G_OS_UNIX */
static BOOL WINAPI
w32_intr_handler (DWORD dwCtrlType)
{
goto exit;
} else {
/* buffering busy */
- if (buffering == FALSE && target_state == GST_STATE_PLAYING) {
+ if (!buffering && target_state == GST_STATE_PLAYING) {
/* we were not buffering but PLAYING, PAUSE the pipeline. */
PRINT (_("Buffering, setting pipeline to PAUSED ...\n"));
gst_element_set_state (pipeline, GST_STATE_PAUSED);