alsa = GST_ALSA_SRC (asrc);
CHECK (snd_pcm_open (&alsa->handle, alsa->device, SND_PCM_STREAM_CAPTURE,
- (alsa->driver_timestamps == TRUE) ? 0 : SND_PCM_NONBLOCK),
- open_error);
+ (alsa->driver_timestamps) ? 0 : SND_PCM_NONBLOCK), open_error);
return TRUE;
GST_DEBUG_OBJECT (oggpad->collect.pad,
"oggpad %p eos %d", oggpad, oggpad->eos);
- if (oggpad->eos == FALSE)
+ if (!oggpad->eos)
return FALSE;
walk = g_slist_next (walk);
{
gint res;
- g_assert (vd->initialized == FALSE);
+ g_assert (!vd->initialized);
#ifdef USE_TREMOLO
if (G_UNLIKELY ((res = vorbis_dsp_init (&vd->vd, &vd->vi))))
buf->acquired = FALSE;
/* if this fails, something is wrong in this file */
- g_assert (buf->open == TRUE);
+ g_assert (buf->open);
rclass = GST_AUDIO_RING_BUFFER_GET_CLASS (buf);
if (G_LIKELY (rclass->release))
if (G_UNLIKELY (!buf->acquired))
goto not_acquired;
- if (G_UNLIKELY (g_atomic_int_get (&buf->may_start) == FALSE))
+ if (G_UNLIKELY (!g_atomic_int_get (&buf->may_start)))
goto may_not_start;
/* if stopped, set to started */
if (G_UNLIKELY (g_atomic_int_get (&buf->state) !=
GST_AUDIO_RING_BUFFER_STATE_STARTED)) {
/* see if we are allowed to start it */
- if (G_UNLIKELY (g_atomic_int_get (&buf->may_start) == FALSE))
+ if (G_UNLIKELY (!g_atomic_int_get (&buf->may_start)))
goto no_start;
GST_DEBUG_OBJECT (buf, "start!");
g_mutex_lock (&watch->mutex);
watch->flushing = flushing;
g_cond_signal (&watch->queue_not_full);
- if (flushing == TRUE) {
+ if (flushing) {
g_queue_foreach (watch->messages, (GFunc) gst_rtsp_rec_free, NULL);
g_queue_clear (watch->messages);
}
need_sub = TRUE;
}
- if (need_sub == TRUE) {
+ if (need_sub) {
if (out_size != bsize || !gst_buffer_is_writable (buf)) {
GstBuffer *sub;
field = g_convert (data, data_size, "UTF-8", in_encode, NULL, NULL, NULL);
- if (field == NULL || g_utf8_validate (field, -1, NULL) == FALSE) {
+ if (field == NULL || !g_utf8_validate (field, -1, NULL)) {
/* As a fallback, try interpreting UTF-16 in the other endianness */
if (in_encode == utf16beenc)
field = g_convert (data, data_size, "UTF-8", utf16leenc,
if (active) {
const GstStructure *s = gst_message_get_structure (message);
- if (gst_structure_get_boolean (s, "active", active) == FALSE)
+ if (!gst_structure_get_boolean (s, "active", active))
return FALSE;
}
/* make sure only one cache frees the allocator */
notify = NULL;
- if (cache->pass_alloc == FALSE) {
+ if (!cache->pass_alloc) {
/* can't pass allocator, make new temp line allocator */
user_data =
converter_alloc_new (sizeof (guint16) * width * 4, n_lines + BACKLOG,
if (G_UNLIKELY (adder->info.finfo->format == GST_AUDIO_FORMAT_UNKNOWN))
goto not_negotiated;
- if (adder->flush_stop_pending == TRUE) {
+ if (adder->flush_stop_pending) {
GST_INFO_OBJECT (adder->srcpad, "send pending flush stop event");
if (!gst_pad_push_event (adder->srcpad, gst_event_new_flush_stop (TRUE))) {
GST_WARNING_OBJECT (adder->srcpad, "Sending flush stop event failed");
inbuf = gst_collect_pads_take_buffer (pads, collect_data, outsize);
if (!GST_COLLECT_PADS_STATE_IS_SET (collect_data,
- GST_COLLECT_PADS_STATE_EOS))
+ GST_COLLECT_PADS_STATE_EOS))
is_eos = FALSE;
/* NULL means EOS or an empty buffer so we still need to flush in
/* Create elements */
res = create_elements_and_pads (ebin);
- if (res == FALSE)
+ if (!res)
gst_encode_bin_tear_down_profile (ebin);
return res;
CHAIN_MUTEX_UNLOCK (chain);
/* Set connection-speed property if needed */
- if (chain->demuxer == TRUE) {
+ if (chain->demuxer) {
GParamSpec *pspec;
if ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element),
wrong_type = TRUE;
}
- if (wrong_type == FALSE) {
+ if (!wrong_type) {
GST_DEBUG_OBJECT (dbin, "setting connection-speed=%" G_GUINT64_FORMAT
" to demuxer element", speed);
/* Don't expose if we're currently shutting down */
DYN_LOCK (dbin);
- if (G_UNLIKELY (dbin->shutdown == TRUE)) {
+ if (G_UNLIKELY (dbin->shutdown)) {
GST_WARNING_OBJECT (dbin, "Currently, shutting down, aborting exposing");
DYN_UNLOCK (dbin);
return FALSE;
chain->chain.raw = raw;
/* if the chain was active we don't do anything */
- if (GST_PLAY_CHAIN (chain)->activated == TRUE)
+ if (GST_PLAY_CHAIN (chain)->activated)
return TRUE;
/* try to set the sink element to READY again */
chain->chain.raw = raw;
/* if the chain was active we don't do anything */
- if (GST_PLAY_CHAIN (chain)->activated == TRUE)
+ if (GST_PLAY_CHAIN (chain)->activated)
return TRUE;
/* try to set the sink element to READY again */
caps = gst_pad_query_caps (pad, NULL);
}
- for (i = 0; i < gst_caps_get_size (caps) && ret == FALSE; i++) {
+ for (i = 0; i < gst_caps_get_size (caps) && !ret; i++) {
name = gst_structure_get_name (gst_caps_get_structure (caps, i));
if (g_str_equal (name, "video/x-raw")) {
ret = TRUE;
wrong_type = TRUE;
}
- if (wrong_type == FALSE) {
+ if (!wrong_type) {
g_object_set (source, "connection-speed", speed, NULL);
GST_DEBUG_OBJECT (decoder,
fold->max = max;
else if (max < fold->max)
fold->max = max;
- if (fold->live == FALSE)
+ if (!fold->live)
fold->live = live;
}
GST_DEBUG_OBJECT (item, "got seekable %d", seekable);
- if (fold->seekable == TRUE)
+ if (fold->seekable)
fold->seekable = seekable;
}
subrip_grx = (GRegex *) subrip_rx_once.retval;
dks_grx = (GRegex *) dks_rx_once.retval;
- if (g_regex_match (mdvd_grx, match_str, 0, NULL) == TRUE) {
+ if (g_regex_match (mdvd_grx, match_str, 0, NULL)) {
GST_LOG ("MicroDVD (frame based) format detected");
return GST_SUB_PARSE_FORMAT_MDVDSUB;
}
- if (g_regex_match (subrip_grx, match_str, 0, NULL) == TRUE) {
+ if (g_regex_match (subrip_grx, match_str, 0, NULL)) {
GST_LOG ("SubRip (time based) format detected");
return GST_SUB_PARSE_FORMAT_SUBRIP;
}
- if (g_regex_match (dks_grx, match_str, 0, NULL) == TRUE) {
+ if (g_regex_match (dks_grx, match_str, 0, NULL)) {
GST_LOG ("DKS (time based) format detected");
return GST_SUB_PARSE_FORMAT_DKS;
}
/* if we get IN_CAPS buffers, but the previous buffer was not IN_CAPS,
* it means we're getting new streamheader buffers, and we should clear
* the old ones */
- if (in_caps && sink->previous_buffer_in_caps == FALSE) {
+ if (in_caps && !sink->previous_buffer_in_caps) {
GST_DEBUG_OBJECT (sink,
"receiving new HEADER buffers, clearing old streamheader");
g_slist_foreach (sink->streamheader, (GFunc) gst_mini_object_unref, NULL);
/* if we get IN_CAPS buffers, but the previous buffer was not IN_CAPS,
* it means we're getting new streamheader buffers, and we should clear
* the old ones */
- if (in_caps && sink->previous_buffer_in_caps == FALSE) {
+ if (in_caps && !sink->previous_buffer_in_caps) {
GST_DEBUG_OBJECT (sink,
"receiving new IN_CAPS buffers, clearing old streamheader");
g_slist_foreach (sink->streamheader, (GFunc) gst_mini_object_unref, NULL);
}
} else {
/* buffering busy */
- if (app->buffering == FALSE && app->state == GST_STATE_PLAYING) {
+ if (!app->buffering && app->state == GST_STATE_PLAYING) {
/* we were not buffering but PLAYING, PAUSE the pipeline. */
if (!app->is_live) {
fprintf (stderr, "Buffering, setting pipeline to PAUSED ...\n");
}
} else {
/* buffering busy */
- if (buffering == FALSE && state == GST_STATE_PLAYING) {
+ if (!buffering && state == GST_STATE_PLAYING) {
/* we were not buffering but PLAYING, PAUSE the pipeline. */
if (!is_live) {
fprintf (stderr, "Buffering, setting pipeline to PAUSED ...\n");
uri = g_strdup (filename);
}
- if (async == FALSE) {
+ if (!async) {
g_print ("Analyzing %s\n", uri);
info = gst_discoverer_discover_uri (dc, uri, &err);
print_info (info, err);
exit (1);
}
- if (async == FALSE) {
+ if (!async) {
gint i;
for (i = 1; i < argc; i++)
process_file (dc, argv[i]);