[vlc-devel] [PATCH 2/2] demux: asf: do ES audio selection for mms (fix #8797, #3400, #3797)

David Glaude david.glaude at gmail.com
Tue Feb 17 09:34:26 CET 2015


Dear,

My problem is NOT related to this specific patch of
"modules/access/mms/mmsh.c" and "modules/demux/asf/asf.c" but based on
intensive nightly build test...

The last to work is: vlc-2.2.0-git-20131104-1009-win32.exe OK with 3V+24A
The first to fail is: vlc-2.2.0-git-20131209-0039-win32.exe KO no audio on
switching language

I can not provide more granularity without intermediate (nightly) build.

What I notice in the debug Messages from failling versions are the
following messages:

core debug: control type=18 // This is the audio switching time
...
core debug: discarded audio buffer // I go a lot of those after the first
language switch (an no more sound after that switch, and no such message in
previous version)

All my test have been done with the following procedure
* installing+starting vlc (cleaning any previous preference)
* go Tools/Preference (CTRL+P)
* Show settings ALL (Advanced Preferences)
* Input / Codecs + Access modules + MMS =>
* Click on "Force selection of all streams" ( this is the equivalent to the
option --mms-all that is still required at that point of the developpement )
* go Tools/Messages (CTRL+M)
* set verbosity to 2 (debug)
* go Media/Open Network Stream (CTRL+N)
* paste this URL: mms://
vodwms.europarl.europa.eu/wmv/nas/nasvod02/cod1502/wm_pad/Channel05/VODChapter_20150203_09075600_11100500_Ch05_1138bb4a14b495db8e37342.wmv?wmcache=0
* Wait for the 3 video to start and the audio to play
* Switch the language to French and listen if audio is present... wait...
wait (just in case the audio come latter)
* Switch audio again and again, try to seek, discover that now it is really
muted

My next possible steps are:
1) Trying to get some "blame" output between 20131104 on 20131209 the
following files: "modules/access/mms/mmsh.c" and "modules/demux/asf/asf.c"
2) Compare network trace of before/after to see for any significant change
in behaviour (I believe this will fail, but I need to try).

Any help would be welcome such as:
* Where to find intermediate nightly build I could test?
* What could explain this "discarded audio buffer" message?
* Suggesting other possible culprit files where to search for changes?

Thanks

David Glaude

2015-02-15 22:53 GMT+01:00 David Glaude <david.glaude at gmail.com>:

