[vlc-commits] macosx: priorize native fullscreen over non-embedded window

2012-03-14 Thread David Fuhrmann
vlc | branch: master | David Fuhrmann david.fuhrm...@googlemail.com | Wed Mar 
14 10:16:32 2012 +0100| [511519e3420eb716616f321f3d0bc630c2261414] | committer: 
David Fuhrmann

macosx: priorize native fullscreen over non-embedded window

This fixes some problematic behaviour, when the user changed some settings
but has still not made a restart.

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=511519e3420eb716616f321f3d0bc630c2261414
---

 modules/gui/macosx/MainWindow.m |5 ++---
 modules/gui/macosx/intf.m   |3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 847bcf6..7ffaf7d 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -126,8 +126,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 /* setup the styled interface */
 b_nativeFullscreenMode = NO;
 #ifdef MAC_OS_X_VERSION_10_7
-if( config_GetInt( VLCIntf, embedded-video ))
-b_nativeFullscreenMode = config_GetInt( VLCIntf, 
macosx-nativefullscreenmode );
+b_nativeFullscreenMode = config_GetInt( VLCIntf, 
macosx-nativefullscreenmode );
 #endif
 i_lastShownVolume = -1;
 t_hide_mouse_timer = nil;
@@ -1382,7 +1381,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 - (id)setupVideoView
 {
 vout_thread_t *p_vout = getVout();
-if (config_GetInt( VLCIntf, embedded-video ))
+if (config_GetInt( VLCIntf, embedded-video ) || (OSX_LION  
b_nativeFullscreenMode))
 {
 if ([o_video_view window] != self)
 {
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 1c343ab..ef3a186 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -614,8 +614,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 /* yeah, we are done */
 b_nativeFullscreenMode = NO;
 #ifdef MAC_OS_X_VERSION_10_7
-if( config_GetInt( VLCIntf, embedded-video ))
-b_nativeFullscreenMode = config_GetInt( p_intf, 
macosx-nativefullscreenmode );
+b_nativeFullscreenMode = config_GetInt( p_intf, 
macosx-nativefullscreenmode );
 #endif
 nib_main_loaded = TRUE;
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] macosx: priorize native fullscreen over non-embedded window

2012-03-14 Thread David Fuhrmann
vlc/vlc-2.0 | branch: master | David Fuhrmann david.fuhrm...@googlemail.com | 
Wed Mar 14 10:16:32 2012 +0100| [50b9f77612244abde1e23de2710977a475f104f0] | 
committer: David Fuhrmann

macosx: priorize native fullscreen over non-embedded window

This fixes some problematic behaviour, when the user changed some settings
but has still not made a restart.
(cherry picked from commit 511519e3420eb716616f321f3d0bc630c2261414)

Signed-off-by: David Fuhrmann david.fuhrm...@googlemail.com

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=50b9f77612244abde1e23de2710977a475f104f0
---

 modules/gui/macosx/MainWindow.m |5 ++---
 modules/gui/macosx/intf.m   |3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 1c77807..28c623d 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -126,8 +126,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 /* setup the styled interface */
 b_nativeFullscreenMode = NO;
 #ifdef MAC_OS_X_VERSION_10_7
-if( config_GetInt( VLCIntf, embedded-video ))
-b_nativeFullscreenMode = config_GetInt( VLCIntf, 
macosx-nativefullscreenmode );
+b_nativeFullscreenMode = config_GetInt( VLCIntf, 
macosx-nativefullscreenmode );
 #endif
 i_lastShownVolume = -1;
 t_hide_mouse_timer = nil;
@@ -1382,7 +1381,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 - (id)setupVideoView
 {
 vout_thread_t *p_vout = getVout();
-if (config_GetInt( VLCIntf, embedded-video ))
+if (config_GetInt( VLCIntf, embedded-video ) || (OSX_LION  
b_nativeFullscreenMode))
 {
 if ([o_video_view window] != self)
 {
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 1c343ab..ef3a186 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -614,8 +614,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 /* yeah, we are done */
 b_nativeFullscreenMode = NO;
 #ifdef MAC_OS_X_VERSION_10_7
-if( config_GetInt( VLCIntf, embedded-video ))
-b_nativeFullscreenMode = config_GetInt( p_intf, 
macosx-nativefullscreenmode );
+b_nativeFullscreenMode = config_GetInt( p_intf, 
macosx-nativefullscreenmode );
 #endif
 nib_main_loaded = TRUE;
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] MKV: Don't ignore user preferences for track selection

2012-03-14 Thread Denis Charmet
vlc | branch: master | Denis Charmet t...@dinauz.org | Tue Mar 13 22:29:02 
2012 +0100| [22c24d5aaf7a41f8f0a3beb49039ec8415767263] | committer: 
Jean-Baptiste Kempf

MKV: Don't ignore user preferences for track selection

Fix #6375

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22c24d5aaf7a41f8f0a3beb49039ec8415767263
---

 modules/demux/mkv/matroska_segment.cpp |   10 +++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp 
b/modules/demux/mkv/matroska_segment.cpp
index 98136ca..beac069 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -1362,11 +1362,15 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
 if( unlikely( !p_tk-b_enabled ) )
 p_tk-fmt.i_priority = -2;
 else if( p_tk-b_forced )
-p_tk-fmt.i_priority = 1;
+p_tk-fmt.i_priority = 2;
 else if( p_tk-b_default )
-p_tk-fmt.i_priority = 0;
+p_tk-fmt.i_priority = 1;
 else
-p_tk-fmt.i_priority = -1;
+p_tk-fmt.i_priority = 0;
+
+/* Avoid multivideo tracks when unnecessary */
+if( p_tk-fmt.i_cat == VIDEO_ES )
+p_tk-fmt.i_priority--;
 
 p_tk-p_es = es_out_Add( sys.demuxer.out, p_tk-fmt );
 

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Split options parsing from config_ChainCreate

2012-03-14 Thread Rafaël Carré
vlc | branch: master | Rafaël Carré fun...@videolan.org | Wed Mar 14 06:42:19 
2012 -0400| [f6533ac058690b4c9b1405f5ec169829db5aad55] | committer: Rafaël Carré

Split options parsing from config_ChainCreate

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f6533ac058690b4c9b1405f5ec169829db5aad55
---

 include/vlc_configuration.h |   12 ++
 src/config/chain.c  |   85 ---
 src/libvlccore.sym  |1 +
 3 files changed, 60 insertions(+), 38 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index e01103b..e9ca96b 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -256,6 +256,18 @@ VLC_API void config_ChainParse( vlc_object_t *, const char 
*psz_prefix, const ch
 #define config_ChainParse( a, b, c, d ) config_ChainParse( VLC_OBJECT(a), b, 
c, d )
 
 /**
+ * This function will parse a configuration string (psz_opts) and
+ * - set all options for this module in a chained list (*pp_cfg)
+ * - returns a pointer on the next module if any.
+ *
+ * The string format is
+ *   module{option=*,option=*}
+ *
+ * The options values are unescaped using config_StringUnescape.
+ */
+VLC_API const char *config_ChainParseOptions( config_chain_t **pp_cfg, const 
char *ppsz_opts );
+
+/**
  * This function will parse a configuration string (psz_string) and
  * - set the module name (*ppsz_name)
  * - set all options for this module in a chained list (*pp_cfg)
diff --git a/src/config/chain.c b/src/config/chain.c
index c824657..7d0b71d 100644
--- a/src/config/chain.c
+++ b/src/config/chain.c
@@ -175,10 +175,55 @@ static char *ChainGetValue( const char **ppsz_string )
 return psz_value;
 }
 
+/* Parse all name=value[,] elements */
+const char *config_ChainParseOptions( config_chain_t **pp_cfg, const char 
*psz_opts )
+{
+config_chain_t **pp_next = pp_cfg;
+bool first = true;
+do
+{
+if (!first)
+psz_opts++; /* skip previous delimiter */
+SKIPSPACE( psz_opts );
+
+first = false;
+
+/* Look for the end of the name (,={}_space_) */
+size_t len = strcspn( psz_opts, =,{} \t );
+if( len == 0 )
+continue; /* ignore empty parameter */
+
+/* Append the new parameter */
+config_chain_t *p_cfg = malloc( sizeof(*p_cfg) );
+if( !p_cfg )
+break;
+p_cfg-psz_name = strndup( psz_opts, len );
+psz_opts += len;
+p_cfg-psz_value = NULL;
+p_cfg-p_next = NULL;
+
+*pp_next = p_cfg;
+pp_next = p_cfg-p_next;
+
+/* Extract the option value */
+SKIPSPACE( psz_opts );
+if( strchr( ={, *psz_opts ) )
+{
+p_cfg-psz_value = ChainGetValue( psz_opts );
+SKIPSPACE( psz_opts );
+}
+}
+while( !memchr( }, *psz_opts, 2 ) );
+
+if( *psz_opts ) psz_opts++; /* skip '}' */;
+SKIPSPACE( psz_opts );
+
+return psz_opts;
+}
+
 char *config_ChainCreate( char **ppsz_name, config_chain_t **pp_cfg,
   const char *psz_chain )
 {
-config_chain_t **pp_next = pp_cfg;
 size_t len;
 
 *ppsz_name = NULL;
@@ -196,43 +241,7 @@ char *config_ChainCreate( char **ppsz_name, config_chain_t 
**pp_cfg,
 /* Parse the parameters */
 SKIPSPACE( psz_chain );
 if( *psz_chain == '{' )
-{
-/* Parse all name=value[,] elements */
-do
-{
-psz_chain++; /* skip previous delimiter */
-SKIPSPACE( psz_chain );
-
-/* Look for the end of the name (,={}_space_) */
-len = strcspn( psz_chain, =,{} \t );
-if( len == 0 )
-continue; /* ignore empty parameter */
-
-/* Append the new parameter */
-config_chain_t *p_cfg = malloc( sizeof(*p_cfg) );
-if( !p_cfg )
-break;
-p_cfg-psz_name = strndup( psz_chain, len );
-psz_chain += len;
-p_cfg-psz_value = NULL;
-p_cfg-p_next = NULL;
-
-*pp_next = p_cfg;
-pp_next = p_cfg-p_next;
-
-/* Extract the option value */
-SKIPSPACE( psz_chain );
-if( strchr( ={, *psz_chain ) )
-{
-p_cfg-psz_value = ChainGetValue( psz_chain );
-SKIPSPACE( psz_chain );
-}
-}
-while( !memchr( }, *psz_chain, 2 ) );
-
-if( *psz_chain ) psz_chain++; /* skip '}' */;
-SKIPSPACE( psz_chain );
-}
+psz_chain = config_ChainParseOptions( pp_cfg, psz_chain );
 
 if( *psz_chain == ':' )
 return strdup( psz_chain + 1 );
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 779d643..5092d30 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -54,6 +54,7 @@ config_ChainCreate
 config_ChainDestroy
 config_ChainDuplicate
 config_ChainParse
+config_ChainParseOptions
 config_ExistIntf
 config_FindConfig
 

[vlc-commits] Qt: open disk: fix tab access order

2012-03-14 Thread Francois Cartegnie
vlc/vlc-2.0 | branch: master | Francois Cartegnie fcvlc...@free.fr | Wed Mar 
14 00:08:40 2012 +0100| [4e2d57bac9f544b62bf0ff3da4e459541fcc] | committer: 
Jean-Baptiste Kempf

Qt: open disk: fix tab access order
(cherry picked from commit 67e869c503d39d443de598d8f4bba4d48b79330f)

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=4e2d57bac9f544b62bf0ff3da4e459541fcc
---

 modules/gui/qt4/ui/open_disk.ui |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/ui/open_disk.ui b/modules/gui/qt4/ui/open_disk.ui
index 2f00dc5..6512cb5 100644
--- a/modules/gui/qt4/ui/open_disk.ui
+++ b/modules/gui/qt4/ui/open_disk.ui
@@ -381,6 +381,7 @@
  /widget
  tabstops
   tabstopdvdRadioButton/tabstop
+  tabstopbdRadioButton/tabstop
   tabstopaudioCDRadioButton/tabstop
   tabstopvcdRadioButton/tabstop
   tabstopdvdsimple/tabstop
@@ -389,8 +390,8 @@
   tabstopbrowseDiscButton/tabstop
   tabstoptitleSpin/tabstop
   tabstopchapterSpin/tabstop
-  tabstopsubtitlesSpin/tabstop
   tabstopaudioSpin/tabstop
+  tabstopsubtitlesSpin/tabstop
  /tabstops
  resources/
  connections/

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] MKV: Don't ignore user preferences for track selection

2012-03-14 Thread Denis Charmet
vlc/vlc-2.0 | branch: master | Denis Charmet t...@dinauz.org | Tue Mar 13 
22:29:02 2012 +0100| [6cc4d347d3fdc2b2b6479792e02d5395defae822] | committer: 
Jean-Baptiste Kempf

MKV: Don't ignore user preferences for track selection

Fix #6375

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org
(cherry picked from commit 22c24d5aaf7a41f8f0a3beb49039ec8415767263)

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=6cc4d347d3fdc2b2b6479792e02d5395defae822
---

 modules/demux/mkv/matroska_segment.cpp |   10 +++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp 
b/modules/demux/mkv/matroska_segment.cpp
index 16557e6..4274ccb 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -1362,11 +1362,15 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
 if( unlikely( !p_tk-b_enabled ) )
 p_tk-fmt.i_priority = -2;
 else if( p_tk-b_forced )
-p_tk-fmt.i_priority = 1;
+p_tk-fmt.i_priority = 2;
 else if( p_tk-b_default )
-p_tk-fmt.i_priority = 0;
+p_tk-fmt.i_priority = 1;
 else
-p_tk-fmt.i_priority = -1;
+p_tk-fmt.i_priority = 0;
+
+/* Avoid multivideo tracks when unnecessary */
+if( p_tk-fmt.i_cat == VIDEO_ES )
+p_tk-fmt.i_priority--;
 
 p_tk-p_es = es_out_Add( sys.demuxer.out, p_tk-fmt );
 

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] qt4: Fix PLSelector when a discovery service fails to be created.

2012-03-14 Thread Hugo Beauzée-Luyssen
vlc/vlc-2.0 | branch: master | Hugo Beauzée-Luyssen beauz...@gmail.com | Tue 
Mar 13 15:14:51 2012 +0100| [1dac0eb8a4c2c02a98c293300ffa3409a9ac2ec7] | 
committer: Jean-Baptiste Kempf

qt4: Fix PLSelector when a discovery service fails to be created.
(cherry picked from commit 043553e769dc66d1e891f68723456c294f1c31f5)

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=1dac0eb8a4c2c02a98c293300ffa3409a9ac2ec7
---

 modules/gui/qt4/components/playlist/selector.cpp |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/selector.cpp 
b/modules/gui/qt4/components/playlist/selector.cpp
index bef865a..b78e9cb 100644
--- a/modules/gui/qt4/components/playlist/selector.cpp
+++ b/modules/gui/qt4/components/playlist/selector.cpp
@@ -265,8 +265,6 @@ void PLSelector::setSource( QTreeWidgetItem *item )
 if( !item || item == curItem )
 return;
 
-curItem = item;
-
 bool b_ok;
 int i_type = item-data( 0, TYPE_ROLE ).toInt( b_ok );
 if( !b_ok || i_type == CATEGORY_TYPE )
@@ -279,7 +277,8 @@ void PLSelector::setSource( QTreeWidgetItem *item )
 sd_loaded = playlist_IsServicesDiscoveryLoaded( THEPL, qtu( qs ) );
 if( !sd_loaded )
 {
-playlist_ServicesDiscoveryAdd( THEPL, qtu( qs ) );
+if ( playlist_ServicesDiscoveryAdd( THEPL, qtu( qs ) ) != 
VLC_SUCCESS )
+return ;
 
 services_discovery_descriptor_t *p_test = new 
services_discovery_descriptor_t;
 playlist_ServicesDiscoveryControl( THEPL, qtu( qs ), 
SD_CMD_DESCRIPTOR, p_test );
@@ -295,6 +294,8 @@ void PLSelector::setSource( QTreeWidgetItem *item )
 }
 #endif
 
+curItem = item;
+
 /* */
 playlist_Lock( THEPL );
 playlist_item_t *pl_item = NULL;

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] skins2: fix mute behaviour

2012-03-14 Thread Jean-Paul Saman
vlc/vlc-2.0 | branch: master | Jean-Paul Saman jean-paul.sa...@m2x.nl | Mon 
Mar 12 14:55:09 2012 +0100| [5da825010510ac37ab50e5f42ecb3d7a42a827b1] | 
committer: Jean-Baptiste Kempf

skins2: fix mute behaviour

The skins2 code checked for the audio volume to be zero. However the audio is 
muted with by caling
the function aout_SetMute() or aout_ToggleMute(). Use aout_IsMuted() to test 
for muted audio.
(cherry picked from commit 4f96ae4a9bf70543b421e1b039cad0356a696b92)

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=5da825010510ac37ab50e5f42ecb3d7a42a827b1
---

 modules/gui/skins2/src/vlcproc.cpp |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/skins2/src/vlcproc.cpp 
b/modules/gui/skins2/src/vlcproc.cpp
index 8e8f5f9..c953d74 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -727,7 +727,8 @@ void VlcProc::on_volume_changed( vlc_object_t* p_obj, 
vlc_value_t newVal )
 
 audio_volume_t volume = aout_VolumeGet( pPlaylist );
 SET_VOLUME( m_cVarVolume, volume, false );
-SET_BOOL( m_cVarMute, volume == 0 );
+bool b_is_muted = aout_IsMuted( VLC_OBJECT(pPlaylist) );
+SET_BOOL( m_cVarMute, b_is_muted );
 }
 
 void VlcProc::on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal 
)
@@ -831,7 +832,8 @@ void VlcProc::init_variables()
 
 audio_volume_t volume = aout_VolumeGet( pPlaylist );
 SET_VOLUME( m_cVarVolume, volume, false );
-SET_BOOL( m_cVarMute, volume == 0 );
+bool b_is_muted = aout_IsMuted( VLC_OBJECT(pPlaylist) );
+SET_BOOL( m_cVarMute, b_is_muted );
 
 update_equalizer();
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] rename misleading variable name

