Always prefer sndio sink and src over anything else. This fixes a long

standing bug with some video formats when gstreamer1-plugins-pulse was
installed (output sounded like static).

While here, replace some printf with GST_DEBUG.
This commit is contained in:
ajacoutot 2013-10-29 14:09:20 +00:00
parent 3b24322e3c
commit 1a94183dba
2 changed files with 9 additions and 7 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.18 2013/10/12 08:11:19 sthen Exp $
# $OpenBSD: Makefile,v 1.19 2013/10/29 14:09:20 ajacoutot Exp $
COMMENT= base elements for GStreamer
DISTNAME= gst-plugins-base-${V}
PKGNAME= ${GST_PKGNAME_PREFIX}-plugins-base-${V}
REVISION= 0
REVISION= 1
SHARED_LIBS += gsttag-1.0 1.0 # 200.0
SHARED_LIBS += gstaudio-1.0 1.0 # 200.0

View File

@ -33,10 +33,12 @@ plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_sndio_debug, "sndio", 0, "sndio plugins");
if (!gst_element_register (plugin, "sndiosrc", GST_RANK_PRIMARY,
/* prefer sndiosrc over pulsesrc (GST_RANK_PRIMARY + 10) */
if (!gst_element_register (plugin, "sndiosrc", GST_RANK_PRIMARY + 20,
gst_sndiosrc_get_type()))
return FALSE;
if (!gst_element_register (plugin, "sndiosink", GST_RANK_PRIMARY,
/* prefer sndiosink over pulsesink (GST_RANK_PRIMARY + 10) */
if (!gst_element_register (plugin, "sndiosink", GST_RANK_PRIMARY + 20,
gst_sndiosink_get_type()))
return FALSE;
return TRUE;
@ -198,7 +200,7 @@ gst_sndio_open (struct gstsndio *sio, gint mode)
gst_caps_append_structure (caps, s);
sio->cur_caps = caps;
fprintf(stderr, "caps are %s\n", gst_caps_to_string(caps));
GST_DEBUG ("caps are %s", gst_caps_to_string(caps));
return TRUE;
}
@ -302,11 +304,11 @@ gst_sndio_prepare (struct gstsndio *sio, GstAudioRingBufferSpec *spec)
return FALSE;
}
#if 0
fprintf(stderr, "format = %s, "
GST_DEBUG ("format = %s, "
"requested: sig = %d, bits = %d, bps = %d, le = %d, msb = %d, "
"rate = %d, pchan = %d, round = %d, appbufsz = %d; "
"returned: sig = %d, bits = %d, bps = %d, le = %d, msb = %d, "
"rate = %d, pchan = %d, round = %d, appbufsz = %d, bufsz = %d\n",
"rate = %d, pchan = %d, round = %d, appbufsz = %d, bufsz = %d",
GST_AUDIO_INFO_NAME(&spec->info),
par.sig, par.bits, par.bps, par.le, par.msb,
par.rate, par.pchan, par.round, par.appbufsz,