[vlc-commits] VDA: fix typo

2014-10-21 Thread Jean-Baptiste Kempf
vlc | branch: master | Jean-Baptiste Kempf j...@videolan.org | Tue Oct 21 
11:31:14 2014 +0200| [df9c1aa43840a482231afa4fe51a96f6d5a25eab] | committer: 
Jean-Baptiste Kempf

VDA: fix typo

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

 modules/codec/avcodec/vda.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index 87ae1d0..2af64e3 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -170,7 +170,7 @@ static int Setup( vlc_va_t *va, AVCodecContext *avctx, 
vlc_fourcc_t *pi_chroma )
 vlc_va_vda_t *p_vda = vlc_va_vda_Get( va );
 
 if( p_vda-hw_ctx.width == avctx-coded_width
-p_vda-hw_ctx.height == avctx-codec_height
+p_vda-hw_ctx.height == avctx-coded_height
 p_vda-hw_ctx.decoder )
 {
 avctx-hwaccel_context = p_vda-hw_ctx;

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


[vlc-commits] VDA: silence a warning

2014-10-21 Thread Jean-Baptiste Kempf
vlc | branch: master | Jean-Baptiste Kempf j...@videolan.org | Tue Oct 21 
11:36:11 2014 +0200| [429b0c7a08fa3e5fb2df6d2eb50d11ab503eece1] | committer: 
Jean-Baptiste Kempf

VDA: silence a warning

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

 modules/codec/avcodec/vda.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index 2af64e3..db2715f 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -335,6 +335,7 @@ static int Open( vlc_va_t *va, AVCodecContext *avctx, const 
es_format_t *fmt )
 msg_Dbg( va, VDA decoder Open success!);
 
 (void) fmt;
+(void) avctx;
 
 return VLC_SUCCESS;
 }

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


[vlc-commits] extras/ios: add a debug flag to the build script

2014-10-21 Thread Felix Paul Kühne
vlc | branch: master | Felix Paul Kühne fkue...@videolan.org | Tue Oct 21 
15:07:32 2014 +0200| [afa9344cb8c479503aaacbd6605a89c4a0e3026b] | committer: 
Felix Paul Kühne

extras/ios: add a debug flag to the build script

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

 extras/package/ios/build.sh |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh
index d46361a..84a0069 100755
--- a/extras/package/ios/build.sh
+++ b/extras/package/ios/build.sh
@@ -3,6 +3,7 @@ set -e
 
 PLATFORM=OS
 VERBOSE=no
+DEBUG=no
 SDK_VERSION=7.0
 SDK_MIN=6.1
 SIXTYFOURBIT_SDK_MIN=7.0
@@ -11,12 +12,14 @@ ARCH=armv7
 usage()
 {
 cat  EOF
-usage: $0 [-s] [-k sdk]
+usage: $0 [-s] [-d] [-v] [-k sdk]
 
 OPTIONS
-k sdk version  Specify which sdk to use ('xcodebuild -showsdks', 
current: ${SDK_VERSION})
-sBuild for simulator
-a arch Specify which arch to use (current: ${ARCH})
+   -dEnable debug
+   -vEnable verbose command-line output
 EOF
 }
 
@@ -37,7 +40,7 @@ info()
 echo [${blue}info${normal}] $1
 }
 
-while getopts hvsk:a: OPTION
+while getopts hvdsk:a: OPTION
 do
  case $OPTION in
  h)
@@ -50,6 +53,9 @@ do
  s)
  PLATFORM=Simulator
  ;;
+ d)
+ DEBUG=yes
+ ;;
  k)
  SDK_VERSION=$OPTARG
  ;;
@@ -78,9 +84,13 @@ info Building libvlc for iOS
 
 if [ $PLATFORM = Simulator ]; then
 TARGET=${ARCH}-apple-darwin11
-OPTIM=-O3 -g
 else
 TARGET=arm-apple-darwin11