2012-03-14 Thread Sébastien Escudier
vlc | branch: master | Sébastien Escudier sebastien-de...@celeos.eu | Tue Mar 
13 09:02:56 2012 +0100| [1551026fc33f26c5e19dd2a0f30a9065b0232015] | committer: 
Sébastien Escudier

rename misleading variable name

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1551026fc33f26c5e19dd2a0f30a9065b0232015
---

 modules/demux/live555.cpp |   82 ++--
 1 files changed, 41 insertions(+), 41 deletions(-)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=1551026fc33f26c5e19dd2a0f30a9065b0232015
___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] npt's are double in live555 lib. We were loosing precision, and it avoids double-float-double conversions

2012-03-14 Thread Sébastien Escudier
vlc | branch: master | Sébastien Escudier sebastien-de...@celeos.eu | Tue Mar 
13 09:07:09 2012 +0100| [b99c2ad437cd60a80ccc2fe12466bc43ecd53533] | committer: 
Sébastien Escudier

npt's are double in live555 lib. We were loosing precision, and it avoids 
double-float-double conversions

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b99c2ad437cd60a80ccc2fe12466bc43ecd53533
---

 modules/demux/live555.cpp |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp
index deca8bb..2fb2c86 100644
--- a/modules/demux/live555.cpp
+++ b/modules/demux/live555.cpp
@@ -163,7 +163,7 @@ typedef struct
 boolb_rtcp_sync;
 charwaiting;
 int64_t i_pts;
