mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
dvb: move adapter number set-up by way of environment to dvbsrc
This logic did not belong to the channel configuration parser (only used by dvbbasebin) but to dvbsrc, which is the element directly using this value and honoring the "adapter" property. Allows previously non-working cases like this to work: GST_DVB_ADAPTER=1 gst-launch-1.0 dvbsrc delsys=11 modulation=7 frequency=689000000 ! fakesink
This commit is contained in:
parent
61b7b1856e
commit
3e519937a1
2 changed files with 8 additions and 6 deletions
|
@ -1022,6 +1022,7 @@ static void
|
||||||
gst_dvbsrc_init (GstDvbSrc * object)
|
gst_dvbsrc_init (GstDvbSrc * object)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
const gchar *adapter;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (object, "Kernel DVB API version %d.%d", DVB_API_VERSION,
|
GST_DEBUG_OBJECT (object, "Kernel DVB API version %d.%d", DVB_API_VERSION,
|
||||||
DVB_API_VERSION_MINOR);
|
DVB_API_VERSION_MINOR);
|
||||||
|
@ -1044,7 +1045,13 @@ gst_dvbsrc_init (GstDvbSrc * object)
|
||||||
object->pids[0] = 8192;
|
object->pids[0] = 8192;
|
||||||
object->pids[1] = G_MAXUINT16;
|
object->pids[1] = G_MAXUINT16;
|
||||||
object->dvb_buffer_size = DEFAULT_DVB_BUFFER_SIZE;
|
object->dvb_buffer_size = DEFAULT_DVB_BUFFER_SIZE;
|
||||||
object->adapter_number = DEFAULT_ADAPTER;
|
|
||||||
|
adapter = g_getenv ("GST_DVB_ADAPTER");
|
||||||
|
if (adapter)
|
||||||
|
object->adapter_number = atoi (adapter);
|
||||||
|
else
|
||||||
|
object->adapter_number = DEFAULT_ADAPTER;
|
||||||
|
|
||||||
object->frontend_number = DEFAULT_FRONTEND;
|
object->frontend_number = DEFAULT_FRONTEND;
|
||||||
object->diseqc_src = DEFAULT_DISEQC_SRC;
|
object->diseqc_src = DEFAULT_DISEQC_SRC;
|
||||||
object->send_diseqc = (DEFAULT_DISEQC_SRC != -1);
|
object->send_diseqc = (DEFAULT_DISEQC_SRC != -1);
|
||||||
|
|
|
@ -885,7 +885,6 @@ set_properties_for_channel (GstElement * dvbbasebin,
|
||||||
{
|
{
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
const gchar *adapter;
|
|
||||||
|
|
||||||
filename = g_strdup (g_getenv ("GST_DVB_CHANNELS_CONF"));
|
filename = g_strdup (g_getenv ("GST_DVB_CHANNELS_CONF"));
|
||||||
if (filename == NULL) {
|
if (filename == NULL) {
|
||||||
|
@ -893,10 +892,6 @@ set_properties_for_channel (GstElement * dvbbasebin,
|
||||||
"gstreamer-" GST_API_VERSION, "dvb-channels.conf", NULL);
|
"gstreamer-" GST_API_VERSION, "dvb-channels.conf", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
adapter = g_getenv ("GST_DVB_ADAPTER");
|
|
||||||
if (adapter)
|
|
||||||
g_object_set (dvbbasebin, "adapter", atoi (adapter), NULL);
|
|
||||||
|
|
||||||
switch (detect_file_format (filename)) {
|
switch (detect_file_format (filename)) {
|
||||||
case CHANNEL_CONF_FORMAT_DVBV5:
|
case CHANNEL_CONF_FORMAT_DVBV5:
|
||||||
if (!parse_and_configure_from_v5_conf_file (dvbbasebin, filename,
|
if (!parse_and_configure_from_v5_conf_file (dvbbasebin, filename,
|
||||||
|
|
Loading…
Reference in a new issue