+fi
+
+if [ $DEBUG = yes ]; then
+OPTIM=-O0 -g
+else
 OPTIM=-O3 -g
 fi
 
@@ -210,7 +220,7 @@ else
 export ASCPP=xcrun as
 fi
 
-../bootstrap --build=x86_64-apple-darwin11 --host=${TARGET} 
--prefix=${VLCROOT}/contrib/${TARGET}-${ARCH} --disable-gpl \
+../bootstrap --build=x86_64-apple-darwin11 --host=${TARGET} 
--prefix=${VLCROOT}/contrib/${TARGET}-${ARCH} --arch=${ARCH} --disable-gpl \
 --disable-disc --disable-sout \
 --disable-sdl \
 --disable-SDL_image \
@@ -270,6 +280,12 @@ spushd ${BUILDDIR}
 
 info  --prefix=${PREFIX} --host=${TARGET}
 
+if [ $DEBUG = yes ]; then
+DEBUGFLAG=--enable-debug
+else
+DEBUGFLAG=--disable-debug
+fi
+
 # Run configure only upon changes.
 if [ ${VLCROOT}/configure -nt config.log -o \
  ${THIS_SCRIPT_PATH} -nt config.log ]; then
@@ -277,8 +293,8 @@ ${VLCROOT}/configure \
 --prefix=${PREFIX} \
 --host=${TARGET} \
 --with-contrib=${VLCROOT}/contrib/${TARGET}-${ARCH} \
---disable-debug \
 --enable-static \
+${DEBUGFLAG} \
 --disable-macosx \
 --disable-macosx-dialog-provider \
 --disable-macosx-qtkit \

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


[vlc-commits] extras/ios: add a debug flag to the build script

2014-10-21 Thread Felix Paul Kühne
vlc/vlc-2.2 | branch: master | Felix Paul Kühne fkue...@videolan.org | Tue 
Oct 21 15:07:32 2014 +0200| [bd2c4b17b8e6f2967c5a4cc5abd84714a699cca2] | 
committer: Felix Paul Kühne

extras/ios: add a debug flag to the build script

(cherry picked from commit afa9344cb8c479503aaacbd6605a89c4a0e3026b)

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

 extras/package/ios/build.sh |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh
index e484594..7a77123 100755
--- a/extras/package/ios/build.sh
+++ b/extras/package/ios/build.sh
@@ -3,6 +3,7 @@ set -e
 
 PLATFORM=OS
 VERBOSE=no
+DEBUG=no
 SDK_VERSION=7.0
 SDK_MIN=5.1
 SIXTYFOURBIT_SDK_MIN=7.0
@@ -11,12 +12,14 @@ ARCH=armv7
 usage()
 {
 cat  EOF
-usage: $0 [-s] [-k sdk]
+usage: $0 [-s] [-d] [-v] [-k sdk]
 
 OPTIONS
-k sdk version  Specify which sdk to use ('xcodebuild -showsdks', 
current: ${SDK_VERSION})
-sBuild for simulator
-a arch Specify which arch to use (current: ${ARCH})
+   -dEnable debug
+   -vEnable verbose command-line output
 EOF
 }
 
@@ -37,7 +40,7 @@ info()
 echo [${blue}info${normal}] $1
 }
 
-while getopts hvsk:a: OPTION
+while getopts hvdsk:a: OPTION
 do
  case $OPTION in
  h)
@@ -50,6 +53,9 @@ do
  s)
  PLATFORM=Simulator
  ;;
+ d)
+ DEBUG=yes
+ ;;
  k)
  SDK_VERSION=$OPTARG
  ;;
@@ -78,9 +84,13 @@ info Building libvlc for iOS
 
 if [ $PLATFORM = Simulator ]; then
 TARGET=${ARCH}-apple-darwin11
-OPTIM=-O3 -g
 else
 TARGET=arm-apple-darwin11
+fi
+
+if [ $DEBUG = yes ]; then
+OPTIM=-O0 -g
+else
 OPTIM=-O3 -g
 fi
 