-float   f_npt;
+double  f_npt;
 
 boolb_selected;
 
@@ -200,9 +200,9 @@ struct demux_sys_t
 
 /* */
 int64_t  i_pcr; /* The clock */
-floatf_npt;
-floatf_npt_length;
-floatf_npt_start;
+double   f_npt;
+double   f_npt_length;
+double   f_npt_start;
 
 /* timeout thread information */
 int  i_timeout; /* session timeout value in seconds */
@@ -1350,7 +1350,7 @@ static int Control( demux_t *p_demux, int i_query, 
va_list args )
 pi64 = (int64_t*)va_arg( args, int64_t * );
 if( p_sys-f_npt_length  0 )
 {
-*pi64 = (int64_t)((double)p_sys-f_npt_length * 100.0);
+*pi64 = (int64_t)(p_sys-f_npt_length * 100.0);
 return VLC_SUCCESS;
 }
 return VLC_EGENERIC;
@@ -1359,7 +1359,7 @@ static int Control( demux_t *p_demux, int i_query, 
va_list args )
 pf = (double*)va_arg( args, double* );
 if( (p_sys-f_npt_length  0)  (p_sys-f_npt  0) )
 {
-*pf = ( (double)p_sys-f_npt / (double)p_sys-f_npt_length );
+*pf = p_sys-f_npt / p_sys-f_npt_length;
 return VLC_SUCCESS;
 }
 return VLC_EGENERIC;
