[vlc-devel] [vlc-commits] input: add input_SetProgramId

Steve Lhomme robux4 at ycbcr.xyz
Mon Feb 8 09:38:48 UTC 2021


On 2021-02-08 10:30, Thomas Guillem wrote:
> vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Feb  1 16:52:23 2021 +0100| [07b50f6db477c88230a7b45a0bf82d8dfb1c9879] | committer: Thomas Guillem
> 
> input: add input_SetProgramId
> 
> Select a program id when the input thread is not running.
> 
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=07b50f6db477c88230a7b45a0bf82d8dfb1c9879
> ---
> 
>   src/input/input.c          | 17 +++++++++++++++++
>   src/input/input_internal.h |  9 +++++++++
>   2 files changed, 26 insertions(+)
> 
> diff --git a/src/input/input.c b/src/input/input.c
> index 0319505532..ea64473a0b 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -1814,6 +1814,23 @@ static void ControlInsertDemuxFilter( input_thread_t* p_input, const char* psz_d
>           msg_Dbg(p_input, "Failed to create demux filter %s", psz_demux_chain);
>   }
>   
> +void input_SetProgramId(input_thread_t *input, int group_id)
> +

:scream:

> +{
> +    input_thread_private_t *sys = input_priv(input);
> +
> +    if (!sys->is_running && !sys->is_stopped)
> +    {
> +        /* Not running, send the control synchronously since we are sure that
> +         * it won't block */
> +        es_out_Control(sys->p_es_out_display, ES_OUT_SET_GROUP, group_id);
> +    }
> +    else
> +    {
> +        input_ControlPushHelper(input, INPUT_CONTROL_SET_PROGRAM,
> +                                &(vlc_value_t) { .i_int = group_id });
> +    }
> +}


More information about the vlc-devel mailing list