@@ -210,7 +220,7 @@ else
 export ASCPP=xcrun as
 fi
 
-../bootstrap --build=x86_64-apple-darwin11 --host=${TARGET} 
--prefix=${VLCROOT}/contrib/${TARGET}-${ARCH} --disable-gpl \
+../bootstrap --build=x86_64-apple-darwin11 --host=${TARGET} 
--prefix=${VLCROOT}/contrib/${TARGET}-${ARCH} --arch=${ARCH} --disable-gpl \
 --disable-disc --disable-sout \
 --disable-sdl \
 --disable-SDL_image \
@@ -270,6 +280,12 @@ spushd ${BUILDDIR}
 
 info  --prefix=${PREFIX} --host=${TARGET}
 
+if [ $DEBUG = yes ]; then
+DEBUGFLAG=--enable-debug
+else
+DEBUGFLAG=--disable-debug
+fi
+
 # Run configure only upon changes.
 if [ ${VLCROOT}/configure -nt config.log -o \
  ${THIS_SCRIPT_PATH} -nt config.log ]; then
@@ -277,8 +293,8 @@ ${VLCROOT}/configure \
 --prefix=${PREFIX} \
 --host=${TARGET} \
 --with-contrib=${VLCROOT}/contrib/${TARGET}-${ARCH} \
---disable-debug \
 --enable-static \
+${DEBUGFLAG} \
 --disable-macosx \
 --disable-macosx-dialog-provider \
 --disable-macosx-qtkit \

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


[vlc-commits] demux: mp4: never match an empty fragment on seek

2014-10-21 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie fcvlc...@free.fr | Tue Oct 21 
15:36:47 2014 +0200| [6dfb313050fb29a77d9ee6ba924f0a70a59f74f2] | committer: 
Francois Cartegnie

demux: mp4: never match an empty fragment on seek