@@ -1374,14 +1374,14 @@ static int Control( demux_t *p_demux, int i_query, 
va_list args )
 if( (i_query == DEMUX_SET_TIME)  (p_sys-f_npt  0) )
 {
 i64 = (int64_t)va_arg( args, int64_t );
-time = (float)((double)i64 / (double)100.0); /* in 
second */
+time = (float)(i64 / 100.0); /* in second */
 }
 else if( i_query == DEMUX_SET_TIME )
 return VLC_EGENERIC;
 else
 {
 f = (double)va_arg( args, double );
-time = f * (double)p_sys-f_npt_length;   /* in second */
+time = f * p_sys-f_npt_length;   /* in second */
 }
 
 if( p_sys-b_paused )

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] SDP: send the standard cat attribute in addition to x-plgroup

2012-03-14 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Wed Mar 14 
16:33:31 2012 +0200| [6b5b319c452a328f93f6466eb9b934eb1513d266] | committer: 
Rémi Denis-Courmont

SDP: send the standard cat attribute in addition to x-plgroup

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6b5b319c452a328f93f6466eb9b934eb1513d266
---

 src/stream_output/sdp.c |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/stream_output/sdp.c b/src/stream_output/sdp.c
index 2363d34..37c55b0 100644
--- a/src/stream_output/sdp.c
+++ b/src/stream_output/sdp.c
@@ -292,13 +292,14 @@ char *vlc_sdp_Start (vlc_object_t *obj, const char 
*cfgpref,
 if (sdp == NULL)
 return NULL;
 
-/* Totally non-standard */
-strcpy (subvar, group);
-char *group = var_GetNonEmptyString (obj, varname);
-if (group != NULL)
+strcpy (subvar, cat);
+char *cat = var_GetNonEmptyString (obj, varname);
+if (cat != NULL)
 {
-sdp_AddAttribute (sdp, x-plgroup, %s, group);
-free (group);
+sdp_AddAttribute (sdp, cat, %s, cat);
+/* Totally non-standard */
+sdp_AddAttribute (sdp, x-plgroup, %s, cat);
+free (cat);
 }
 
 return sdp;

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] SAP: deal with the standard cat attribute from grouping

2012-03-14 Thread Rémi Denis-Courmont
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont r...@remlab.net | Wed Mar 
14 16:31:50 2012 +0200| [e622d04e01000d5fb0890ec68edb845b0b2af3be] | committer: 
Rémi Denis-Courmont

SAP: deal with the standard cat attribute from grouping

Fallback to the legacy VLC-proprietary x-plgroup for backward
compatibility with old VLC UDP streams.
(cherry picked from commit aea7f120cac105e66b89443a2e50e3b68117732f)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=e622d04e01000d5fb0890ec68edb845b0b2af3be
---

 modules/services_discovery/sap.c |   26 --
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index 7035149..c8bac82 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -877,13 +877,27 @@ sap_announce_t *CreateAnnounce( services_discovery_t 
*p_sd, uint32_t *i_source,
p_sdp-username );
 }
 
-/* Handle group */
-if (p_sap-p_sdp-mediac = 1)
-psz_value = FindAttribute (p_sap-p_sdp, 0, x-plgroup);
+/* Handle category */
+psz_value = GetAttribute(p_sap-p_sdp-pp_attributes,
+ p_sap-p_sdp-i_attributes, cat);
+if (psz_value != NULL)
+{
+/* a=cat provides a dot-separated hierarchy.
+ * For the time being only replace dots with pipe. TODO: FIXME */
+char *str = strdup(psz_value);
+if (likely(str != NULL))
+for (char *p = strchr(str, '.'); p != NULL; p = strchr(p, '.'))
+*(p++) = '|';
+services_discovery_AddItem(p_sd, p_input, str ? str : psz_value);
+free(str);
+}
 else
