Esempio n. 1
0
def init_serviceapp_settings():
    for key in config_serviceapp.options.keys():
        setting_id = key_to_setting_id(key)
        serviceapp_cfg = config_serviceapp.options[key]

        serviceapp_client.setServiceAppSettings(setting_id,
                serviceapp_cfg.hls_explorer.value,
                serviceapp_cfg.autoselect_stream.value,
                serviceapp_cfg.connection_speed_kb.value,
                serviceapp_cfg.autoturnon_subtitles.value)

    for key in config_serviceapp.gstplayer.keys():
        setting_id = key_to_setting_id(key)
        player_cfg = config_serviceapp.gstplayer[key]

        if player_cfg.sink.value == "original":
            video_sink, audio_sink = SINKS_DEFAULT
        elif player_cfg.sink.value == "experimental":
            video_sink, audio_sink = SINKS_EXPERIMENTAL
        else:
            continue

        serviceapp_client.setGstreamerPlayerSettings(setting_id,
                video_sink,
                audio_sink,
                player_cfg.subtitle_enabled.value,
                player_cfg.buffer_size.value,
                player_cfg.buffer_duration.value)

    for key in config_serviceapp.exteplayer3.keys():
        setting_id = key_to_setting_id(key)
        player_cfg = config_serviceapp.exteplayer3[key]

        rtmp_proto_val = 0
        rtmp_proto_cfg_val = player_cfg.rtmp_protocol.value
        if rtmp_proto_cfg_val == "librtmp":
            rtmp_proto_val = 2
        elif rtmp_proto_cfg_val == "ffmpeg":
            rtmp_proto_val = 1
        else:
            rtmp_proto_val = 0
        serviceapp_client.setExtEplayer3Settings(setting_id,
                int(player_cfg.aac_swdecoding.value),
                player_cfg.dts_swdecoding.value,
                player_cfg.wma_swdecoding.value,
                player_cfg.lpcm_injecion.value,
                player_cfg.downmix.value,
                player_cfg.ac3_swdecoding.value,
                player_cfg.eac3_swdecoding.value,
                player_cfg.mp3_swdecoding.value,
                rtmp_proto_val)

    if config_serviceapp.servicemp3.player.value == "gstplayer":
        serviceapp_client.setServiceMP3GstPlayer()
    elif config_serviceapp.servicemp3.player.value == "exteplayer3":
        serviceapp_client.setServiceMP3ExtEplayer3()
Esempio n. 2
0
def init_serviceapp_settings():
    for key in config_serviceapp.options.keys():
        setting_id           = key_to_setting_id(key)
        serviceapp_cfg       = config_serviceapp.options[key]

        serviceapp_client.setServiceAppSettings(setting_id,
                serviceapp_cfg.hls_explorer.value,
                serviceapp_cfg.autoselect_stream.value,
                serviceapp_cfg.connection_speed_kb.value,
                serviceapp_cfg.autoturnon_subtitles.value)

    for key in config_serviceapp.gstplayer.keys():
        setting_id = key_to_setting_id(key)
        player_cfg = config_serviceapp.gstplayer[key]

        if player_cfg.sink.value == "original":
            video_sink, audio_sink = SINKS_DEFAULT
        elif player_cfg.sink.value == "experimental":
            video_sink, audio_sink = SINKS_EXPERIMENTAL
        else:
            continue

        serviceapp_client.setGstreamerPlayerSettings(setting_id,
                video_sink,
                audio_sink,
                player_cfg.subtitle_enabled.value,
                player_cfg.buffer_size.value,
                player_cfg.buffer_duration.value)

    for key in config_serviceapp.exteplayer3.keys():
        setting_id     = key_to_setting_id(key)
        player_cfg     = config_serviceapp.exteplayer3[key]

        rtmp_proto_val = 0
        rtmp_proto_cfg_val = player_cfg.rtmp_protocol.value
        if rtmp_proto_cfg_val == "librtmp":
            rtmp_proto_val = 2
        elif rtmp_proto_cfg_val == "ffmpeg":
            rtmp_proto_val = 1
        else:
            rtmp_proto_val = 0
        serviceapp_client.setExtEplayer3Settings(setting_id,
                int(player_cfg.aac_swdecoding.value),
                player_cfg.dts_swdecoding.value,
                player_cfg.wma_swdecoding.value,
                player_cfg.lpcm_injecion.value,
                player_cfg.downmix.value,
                player_cfg.ac3_swdecoding.value,
                player_cfg.eac3_swdecoding.value,
                player_cfg.mp3_swdecoding.value,
                rtmp_proto_val)

    if config_serviceapp.servicemp3.player.value == "gstplayer":
        serviceapp_client.setServiceMP3GstPlayer()
    elif config_serviceapp.servicemp3.player.value == "exteplayer3":
        serviceapp_client.setServiceMP3ExtEplayer3()