Moov fragment has full length after fixup, but zero data.
Fixes 0 position on ismv seek

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

 modules/demux/mp4/mp4.c |6 ++
 1 file changed, 6 insertions(+)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 6867bc2..cd5c70b 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -4280,6 +4280,12 @@ static mp4_fragment_t * GetFragmentByTime( demux_t 
*p_demux, const mtime_t i_tim
 mtime_t i_base_time = 0;
 while ( p_fragment )
 {
+if ( p_fragment == p_demux-p_sys-moovfragment 
+ p_fragment-i_chunk_range_max_offset == 0 )
+{
+p_fragment = p_fragment-p_next;
+continue;
+}
 mtime_t i_length = CLOCK_FREQ * p_fragment-i_duration / 
p_demux-p_sys-i_timescale;
 if ( i_time = i_base_time 
  i_time = i_base_time + i_length )

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


[vlc-commits] demux: mp4: never match an empty fragment computing time offset

2014-10-21 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie fcvlc...@free.fr | Tue Oct 21 
16:14:58 2014 +0200| [66be1eaf1277cb9d0009393647b8bdf3e638d04a] | committer: 
Francois Cartegnie

demux: mp4: never match an empty fragment computing time offset

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

 modules/demux/mp4/mp4.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index cd5c70b..611e000 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -4311,7 +4311,9 @@ static mtime_t LeafGetFragmentTimeOffset( demux_t 
*p_demux, mp4_fragment_t *p_fr
 mp4_fragment_t *p_current = p_demux-p_sys-moovfragment;
 while ( p_current != p_fragment )
 {
-i_base_scaledtime += p_current-i_duration;
+if ( p_current != p_demux-p_sys-moovfragment ||
+ p_current-i_chunk_range_max_offset )
+i_base_scaledtime += p_current-i_duration;
 p_current = p_current-p_next;
 }
 return i_base_scaledtime;

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


[vlc-commits] demux: libmp4: change trun verbosity level

2014-10-21 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie fcvlc...@free.fr | Tue Oct 21 
16:14:23 2014 +0200| [1a0570b5dfb06396d2732115e88bc2aee18592f5] | committer: 
Francois Cartegnie

demux: libmp4: change trun verbosity level

slows down everything :/

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

 modules/demux/mp4/libmp4.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 5cc17a0..be12611 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -783,7 +783,7 @@ static int MP4_ReadBox_trun(  stream_t *p_stream, MP4_Box_t 
*p_box )
 MP4_GET4BYTES( p_sample-i_composition_time_offset );
 }
 
-#ifdef MP4_VERBOSE
+#ifdef MP4_ULTRA_VERBOSE
 msg_Dbg( p_stream, read box: \trun\ version %u flags 0x%x sample count 
%u,
   p_box-data.p_trun-i_version,
   p_box-data.p_trun-i_flags,

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


[vlc-commits] demux: libmp4: change tfra debug verbosity

2014-10-21 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie fcvlc...@free.fr | Tue Oct 21 
17:38:26 2014 +0200| [951e8760eb3aa4caf1d11ef89cbba4a34c2bf008] | committer: 
Francois Cartegnie

demux: libmp4: change tfra debug verbosity

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

 modules/demux/mp4/libmp4.c |   42 ++
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index be12611..f81b966 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -3402,28 +3402,30 @@ static int MP4_ReadBox_tfra( stream_t *p_stream, 
MP4_Box_t *p_box )
 if ( i  i_number_of_entries )
 i_number_of_entries = i;
 
-#ifdef MP4_VERBOSE
-if( p_tfra-i_version == 0 )
-{
-msg_Dbg( p_stream, time[0]: %PRIu32, moof_offset[0]: %PRIx32,
- p_tfra-p_time[0], p_tfra-p_moof_offset[0] );
-
-msg_Dbg( p_stream, time[1]: %PRIu32, moof_offset[1]: %PRIx32,
- p_tfra-p_time[1], p_tfra-p_moof_offset[1] );
-}
-else
+#ifdef MP4_ULTRA_VERBOSE
+for( i = 0; i  i_number_of_entries; i++ )
 {
-msg_Dbg( p_stream, time[0]: %PRIu64, moof_offset[0]: %PRIx64,
-((uint64_t *)(p_tfra-p_time))[0],
-((uint64_t *)(p_tfra-p_moof_offset))[0] );
-
-msg_Dbg( p_stream, time[1]: %PRIu64, moof_offset[1]: %PRIx64,
-((uint64_t *)(p_tfra-p_time))[1],
-((uint64_t *)(p_tfra-p_moof_offset))[1] );
+if( p_tfra-i_version == 0 )
+{
+msg_Dbg( p_stream, tfra[%PRIu32] time[%PRIu32]: %PRIu32, 
+   moof_offset[%PRIu32]: %PRIu32,
+ p_tfra-i_track_ID,
+ i, p_tfra-p_time[i],
+ i, p_tfra-p_moof_offset[i] );
+}
+else
+{
+msg_Dbg( p_stream, tfra[%PRIu32] time[%PRIu32]: %PRIu64, 
+   moof_offset[%PRIu32]: %PRIu64,
+ p_tfra-i_track_ID,
+ i, ((uint64_t *)(p_tfra-p_time))[i],
+ i, ((uint64_t *)(p_tfra-p_moof_offset))[i] );
+}
 }
-
-msg_Dbg( p_stream, number_of_entries is %PRIu32, i_number_of_entries );
-msg_Dbg( p_stream, track ID is: %PRIu32, p_tfra-i_track_ID );
+#endif
+#ifdef MP4_VERBOSE
+msg_Dbg( p_stream, tfra[%PRIu32] %PRIu32 entries,
+ p_tfra-i_track_ID, i_number_of_entries );
 #endif
 
 MP4_READBOX_EXIT( 1 );

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


[vlc-commits] skins2: use new vout_window_ReportSize

2014-10-21 Thread Erwan Tulou
vlc/vlc-2.2 | branch: master | Erwan Tulou erwa...@videolan.org | Tue Oct 21 
18:33:56 2014 +0200| [6ddc0f39482dfd88b1bebbeb9246ac63abbd03c5] | committer: 
Erwan Tulou

skins2: use new vout_window_ReportSize

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

 modules/gui/skins2/src/vout_window.cpp |   12 
 modules/gui/skins2/src/vout_window.hpp |3 +++
 2 files changed, 15 insertions(+)

diff --git a/modules/gui/skins2/src/vout_window.cpp 
b/modules/gui/skins2/src/vout_window.cpp
index e209363..ef58c07 100644
--- a/modules/gui/skins2/src/vout_window.cpp
+++ b/modules/gui/skins2/src/vout_window.cpp
@@ -77,6 +77,7 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
 setParent( pCtrlVideo-getWindow(), x, y, w, h );
 m_pParentWindow = pCtrlVideo-getWindow();
 
+resize( w, h );
 show();
 }
 else
@@ -89,6 +90,8 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
0, 0, w, h );
 m_pParentWindow =
   VoutManager::instance( getIntf() )-getVoutMainWindow();
+
+resize( w, h );
 show();
 }
 
