[vlc-commits] access: mmstu: missing stream selection
Francois Cartegnie
git at videolan.org
Wed Dec 30 19:12:02 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 30 19:10:48 2015 +0100| [00b67afdef1149b132d36edc659ac09ba9c8dce2] | committer: Francois Cartegnie
access: mmstu: missing stream selection
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=00b67afdef1149b132d36edc659ac09ba9c8dce2
---
modules/access/mms/mmstu.c | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index fc3652c..3714ee6 100644
--- a/modules/access/mms/mmstu.c
+++ b/modules/access/mms/mmstu.c
@@ -44,6 +44,7 @@
#include <vlc_network.h>
#include <vlc_url.h>
#include <vlc_interrupt.h>
+#include <vlc_es.h>
#include "asf.h"
#include "buffer.h"
@@ -267,6 +268,43 @@ 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 );
+ int i_cat;
+ if( i_int > 127 )
+ return VLC_EGENERIC;
+ else if ( i_int < 0 )
+ {
+ /* Deselecting all ES in this category */
+ assert( !b_bool );
+ i_cat = -1 * i_int;
+ if ( i_cat > ES_CATEGORY_COUNT )
+ return VLC_EGENERIC;
+ }
+ else
+ {
+ /* Chose another ES */
+ assert( b_bool );
+ 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;
+ }
+
+ if ( i_int > 0 )
+ p_sys->asfh.stream[i_int].i_selected = true;
+
+ MMSStop( p_access );
+ Seek( p_access, p_sys->i_position );
+ return VLC_SUCCESS;
+ }
+
case ACCESS_SET_PAUSE_STATE:
b_bool = (bool)va_arg( args, int );
if( b_bool )
More information about the vlc-commits
mailing list