Esempio n. 3
0
def init_serviceapp_settings():
    for key in config_serviceapp.options.keys():
        setting_id           = key_to_setting_id(key)
        serviceapp_cfg       = config_serviceapp.options[key]

        autoturnon_subtitles = serviceapp_cfg.autoturnon_subtitles.value
        hls_explorer         = serviceapp_cfg.hls_explorer.value
        autoselect_stream    = serviceapp_cfg.autoselect_stream.value
        connection_speed_kb  = serviceapp_cfg.connection_speed_kb.value

        serviceapp_client.setServiceAppSettings(setting_id, hls_explorer,
                autoselect_stream, connection_speed_kb, autoturnon_subtitles)

    for key in config_serviceapp.gstplayer.keys():
        setting_id = key_to_setting_id(key)
        player_cfg = config_serviceapp.gstplayer[key]

        if player_cfg.sink.value == "original":
            video_sink, audio_sink = SINKS_DEFAULT
        elif player_cfg.sink.value == "experimental":
            video_sink, audio_sink = SINKS_EXPERIMENTAL
        else:
            continue
        subtitle_enabled = player_cfg.subtitle_enabled.value
        buffer_size      = player_cfg.buffer_size.value
        buffer_duration  = player_cfg.buffer_duration.value

        serviceapp_client.setGstreamerPlayerSettings(setting_id, video_sink, 
                audio_sink, subtitle_enabled, buffer_size, buffer_duration)

    for key in config_serviceapp.exteplayer3.keys():
        setting_id     = key_to_setting_id(key)
        player_cfg     = config_serviceapp.exteplayer3[key]

        aac_swdecoding = player_cfg.aac_swdecoding.value
        dts_swdecoding = player_cfg.dts_swdecoding.value
        wma_swdecoding = player_cfg.wma_swdecoding.value
        lpcm_injecion  = player_cfg.lpcm_injecion.value
        downmix        = player_cfg.downmix.value

        serviceapp_client.setExtEplayer3Settings(setting_id, aac_swdecoding,
                dts_swdecoding, wma_swdecoding, lpcm_injecion, downmix)

    if config_serviceapp.servicemp3.player.value == "gstplayer":
        serviceapp_client.setServiceMP3GstPlayer()
    elif config_serviceapp.servicemp3.player.value == "exteplayer3":
        serviceapp_client.setServiceMP3ExtEplayer3()
Esempio n. 4
0
def initServiceAppSettings():
	for key in configServiceApp.options.keys():
		settingId = keyToSettingId(key)
		serviceAppCfg = configServiceApp.options[key]
		autoTurnOnSubtitles = serviceAppCfg.autoTurnOnSubtitles.value
		HLSExplorer = serviceAppCfg.HLSExplorer.value
		autoSelectStream = serviceAppCfg.autoSelectStream.value
		connectionSpeedInKb = serviceAppCfg.connectionSpeedInKb.value
		serviceapp_client.setServiceAppSettings(settingId, HLSExplorer, autoSelectStream, connectionSpeedInKb, autoTurnOnSubtitles)

	for key in configServiceApp.gstplayer.keys():
		settingId = keyToSettingId(key)
		playerCfg = configServiceApp.gstplayer[key]
		if playerCfg.sink.value == "original":
			videoSink, audioSink = SINKS_DEFAULT
		elif playerCfg.sink.value == "experimental":
			videoSink, audioSink = SINKS_EXPERIMENTAL
		else:
			continue
		subtitleEnabled = playerCfg.subtitleEnabled.value
		bufferSize = playerCfg.bufferSize.value
		bufferDuration = playerCfg.bufferDuration.value

		serviceapp_client.setGstreamerPlayerSettings(settingId, videoSink, audioSink, subtitleEnabled, bufferSize, bufferDuration)

	for key in configServiceApp.exteplayer3.keys():
		settingId = keyToSettingId(key)
		playerCfg = configServiceApp.exteplayer3[key]
		aacSwDecoding = playerCfg.aacSwDecoding.value
		dtsSwDecoding = playerCfg.dtsSwDecoding.value
		wmaSwDecoding = playerCfg.wmaSwDecoding.value
		lpcmInjection = playerCfg.lpcmInjection.value
		downmix = playerCfg.downmix.value

		serviceapp_client.setExtEplayer3Settings(settingId, aacSwDecoding, dtsSwDecoding, wmaSwDecoding, lpcmInjection, downmix)

	if configServiceApp.servicemp3.player.value == "gstplayer":
		serviceapp_client.setServiceMP3GstPlayer()
	elif configServiceApp.servicemp3.player.value == "exteplayer3":
		serviceapp_client.setServiceMP3ExtEplayer3()