@@ -96,6 +99,15 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
 }
 
 
+void VoutWindow::resize( int width, int height )
+{
+GenericWindow::resize( width, height );
+
+if( m_pWnd )
+vout_window_ReportSize( m_pWnd, width, height );
+}
+
+
 void VoutWindow::processEvent( EvtKey rEvtKey )
 {
 // Only do the action when the key is down
diff --git a/modules/gui/skins2/src/vout_window.hpp 
b/modules/gui/skins2/src/vout_window.hpp
index bdd2fe6..5b78277 100644
--- a/modules/gui/skins2/src/vout_window.hpp
+++ b/modules/gui/skins2/src/vout_window.hpp
@@ -68,6 +68,9 @@ public:
 virtual void setOriginalWidth( int width ) { original_width = width; }
 virtual void setOriginalHeight( int height ) { original_height = height; }
 
+/// Resize the window
+virtual void resize( int width, int height );
+
 virtual string getType() const { return Vout; }
 
 private:

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


[vlc-commits] Revert skins2: use new vout_window_ReportSize

2014-10-21 Thread Erwan Tulou
vlc/vlc-2.2 | branch: master | Erwan Tulou erwa...@videolan.org | Tue Oct 21 
18:44:54 2014 +0200| [771558d086d007aebb0ed7d532b4839bd175e539] | committer: 
Erwan Tulou

Revert skins2: use new vout_window_ReportSize

This reverts commit 6ddc0f39482dfd88b1bebbeb9246ac63abbd03c5.

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

 modules/gui/skins2/src/vout_window.cpp |   12 
 modules/gui/skins2/src/vout_window.hpp |3 ---
 2 files changed, 15 deletions(-)

diff --git a/modules/gui/skins2/src/vout_window.cpp 
b/modules/gui/skins2/src/vout_window.cpp
index ef58c07..e209363 100644
--- a/modules/gui/skins2/src/vout_window.cpp
+++ b/modules/gui/skins2/src/vout_window.cpp
@@ -77,7 +77,6 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
 setParent( pCtrlVideo-getWindow(), x, y, w, h );
 m_pParentWindow = pCtrlVideo-getWindow();
 
-resize( w, h );
 show();
 }
 else
@@ -90,8 +89,6 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
0, 0, w, h );
 m_pParentWindow =
   VoutManager::instance( getIntf() )-getVoutMainWindow();
-
-resize( w, h );
 show();
 }
 
@@ -99,15 +96,6 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
 }
 
 