> Dear,
>
> The problem seems to be not totally related to this specific patch:
> http://www.m2x.nl/videolan/vlc/commits/2a310e14227b7cab441ee5128757a27b57f0b9a7/modules/access/mms/mmsh.c
> "demux: asf: do ES audio selection for mms (fix #8797, #3400, #3797)"
>
> I tested vlc-2.2.0-git-20131209-0039-win32 (with --mms-all option) that is
> the latest night build before that patch has been applied. And I get no
> sound when switching audio track (I get sound on the initial track, but not
> comming back to it).
>
> So things may have been broken before that.
>
> Any hint on how to best pick nightly build before that (based on previous
> change to "modules/access/mms/mmsh.c" or "modules/demux/asf/asf.c").
>
> Thanks.
>
> David Glaude
>
> Here are the VOD stream I used for testing.
>
> I tryed with this 3V+24A stream: mms://
> vodwms.europarl.europa.eu/wmv/nas/nasvod02/cod1502/wm_pad/Channel05/VODChapter_20150203_09075600_11100500_Ch05_1138bb4a14b495db8e37342.wmv?wmcache=0
>
> I tryed with this 3V+4A stream: mms://
> vodwms.europarl.europa.eu/wmv/nas/nasvod02/cod1502/wm_pad/Channel01/VODChapter_20150212_17114500_17403100_Ch01_1138bb4a14b7c14553a-1582.wmv?wmcache=0
>
> 2015-02-15 17:51 GMT+01:00 David Glaude <david.glaude at gmail.com>:
>
>> Dear, (sorry for previous message)
>>
>> I am afraid this or some other change in modules/access/mms/mmsh.c or modules/demux/asf/asf.c
>> is breaking the access to the European Parliament LIVE and VOD stream (they
>> are multilingual and multi-bitrate).
>>
>> With 2.1.5 and similar release, the work arround to see all the available
>> language (and video track) is to use --mms-all.
>> It has uggly side effect such as opening 3 video windows and requesting
>> from the streamer all the track (with a lot of unecessary bandwidth
>> consumed... but it kind of work).
>>
>> With 2.2.0 rc2 (I tested the lattest nightly build) --mms-all is not
>> required anymore. By default, it only request one video track and one audio
>> track (this might be due to another patch) but it display all the available
>> audio and play one V+A combo.
>>
>> The problem is when changing audio track it either fail (silence) or
>> freeze (no sound and no video at all).
>>
>> Here is a reproduction steps with an easy stream (3V+4A where the audio
>> are DE+EN+FR+ZU):
>> 1) Open the network stream and paste the URL: mms://
>> vodwms.europarl.europa.eu/wmv/nas/nasvod02/cod1502/wm_pad/Channel01/VODChapter_20150212_17114500_17403100_Ch01_1138bb4a14b7c14553a-1582.wmv?wmcache=0
>> 2) Wait for the video to start, audio is DE and the language selection UI
>> display 1-DE, 2-EN, 3-FR, 4-ZU
>> 3) Switch to English from the UI. $BUG$ no sound it playing but the video
>> "continue"
>> 4) Switch to French from the UI. OK the video continue and french can be
>> heard
>> 5) Switch to Zulu. $BUG$ VLC freeze, the video stop and no audio
>>
>> Actually, switching between DE and FR always work, switching to EN seems
>> to always give silence and switch to ZU always "freeze".
>>
>> I will try with some 3.0.0 nightly build and then try to find the nightly
>> build of 2.2.0 just before and just after this patch to see if it really is
>> the culprit.
>>
>> It is obviously a step in the right direction (to display the list of
>> language and let us pick in streaming mode) but it currently make 2.2.0 a
>> bit unusable for EP content.
>>
>> David Glaude
>>
>> 2013-12-03 19:05 GMT+01:00 Francois Cartegnie <fcvlcdev at free.fr>:
>>
>>> ---
>>>  modules/access/mms/mmsh.c | 20 ++++++++++++++++++++
>>>  modules/demux/asf/asf.c   | 34 ++++++++++++++++++++++++++--------
>>>  2 files changed, 46 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/modules/access/mms/mmsh.c b/modules/access/mms/mmsh.c
>>> index d354d28..414dfd4 100644
>>> --- a/modules/access/mms/mmsh.c
>>> +++ b/modules/access/mms/mmsh.c
>>> @@ -261,6 +261,26 @@ static int Control( access_t *p_access, int
>>> i_query, va_list args )
>>>              *pb_bool =  p_sys->asfh.stream[i_int].i_selected ? true :
>>> false;
>>>              break;
>>>
>>> +        case ACCESS_SET_PRIVATE_ID_STATE:
>>> +            i_int = (int)va_arg( args, int );
>>> +            b_bool = (bool)va_arg( args, int );
>>> +            if( (i_int < 0) || (i_int > 127) )
>>> +                return VLC_EGENERIC;
>>> +            else
>>> +            {
>>> +                int i_cat = p_sys->asfh.stream[i_int].i_cat;
>>> +                for ( int i=0; i< 128; i++ )
>>> +                {
>>> +                    /* First unselect all streams from the same cat */
>>> +                    if ( i_cat == p_sys->asfh.stream[i].i_cat )
>>> +                        p_sys->asfh.stream[i].i_selected = false;
>>> +                }
>>> +                p_sys->asfh.stream[i_int].i_selected = true;
>>> +                Stop( p_access );
>>> +                Seek( p_access, p_access->info.i_pos );
>>> +                return VLC_SUCCESS;
>>> +            }
>>> +
>>>          case ACCESS_SET_PAUSE_STATE:
>>>              b_bool = (bool)va_arg( args, int );
>>>              if( b_bool )
>>> diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
>>> index f169d37..bde94e6 100644
>>> --- a/modules/demux/asf/asf.c
>>> +++ b/modules/demux/asf/asf.c
>>> @@ -354,6 +354,7 @@ static int Control( demux_t *p_demux, int i_query,
>>> va_list args )
>>>      demux_sys_t *p_sys = p_demux->p_sys;
>>>      vlc_meta_t  *p_meta;
>>>      int64_t     i64, *pi64;
>>> +    int         i;
>>>      double      f, *pf;
>>>
>>>      switch( i_query )
>>> @@ -388,6 +389,20 @@ static int Control( demux_t *p_demux, int i_query,
>>> va_list args )
>>>          }
>>>          return SeekPercent( p_demux, i_query, args );
>>>
>>> +    case DEMUX_SET_ES:
>>> +    {
>>> +        i = (int)va_arg( args, int );
>>> +        int i_ret = stream_Control( p_demux->s,
>>> +                                    STREAM_SET_PRIVATE_ID_STATE, i,
>>> true );
>>> +        if ( i_ret == VLC_SUCCESS )
>>> +        {
>>> +            SeekPrepare( p_demux );
>>> +            p_sys->i_seek_track = 0;
>>> +            WaitKeyframe( p_demux );
>>> +        }
>>> +        return i_ret;
>>> +    }
>>> +
>>>      case DEMUX_GET_POSITION:
>>>          if( p_sys->i_time < 0 ) return VLC_EGENERIC;
>>>          if( p_sys->i_length > 0 )
>>> @@ -1003,15 +1018,18 @@ static int DemuxInit( demux_t *p_demux )
>>>          tk->p_esp = NULL;
>>>          tk->p_frame = NULL;
>>>
>>> -        /* Check (in case of mms) if this track is selected (ie will
>>> receive data) */
>>> -        if( !stream_Control( p_demux->s, STREAM_GET_PRIVATE_ID_STATE,
>>> -                             (int) p_sp->i_stream_number,
>>> &b_access_selected ) &&
>>> -            !b_access_selected )
>>> +        if ( strncmp( p_demux->psz_access, "mms", 3 ) )
>>>          {
>>> -            tk->i_cat = UNKNOWN_ES;
>>> -            msg_Dbg( p_demux, "ignoring not selected stream(ID:%u) (by
>>> access)",
>>> -                     p_sp->i_stream_number );
>>> -            continue;
>>> +            /* Check (not mms) if this track is selected (ie will
>>> receive data) */
>>> +            if( !stream_Control( p_demux->s,
>>> STREAM_GET_PRIVATE_ID_STATE,
>>> +                                 (int) p_sp->i_stream_number,
>>> &b_access_selected ) &&
>>> +                !b_access_selected )
>>> +            {
>>> +                tk->i_cat = UNKNOWN_ES;
>>> +                msg_Dbg( p_demux, "ignoring not selected stream(ID:%u)
>>> (by access)",
>>> +                         p_sp->i_stream_number );
>>> +                continue;
>>> +            }
>>>          }
>>>
>>>          /* Find the associated extended_stream_properties if any */
>>> --
>>> 1.8.3.1
>>>
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150217/09408987/attachment.html>


More information about the vlc-devel mailing list