-psz_value = GetAttribute( p_sap-p_sdp-pp_attributes, 
p_sap-p_sdp-i_attributes, x-plgroup );
-
-services_discovery_AddItem( p_sd, p_input, psz_value /* category name */ );
+{
+/* backward compatibility with VLC 0.7.3-2.0.0 senders */
+psz_value = GetAttribute(p_sap-p_sdp-pp_attributes,
+ p_sap-p_sdp-i_attributes, x-plgroup);
+services_discovery_AddItem(p_sd, p_input, psz_value);
+}
 
 TAB_APPEND( p_sys-i_announces, p_sys-pp_announces, p_sap );
 

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] SDP: send the standard cat attribute in addition to x-plgroup

2012-03-14 Thread Rémi Denis-Courmont
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont r...@remlab.net | Wed Mar 
14 16:33:31 2012 +0200| [dab282c1ba00c3b7c0efe66f61c8eca84aa441c1] | committer: 
Rémi Denis-Courmont

SDP: send the standard cat attribute in addition to x-plgroup
(cherry picked from commit 6b5b319c452a328f93f6466eb9b934eb1513d266)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=dab282c1ba00c3b7c0efe66f61c8eca84aa441c1
---

 src/stream_output/sdp.c |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/stream_output/sdp.c b/src/stream_output/sdp.c
index 2363d34..37c55b0 100644
--- a/src/stream_output/sdp.c
+++ b/src/stream_output/sdp.c
@@ -292,13 +292,14 @@ char *vlc_sdp_Start (vlc_object_t *obj, const char 
*cfgpref,
 if (sdp == NULL)
 return NULL;
 
-/* Totally non-standard */
-strcpy (subvar, group);
-char *group = var_GetNonEmptyString (obj, varname);
-if (group != NULL)
+strcpy (subvar, cat);
+char *cat = var_GetNonEmptyString (obj, varname);
+if (cat != NULL)
 {
-sdp_AddAttribute (sdp, x-plgroup, %s, group);
-free (group);
+sdp_AddAttribute (sdp, cat, %s, cat);
+/* Totally non-standard */
+sdp_AddAttribute (sdp, x-plgroup, %s, cat);
+free (cat);
 }
 
 return sdp;

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] RTP: add an option to control the category

2012-03-14 Thread Rémi Denis-Courmont
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont r...@remlab.net | Wed Mar 
14 16:35:41 2012 +0200| [036d7985ae3c1b11ba44a0e22dac16c1af307a51] | committer: 
Rémi Denis-Courmont

RTP: add an option to control the category

Reported-by: Vincent Vinel v.vi...@gmail.com
(cherry picked from commit 11f1a3ea832ab8c69013de2f0631afda3a5c53ff)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=036d7985ae3c1b11ba44a0e22dac16c1af307a51
---

 modules/stream_out/rtp.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 5900172..5a8c9d5 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -93,6 +93,10 @@
 #define NAME_LONGTEXT N_( \
 This is the name of the session that will be announced in the SDP  \
 (Session Descriptor). )
+#define CAT_TEXT N_(Session category)
+#define CAT_LONGTEXT N_( \
+  This allows you to specify a category for the session,  \
+  that will be announced if you choose to use SAP. )
 #define DESC_TEXT N_(Session description)
 #define DESC_LONGTEXT N_( \
 This allows you to give a short description with details about the 
stream,  \
@@ -202,6 +206,7 @@ vlc_module_begin ()
 
 add_string( SOUT_CFG_PREFIX name, , NAME_TEXT,
 NAME_LONGTEXT, true )
+add_string( SOUT_CFG_PREFIX cat, , CAT_TEXT, CAT_LONGTEXT, true )
 add_string( SOUT_CFG_PREFIX description, , DESC_TEXT,
 DESC_LONGTEXT, true )
 add_string( SOUT_CFG_PREFIX url, , URL_TEXT,
@@ -261,8 +266,8 @@ vlc_module_end ()
  * Exported prototypes
  */
 static const char *const ppsz_sout_options[] = {
-dst, name, port, port-audio, port-video, *sdp, ttl, mux,
-sap, description, url, email, phone,
+dst, name, cat, port, port-audio, port-video, *sdp, ttl,
+mux, sap, description, url, email, phone,
 proto, rtcp-mux, caching,
 #ifdef HAVE_SRTP
 key, salt,

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] sout standard: obsolete group

2012-03-14 Thread Rémi Denis-Courmont
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont r...@remlab.net | Wed Mar 
14 16:38:46 2012 +0200| [b8723d774dd5ff791420dda5b770d5c1cfdbf672] | committer: 
Rémi Denis-Courmont

sout standard: obsolete group

(cherry picked from commit cdf9d7ce729d9dbb1f9deddd9dde331667c33d65)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=b8723d774dd5ff791420dda5b770d5c1cfdbf672
---

 modules/stream_out/standard.c |   10 ++
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index a1cc1cd..8795afe 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -59,12 +59,6 @@
 #define NAME_LONGTEXT N_( \
 This is the name of the session that will be announced in the SDP  \
 (Session Descriptor). )
-
-#define GROUP_TEXT N_(Session groupname)
-#define GROUP_LONGTEXT N_( \
-  This allows you to specify a group for the session, that will be announced 
\
-  if you choose to use SAP. )
-
 #define DESC_TEXT N_(Session description)
 #define DESC_LONGTEXT N_( \
 This allows you to give a short description with details about the 
stream,  \
@@ -107,7 +101,7 @@ vlc_module_begin ()
 add_string( SOUT_CFG_PREFIX path, , PATH_TEXT, PATH_LONGTEXT, false )
 add_bool(   SOUT_CFG_PREFIX sap, false, SAP_TEXT, SAP_LONGTEXT, true )
 add_string( SOUT_CFG_PREFIX name, , NAME_TEXT, NAME_LONGTEXT, true )
-add_string( SOUT_CFG_PREFIX group, , GROUP_TEXT, GROUP_LONGTEXT, true )
+add_obsolete_string( SOUT_CFG_PREFIX group ) /* since 2.1.0 */
 add_string( SOUT_CFG_PREFIX description, , DESC_TEXT, DESC_LONGTEXT, 
true )
 add_string( SOUT_CFG_PREFIX url, , URL_TEXT, URL_LONGTEXT, true )
 add_string( SOUT_CFG_PREFIX email, , EMAIL_TEXT, EMAIL_LONGTEXT, true )