-void VoutWindow::resize( int width, int height )
-{
-GenericWindow::resize( width, height );
-
-if( m_pWnd )
-vout_window_ReportSize( m_pWnd, width, height );
-}
-
-
 void VoutWindow::processEvent( EvtKey rEvtKey )
 {
 // Only do the action when the key is down
diff --git a/modules/gui/skins2/src/vout_window.hpp 
b/modules/gui/skins2/src/vout_window.hpp
index 5b78277..bdd2fe6 100644
--- a/modules/gui/skins2/src/vout_window.hpp
+++ b/modules/gui/skins2/src/vout_window.hpp
@@ -68,9 +68,6 @@ public:
 virtual void setOriginalWidth( int width ) { original_width = width; }
 virtual void setOriginalHeight( int height ) { original_height = height; }
 
-/// Resize the window
-virtual void resize( int width, int height );
-
 virtual string getType() const { return Vout; }
 
 private:

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


[vlc-commits] skins2: use new vout_window_ReportSize

2014-10-21 Thread Erwan Tulou
vlc | branch: master | Erwan Tulou erwa...@videolan.org | Tue Oct 21 18:33:56 
2014 +0200| [a10158cfa71bdfe6ebc86ddd22a88905b2d80ab4] | committer: Erwan Tulou

skins2: use new vout_window_ReportSize

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

 modules/gui/skins2/src/vout_window.cpp |   12 
 modules/gui/skins2/src/vout_window.hpp |3 +++
 2 files changed, 15 insertions(+)

diff --git a/modules/gui/skins2/src/vout_window.cpp 
b/modules/gui/skins2/src/vout_window.cpp
index 33da4cb..9c2bd2d 100644
--- a/modules/gui/skins2/src/vout_window.cpp
+++ b/modules/gui/skins2/src/vout_window.cpp
@@ -77,6 +77,7 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
 setParent( pCtrlVideo-getWindow(), x, y, w, h );
 m_pParentWindow = pCtrlVideo-getWindow();
 
+resize( w, h );
 show();
 }
 else
@@ -89,6 +90,8 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
0, 0, w, h );
 m_pParentWindow =
   VoutManager::instance( getIntf() )-getVoutMainWindow();
+
+resize( w, h );
 show();
 }
 
@@ -96,6 +99,15 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
 }
 
 
