[vlc-devel] [PATCH 2/2] Opus in Transport Stream

Ilkka Ollakka ileoo at videolan.org
Wed Sep 10 09:46:38 CEST 2014


On Tue, Sep 09, 2014 at 05:46:45PM +0200, Rafaël Carré wrote:

Hi,

> ---
>  modules/demux/ts.c        | 284 ++++++++++++++++++++++++++++++++++++++++++++--
>  modules/mux/mpeg/ts.c     |  40 ++++++-
>  3 files changed, 311 insertions(+), 15 deletions(-)

> diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
> index 4f13f05..d4c7efe 100644
> --- a/modules/mux/mpeg/ts.c
> +++ b/modules/mux/mpeg/ts.c
> @@ -950,14 +950,17 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
>          p_stream->i_stream_type = 0x81;
>          p_stream->i_stream_id = 0xbd;
>          break;
> -    case VLC_CODEC_EAC3:
> -        p_stream->i_stream_type = 0x06;
> -        p_stream->i_stream_id = 0xbd;
> -        break;

Is this change intentional? doesn't seem to relate the patch as suchs

>      case VLC_CODEC_DVD_LPCM:
>          p_stream->i_stream_type = 0x83;
>          p_stream->i_stream_id = 0xbd;
>          break;
> +    case VLC_CODEC_OPUS:
> +        if (p_input->p_fmt->audio.i_channels > 8) {
> +            msg_Err(p_mux, "Too much opus channels (%d > 8)",
> +                p_input->p_fmt->audio.i_channels);
> +            break;
> +        }
> +    case VLC_CODEC_EAC3:
>      case VLC_CODEC_DTS:
>          p_stream->i_stream_type = 0x06;
>          p_stream->i_stream_id = 0xbd;
> @@ -1219,6 +1222,20 @@ static void SetHeader( sout_buffer_chain_t *c,
>      p_ts->i_flags |= BLOCK_FLAG_HEADER;
>  }


>      for (int i_stream = 0; i_stream < p_mux->i_nb_inputs; i_stream++ )
>      {
> -        ts_stream_t *p_stream = (ts_stream_t*)p_mux->pp_inputs[i_stream]->p_sys;
> +        sout_input_t *p_input = p_mux->pp_inputs[i_stream];
> +        ts_stream_t *p_stream = (ts_stream_t*)p_input->p_sys;

> -        int i_pidinput = p_mux->pp_inputs[i_stream]->p_fmt->i_id;
> +        int i_pidinput = p_input->p_fmt->i_id;
>          pmt_map_t *p_usepid = bsearch( &i_pidinput, p_sys->pmtmap,
>                      p_sys->i_pmtslots, sizeof(pmt_map_t), intcompare );

Also these don't directly seem to relate opus?

-- 
Ilkka Ollakka
If you want to read about love and marriage you've got to buy two separate
books.
		-- Alan King
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140910/7eea6988/attachment.sig>


More information about the vlc-devel mailing list