@@ -122,7 +116,7 @@ vlc_module_end ()
  */
 static const char *const ppsz_sout_options[] = {
 access, mux, url, dst,
-sap, name, group, description, url, email, phone,
+sap, name, description, url, email, phone,
 bind, path, NULL
 };
 

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Add disc drives probing for services discovery on OS/2

2012-03-14 Thread KO Myung-Hun
vlc | branch: master | KO Myung-Hun k...@chollian.net | Sun Mar  4 20:51:34 
2012 +0900| [10f17cdeeaaca3c6a6df37ef010d8498bfc173e5] | committer: Rémi 
Denis-Courmont

Add disc drives probing for services discovery on OS/2

Signed-off-by: Rémi Denis-Courmont r...@remlab.net

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=10f17cdeeaaca3c6a6df37ef010d8498bfc173e5
---

 modules/services_discovery/Modules.am |8 +++
 modules/services_discovery/os2drive.c |  103 +
 2 files changed, 111 insertions(+), 0 deletions(-)

diff --git a/modules/services_discovery/Modules.am 
b/modules/services_discovery/Modules.am
index b802fb7..e35ecf8 100644
--- a/modules/services_discovery/Modules.am
+++ b/modules/services_discovery/Modules.am
@@ -42,6 +42,14 @@ if HAVE_WIN32
 libvlc_LTLIBRARIES += libwindrive_plugin.la
 endif
 
+libos2drive_plugin_la_SOURCES = os2drive.c
+libos2drive_plugin_la_CFLAGS = $(AM_CFLAGS)
+libos2drive_plugin_la_LIBADD = $(AM_LIBADD)
+libos2drive_plugin_la_DEPENDENCIES =
+if HAVE_OS2
+libvlc_LTLIBRARIES += libos2drive_plugin.la
+endif
+
 EXTRA_LTLIBRARIES += \
libudev_plugin.la
 libvlc_LTLIBRARIES += \
diff --git a/modules/services_discovery/os2drive.c 
b/modules/services_discovery/os2drive.c
new file mode 100644
index 000..1ccab65
--- /dev/null
+++ b/modules/services_discovery/os2drive.c
@@ -0,0 +1,103 @@
+/**
+ * @file os2drive.c
+ * @brief List of disc drives for VLC media player for OS/2
+ */
+/*
+ * Copyright (C) 2012 KO Myung-Hun k...@chollian.net
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include config.h
+#endif
+
+#include vlc_common.h
+#include vlc_services_discovery.h
+#include vlc_plugin.h
+
+#define IOCTL_CDROMDISK20x82
+#define CDROMDISK2_DRIVELETTERS 0x60
+
+static int Open (vlc_object_t *);
+
+VLC_SD_PROBE_HELPER(disc, Discs, SD_CAT_DEVICES)
+
+/*
+ * Module descriptor
+ */
+vlc_module_begin ()
+add_submodule ()
+set_shortname (N_(Discs))
+set_description (N_(Discs))
+set_category (CAT_PLAYLIST)
+set_subcategory (SUBCAT_PLAYLIST_SD)
+set_capability (services_discovery, 0)
+set_callbacks (Open, NULL)
+add_shortcut (disc)
+
+VLC_SD_PROBE_SUBMODULE
+
+vlc_module_end ()
+
+/**
+ * Probes and initializes.
+ */
+static int Open (vlc_object_t *obj)
+{
+services_discovery_t *sd = (services_discovery_t *)obj;
+
+HFILE hcd2;
+ULONG ulAction;
+ULONG ulParamLen;
+ULONG ulData;
+ULONG ulDataLen;
+ULONG rc;
+
+if (DosOpen ((PSZ)CD-ROM2$, (PHFILE)hcd2, ulAction, 0, FILE_NORMAL,
+ OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW,
+ OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, NULL))
+return VLC_EGENERIC;
+
+rc = DosDevIOCtl (hcd2, IOCTL_CDROMDISK2, CDROMDISK2_DRIVELETTERS,
+  NULL, 0, ulParamLen, ulData, sizeof(ulData), 
ulDataLen);
+if (!rc)
+{
+char mrl[] = file:///A:/, name[] = A:;
+
+int count = LOUSHORT(ulData);
+int drive = HIUSHORT(ulData);
+
+input_item_t *item;
+char  letter;
+
+for (; count; --count, ++drive)
+{
+letter = 'A' + drive;
+
+mrl[8] = name[0] = letter;
+item = input_item_NewWithType (mrl, name, 0, NULL, 0, -1, 
ITEM_TYPE_DISC);
+msg_Dbg (sd, adding %s (%s), mrl, name);
+if (item == NULL)
+break;
+
+services_discovery_AddItem (sd, item, _(Local drives));
+}
+}
+
+DosClose (hcd2);
+
+return rc ? VLC_EGENERIC : VLC_SUCCESS;
+}

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] logger: fixed default log location on OS X

2012-03-14 Thread Felix Paul Kühne
vlc | branch: master | Felix Paul Kühne fkue...@videolan.org | Wed Mar 14 
18:18:05 2012 +0100| [64637de2753e3ff571a703ab540af181359e9e86] | committer: 
Felix Paul Kühne

logger: fixed default log location on OS X

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=64637de2753e3ff571a703ab540af181359e9e86
---

 modules/misc/logger.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/misc/logger.c b/modules/misc/logger.c
index cd3b4fd..d873817 100644
--- a/modules/misc/logger.c
+++ b/modules/misc/logger.c
@@ -269,8 +269,8 @@ static int Open( vlc_object_t *p_this )
 if( !psz_file )
 {
 #ifdef __APPLE__
-# define LOG_DIR Library/Logs/
-char *home = config_GetUserDir(VLC_DOCUMENTS_DIR);
+# define LOG_DIR Library/Logs
+char *home = config_GetUserDir(VLC_HOME_DIR);
 if( home == NULL
  || asprintf( psz_file, %s/LOG_DIR/%s, home,
   filename ) == -1 )

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] logger: fixed default log location on OS X

2012-03-14 Thread Felix Paul Kühne
vlc/vlc-2.0 | branch: master | Felix Paul Kühne fkue...@videolan.org | Wed 
Mar 14 18:18:05 2012 +0100| [9459dd3a4179bbf6a2046e69790c35f90b7b9bdb] | 
committer: Felix Paul Kühne

