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

Rafaël Carré funman at videolan.org
Wed Sep 10 10:30:31 CEST 2014


Hello,

On 09/10/14 09:46, Ilkka Ollakka wrote:
> 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

Yes, it's grouping private streams together while adding Opus, which
uses the same IDs. It could be committed separately though.

>>      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?

Same than above, they can be committed separately



More information about the vlc-devel mailing list