+void VoutWindow::resize( int width, int height )
+{
+GenericWindow::resize( width, height );
+
+if( m_pWnd )
+vout_window_ReportSize( m_pWnd, width, height );
+}
+
+
 void VoutWindow::processEvent( EvtKey rEvtKey )
 {
 // Only do the action when the key is down
diff --git a/modules/gui/skins2/src/vout_window.hpp 
b/modules/gui/skins2/src/vout_window.hpp
index c2f306d..df9ea07 100644
--- a/modules/gui/skins2/src/vout_window.hpp
+++ b/modules/gui/skins2/src/vout_window.hpp
@@ -69,6 +69,9 @@ public:
 virtual void setOriginalWidth( int width ) { original_width = width; }
 virtual void setOriginalHeight( int height ) { original_height = height; }
 
+/// Resize the window
+virtual void resize( int width, int height );
+
 virtual string getType() const { return Vout; }
 
 private:

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


[vlc-commits] demux: libmp4: add tfra version guard

2014-10-21 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie fcvlc...@free.fr | Tue Oct 21 
17:50:35 2014 +0200| [c60a55a61d6ae0c800f5f21cbb94982c635fb369] | committer: 
Francois Cartegnie

demux: libmp4: add tfra version guard

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

 modules/demux/mp4/libmp4.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index f81b966..73ec73e 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -3298,7 +3298,8 @@ static int MP4_ReadBox_tfra( stream_t *p_stream, 
MP4_Box_t *p_box )
 MP4_READBOX_ENTER( MP4_Box_data_tfra_t );
 MP4_Box_data_tfra_t *p_tfra = p_box-data.p_tfra;
 MP4_GETVERSIONFLAGS( p_box-data.p_tfra );
-
+if ( p_tfra-i_version  1 )
+MP4_READBOX_EXIT( 0 );
 MP4_GET4BYTES( p_tfra-i_track_ID );
 uint32_t i_lengths = 0;
 MP4_GET4BYTES( i_lengths );

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


[vlc-commits] demux: libmp4: fix invalid tfra values reading

2014-10-21 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie fcvlc...@free.fr | Tue Oct 21 
19:02:47 2014 +0200| [cc356c39293c63ecfe1a6e4516b41d6a3ef44a37] | committer: 
Francois Cartegnie

demux: libmp4: fix invalid tfra values reading

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

 modules/demux/mp4/libmp4.c |   88 +---
 1 file changed, 34 insertions(+), 54 deletions(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 73ec73e..5f02754 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -3294,6 +3294,25 @@ static int MP4_ReadBox_mfro( stream_t *p_stream, 
MP4_Box_t *p_box )
 
 static int MP4_ReadBox_tfra( stream_t *p_stream, MP4_Box_t *p_box )
 {
+#define READ_VARIABLE_LENGTH(lengthvar, p_array) switch (lengthvar)\
+{\
+case 0:\
+MP4_GET1BYTE( p_array[i] );\
+break;\
+case 1:\
+MP4_GET2BYTES( *((uint16_t *)p_array[i*2]) );\
+break;\
+case 2:\
+MP4_GET3BYTES( *((uint32_t *)p_array[i*4]) );\
+break;\
+case 3:\
+MP4_GET4BYTES( *((uint32_t *)p_array[i*4]) );\
+break;\
+default:\
+goto error;\
+}
+#define FIX_VARIABLE_LENGTH(lengthvar) if ( lengthvar == 3 ) lengthvar = 4
+
 uint32_t i_number_of_entries;
 MP4_READBOX_ENTER( MP4_Box_data_tfra_t );
 MP4_Box_data_tfra_t *p_tfra = p_box-data.p_tfra;
@@ -3314,10 +,13 @@ static int MP4_ReadBox_tfra( stream_t *p_stream, 
MP4_Box_t *p_box )
 p_tfra-p_moof_offset = calloc( i_number_of_entries, size );
 
 size = 1 + p_tfra-i_length_size_of_traf_num; /* size in [|1, 4|] */
+if ( size == 3 ) size++;
 p_tfra-p_traf_number = calloc( i_number_of_entries, size );
 size = 1 + p_tfra-i_length_size_of_trun_num;
+if ( size == 3 ) size++;
 p_tfra-p_trun_number = calloc( i_number_of_entries, size );
 size = 1 + p_tfra-i_length_size_of_sample_num;
+if ( size == 3 ) size++;
 p_tfra-p_sample_number = calloc( i_number_of_entries, size );
 
 if( !p_tfra-p_time || !p_tfra-p_moof_offset || !p_tfra-p_traf_number
@@ -3336,8 +3358,8 @@ static int MP4_ReadBox_tfra( stream_t *p_stream, 
MP4_Box_t *p_box )
 {
 if ( i_read  i_fields_length + 16 )
 break;
-MP4_GET8BYTES( p_tfra-p_time[i*2] );
-MP4_GET8BYTES( p_tfra-p_moof_offset[i*2] );
+MP4_GET8BYTES( *((uint64_t *)p_tfra-p_time[i*2]) );
+MP4_GET8BYTES( *((uint64_t *)p_tfra-p_moof_offset[i*2]) );
 }
 else
 {
@@ -3346,63 +3368,18 @@ static int MP4_ReadBox_tfra( stream_t *p_stream, 
MP4_Box_t *p_box )
 MP4_GET4BYTES( p_tfra-p_time[i] );
 MP4_GET4BYTES( p_tfra-p_moof_offset[i] );
 }
-switch (p_tfra-i_length_size_of_traf_num)
-{
-case 0:
-MP4_GET1BYTE( p_tfra-p_traf_number[i] );
-break;
-case 1:
-MP4_GET2BYTES( p_tfra-p_traf_number[i*2] );
-break;
-case 2:
-MP4_GET3BYTES( p_tfra-p_traf_number[i*3] );
-break;
-case 3:
-MP4_GET4BYTES( p_tfra-p_traf_number[i*4] );
-break;
-default:
-goto error;
-}
-
-switch (p_tfra-i_length_size_of_trun_num)
-{
-case 0:
-MP4_GET1BYTE( p_tfra-p_trun_number[i] );
-break;
-case 1:
-MP4_GET2BYTES( p_tfra-p_trun_number[i*2] );
-break;
-case 2:
-MP4_GET3BYTES( p_tfra-p_trun_number[i*3] );
-break;
-case 3:
-MP4_GET4BYTES( p_tfra-p_trun_number[i*4] );
-break;
-default:
-goto error;
-}
 
-switch (p_tfra-i_length_size_of_sample_num)
-{
-case 0:
-MP4_GET1BYTE( p_tfra-p_sample_number[i] );
-break;
-case 1:
-MP4_GET2BYTES( p_tfra-p_sample_number[i*2] );
-break;
-case 2:
-MP4_GET3BYTES( p_tfra-p_sample_number[i*3] );
-break;
-case 3:
-MP4_GET4BYTES( p_tfra-p_sample_number[i*4] );
-break;
-default:
-goto error;
-}
+READ_VARIABLE_LENGTH(p_tfra-i_length_size_of_traf_num, 
p_tfra-p_traf_number);
+READ_VARIABLE_LENGTH(p_tfra-i_length_size_of_trun_num, 
p_tfra-p_trun_number);
+READ_VARIABLE_LENGTH(p_tfra-i_length_size_of_sample_num, 
p_tfra-p_sample_number);
 }
 if ( i  i_number_of_entries )
 i_number_of_entries = i;
 
+FIX_VARIABLE_LENGTH(p_tfra-i_length_size_of_traf_num);
+FIX_VARIABLE_LENGTH(p_tfra-i_length_size_of_trun_num);
+FIX_VARIABLE_LENGTH(p_tfra-i_length_size_of_sample_num);
+
 #ifdef 

[vlc-commits] demux: mp4: ifdef fragment debug info

2014-10-21 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie fcvlc...@free.fr | Tue Oct 21 
21:01:44 2014 +0200| [cea540343e4a44410219054fcd74b7fb4001ee17] | committer: 
Francois Cartegnie

demux: mp4: ifdef fragment debug info

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

 modules/demux/mp4/mp4.c |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 611e000..f12a3d5 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -873,14 +873,21 @@ static int Open( vlc_object_t * p_this )
 }
 }
 
+#ifdef MP4_VERBOSE
+mtime_t i_total_duration = 0;
 mp4_fragment_t *p_fragment = p_sys-moovfragment;
 while ( p_fragment )
 {
-msg_Dbg( p_demux, fragment offset %PRId64, data 
%PRIu64-%PRIu64, duration %PRId64,
+if ( p_fragment != p_sys-moovfragment || 
p_fragment-i_chunk_range_max_offset )
+i_total_duration += CLOCK_FREQ * p_fragment-i_duration / 
p_sys-i_timescale;
+msg_Dbg( p_demux, fragment offset %PRId64, data 
%PRIu64-%PRIu64, 
+ duration %PRId64 @%PRId64,
  p_fragment-p_moox-i_pos, 
p_fragment-i_chunk_range_min_offset,
- p_fragment-i_chunk_range_max_offset, CLOCK_FREQ * 
p_fragment-i_duration / p_sys-i_timescale );
+ p_fragment-i_chunk_range_max_offset,
+ CLOCK_FREQ * p_fragment-i_duration / p_sys-i_timescale, 
i_total_duration );
 p_fragment = p_fragment-p_next;
 }
+#endif
 
 /* */
 LoadChapter( p_demux );

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