logger: fixed default log location on OS X
(cherry picked from commit 64637de2753e3ff571a703ab540af181359e9e86)

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=9459dd3a4179bbf6a2046e69790c35f90b7b9bdb
---

 modules/misc/logger.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/misc/logger.c b/modules/misc/logger.c
index 9ee7cde..81ab268 100644
--- a/modules/misc/logger.c
+++ b/modules/misc/logger.c
@@ -277,8 +277,8 @@ static int Open( vlc_object_t *p_this )
 if( !psz_file )
 {
 #ifdef __APPLE__
-# define LOG_DIR Library/Logs/
-char *home = config_GetUserDir(VLC_DOCUMENTS_DIR);
+# define LOG_DIR Library/Logs
+char *home = config_GetUserDir(VLC_HOME_DIR);
 if( home == NULL
  || asprintf( psz_file, %s/LOG_DIR/%s, home,
   filename ) == -1 )

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] macosx: when main window is hidden, let playlist menu item only display the window

2012-03-14 Thread David Fuhrmann
vlc | branch: master | David Fuhrmann david.fuhrm...@googlemail.com | Wed Mar 
14 20:49:00 2012 +0100| [2709f26e4112d8f1745cec7893efeb45368bb814] | committer: 
David Fuhrmann

macosx: when main window is hidden, let playlist menu item only display the 
window

Furthermore, this commit fixes close button functionality in dark ui style when 
video is playing

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2709f26e4112d8f1745cec7893efeb45368bb814
---

 modules/gui/macosx/MainWindow.m |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 7ffaf7d..299c9be 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -634,9 +634,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (IBAction)togglePlaylist:(id)sender
 {
-if (![self isVisible])
+if (![self isVisible]  sender != nil)
 {
 [self makeKeyAndOrderFront: sender];
+return;
 }
 
 BOOL b_activeVideo = [[VLCMain sharedInstance] activeVideoPlayback];

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] macosx: when main window is hidden, let playlist menu item only display the window

2012-03-14 Thread David Fuhrmann
vlc/vlc-2.0 | branch: master | David Fuhrmann david.fuhrm...@googlemail.com | 
Wed Mar 14 20:49:00 2012 +0100| [0919f0cb438fa576a52fa471ea94029330b8a869] | 
committer: David Fuhrmann

macosx: when main window is hidden, let playlist menu item only display the 
window

Furthermore, this commit fixes close button functionality in dark ui style when 
video is playing
(cherry picked from commit 2709f26e4112d8f1745cec7893efeb45368bb814)

Signed-off-by: David Fuhrmann david.fuhrm...@googlemail.com

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=0919f0cb438fa576a52fa471ea94029330b8a869
---

 modules/gui/macosx/MainWindow.m |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 28c623d..942e75a 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -634,9 +634,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (IBAction)togglePlaylist:(id)sender
 {
-if (![self isVisible])
+if (![self isVisible]  sender != nil)
 {
 [self makeKeyAndOrderFront: sender];
+return;
 }
 
 BOOL b_activeVideo = [[VLCMain sharedInstance] activeVideoPlayback];

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] qtsound: bug fixes

2012-03-14 Thread Michael Feurstein
vlc | branch: master | Michael Feurstein michael.feurst...@gmail.com | Tue 
Feb 14 17:16:51 2012 +0100| [fd75aab3d6670f7404e1c3e741a87587481472f4] | 
committer: Felix Paul Kühne

qtsound: bug fixes

fix for selecting the device with the correct UID
GUI and qtsound now both reference the correct UID

Signed-off-by: Felix Paul Kühne fkue...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd75aab3d6670f7404e1c3e741a87587481472f4
---

 modules/access/qtsound.m |   38 +-
 1 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/modules/access/qtsound.m b/modules/access/qtsound.m
index 19f8d64..44fb1e0 100644
--- a/modules/access/qtsound.m
+++ b/modules/access/qtsound.m
@@ -74,6 +74,7 @@ vlc_module_end ()
 {
 demux_t *p_qtsound;
 AudioBuffer *currentAudioBuffer;
+block_t *rawAudioData;
 UInt32 numberOfSamples;
 date_t date;
 mtime_t currentPts;
@@ -82,6 +83,7 @@ vlc_module_end ()
 - (id)initWithDemux:(demux_t *)p_demux;
 - (void)outputAudioSampleBuffer:(QTSampleBuffer *)sampleBuffer 
fromConnection:(QTCaptureConnection *)connection;
 - (BOOL)checkCurrentAudioBuffer;
+- (void)freeAudioMem;
 - (mtime_t)getCurrentPts;
 - (void *)getCurrentAudioBufferData;
 - (UInt32)getCurrentTotalDataSize;
@@ -105,18 +107,12 @@ vlc_module_end ()
 }
 - (void)dealloc
 {
-@synchronized (self)
-{
-free(currentAudioBuffer);
-currentAudioBuffer = nil;
-}
 [super dealloc];
 }
 
 - (void)outputAudioSampleBuffer:(QTSampleBuffer *)sampleBuffer 
fromConnection:(QTCaptureConnection *)connection
 {
 AudioBufferList *tempAudioBufferList;
-block_t *rawAudioData;
 UInt32 totalDataSize = 0;
 UInt32 count = 0;
 
@@ -190,7 +186,6 @@ vlc_module_end ()
 currentAudioBuffer-mDataByteSize = totalDataSize;
 currentAudioBuffer-mData = rawAudioData;
 }
-free(rawAudioData);
 }
 }
 
@@ -199,6 +194,16 @@ vlc_module_end ()
 return (currentAudioBuffer) ? 1 : 0;
 }
 
+- (void)freeAudioMem
+{
+@synchronized (self)
+{
+if (rawAudioData) {
+free(rawAudioData);
+}
+}
+}
+
 - (mtime_t)getCurrentPts
 {
 /* FIXME: can this getter be minimized? */
@@ -293,7 +298,7 @@ static int Open( vlc_object_t *p_this )
 QTCaptureDevice *qtk_audioDevice;
 qtk_audioDevice = [myAudioDevices objectAtIndex:iaudio];
 msg_Dbg( p_demux, qtsound audio %u/%lu localizedDisplayName: %s 
uniqueID: %s, iaudio, [myAudioDevices count], [[qtk_audioDevice 
localizedDisplayName] UTF8String], [[qtk_audioDevice uniqueID] UTF8String]);
-if([[[qtk_audioDevice 
localizedDisplayName]stringByTrimmingCharactersInSet:[NSCharacterSet 
whitespaceCharacterSet]] isEqualToString:qtk_curraudiodevice_uid]){
+if([[[qtk_audioDevice 
uniqueID]stringByTrimmingCharactersInSet:[NSCharacterSet 
whitespaceCharacterSet]] isEqualToString:qtk_curraudiodevice_uid]){
 msg_Dbg( p_demux, Device found );
 break;
 }
@@ -545,8 +550,6 @@ static int Demux( demux_t *p_demux )
 return 0;
 }
 
-pool = [[NSAutoreleasePool alloc] init];
-
 @synchronized (p_sys-audiooutput)
 {
 if ( [p_sys-audiooutput checkCurrentAudioBuffer] )
@@ -562,19 +565,28 @@ static int Demux( demux_t *p_demux )
 {
 // Nothing to transfer yet, just forget
 block_Release( p_blocka );
-[pool release];
 msleep( 1 );
 return 1;
 }
 
-[pool release];
-
 if( p_blocka )
 {
 es_out_Control( p_demux-out, ES_OUT_SET_PCR, p_blocka-i_pts );
 es_out_Send( p_demux-out, p_sys-p_es_audio, p_blocka );
 }
 
+@synchronized (p_sys-audiooutput)
+{
+/*
+ * Free Memory
+ *
+ * Wait before freeing memory, so we don't get no crackling sound
+ * crackling sound artefacts start at 100 ms and below
+ */
+msleep( 200 );
+[p_sys-audiooutput freeAudioMem];
+}
+
 return 1;
 }
 

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] qtsound: added GUI integration for capturing audio devices on MAC OS X

2012-03-14 Thread Michael Feurstein
vlc | branch: master | Michael Feurstein michael.feurst...@gmail.com | Tue 
Feb 14 17:16:51 2012 +0100| [684c28156ecd9ec69724ae05661f5701457e8ae7] | 
committer: Felix Paul Kühne

qtsound: added GUI integration for capturing audio devices on MAC OS X

audio devices can now be selected in the capture dialog
fixes a bug where video and audio devices don't update the MRL

Signed-off-by: Felix Paul Kühne fkue...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=684c28156ecd9ec69724ae05661f5701457e8ae7
---

 .../macosx/Resources/English.lproj/Open.xib|27708 ++--
 .../package/macosx/vlc.xcodeproj/project.pbxproj   |2 +
 modules/gui/macosx/open.h  |   11 +-
 modules/gui/macosx/open.m  |  113 +-
 4 files changed, 13846 insertions(+), 13988 deletions(-)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=684c28156ecd9ec69724ae05661f5701457e8ae7
___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] macosx: fixed minor glitch in the open panel

2012-03-14 Thread Felix Paul Kühne
vlc | branch: master | Felix Paul Kühne fkue...@videolan.org | Wed Mar 14 
22:32:51 2012 +0100| [c2c7ca26b3cda6af2204da23fa239a6202fe411d] | committer: 
Felix Paul Kühne

macosx: fixed minor glitch in the open panel

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c2c7ca26b3cda6af2204da23fa239a6202fe411d
---

 modules/gui/macosx/open.m |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 6bfe609..625212d 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -186,7 +186,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
 [o_eyetv_chn_bgbar setUsesThreadedAnimation: YES];
 
 [o_capture_mode_pop removeAllItems];
-[o_capture_mode_pop addItemWithTitle: _NS(Capture Device)];
 [o_capture_mode_pop addItemWithTitle: _NS(Video Device)];
 [o_capture_mode_pop addItemWithTitle: _NS(Audio Device)];
 

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access_screen: added support for OS X Lion

2012-03-14 Thread FUJISAWA Tooru
vlc | branch: master | FUJISAWA Tooru ara...@mac.com | Tue Feb 28 21:01:50 
2012 +0900| [8ef6e5c761423d007c0d839e7870fd627283b20c] | committer: Felix Paul 
Kühne

access_screen: added support for OS X Lion

Signed-off-by: Felix Paul Kühne fkue...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ef6e5c761423d007c0d839e7870fd627283b20c
---

 modules/access/screen/mac.c|  618 
 modules/access/screen/screen.c |   21 ++-
 modules/access/screen/screen.h |   13 +-
 3 files changed, 469 insertions(+), 183 deletions(-)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=8ef6e5c761423d007c0d839e7870fd627283b20c
___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] screen/mac: removed compilation warning

2012-03-14 Thread Felix Paul Kühne
vlc | branch: master | Felix Paul Kühne fkue...@videolan.org | Wed Mar 14 
22:45:23 2012 +0100| [c1b4f1986c9c857e4cde2fa52e689ee577d53160] | committer: 
Felix Paul Kühne

screen/mac: removed compilation warning

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c1b4f1986c9c857e4cde2fa52e689ee577d53160
---

 modules/access/screen/mac.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/modules/access/screen/mac.c b/modules/access/screen/mac.c
index 4e8c1b9..c1b96ba 100644
--- a/modules/access/screen/mac.c
+++ b/modules/access/screen/mac.c
@@ -216,7 +216,6 @@ int screen_InitCapture( demux_t *p_demux )
 p_data-clipped_image =
 ( char * )malloc( p_data-width * p_data-height * 4 );
 
-#warning FIXME: CGLSetOffScreen is no longer supported in the future!
 returnedError = CGLSetOffScreen( p_data-clipped, p_data-width, 
p_data-height, p_data-width * 4, p_data-clipped_image );
 if( returnedError )
 goto errorHandling;

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] macosx: added screen selection support to the Open panel

2012-03-14 Thread FUJISAWA Tooru
vlc | branch: master | FUJISAWA Tooru ara...@mac.com | Wed Mar 14 22:50:15 
2012 +0100| [ae1d561eec42907a4b8bd1648ffdbd3052372e7d] | committer: Felix Paul 
Kühne

macosx: added screen selection support to the Open panel

Signed-off-by: Felix Paul Kühne fkue...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ae1d561eec42907a4b8bd1648ffdbd3052372e7d
---

 .../macosx/Resources/English.lproj/Open.xib|28883 ++--
 modules/gui/macosx/open.h  |5 +-
 modules/gui/macosx/open.m  |   91 +-
 3 files changed, 15217 insertions(+), 13762 deletions(-)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=ae1d561eec42907a4b8bd1648ffdbd3052372e7d
___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits