[vlc-commits] commit: NEWS: mention French update (Jean-Baptiste Kempf )
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf j...@videolan.org | Thu Nov 11 23:49:07 2010 +0100| [dc98d855aa2e4542fc82efcede7c29db1c964504] | committer: Jean-Baptiste Kempf NEWS: mention French update http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=dc98d855aa2e4542fc82efcede7c29db1c964504 --- NEWS |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 442d4cb..72ea2ee 100644 --- a/NEWS +++ b/NEWS @@ -40,8 +40,8 @@ libLVC: Translations: * Update translations for Walloon, Lithuanian, Spanish, Turkish, Estonian, Dutch, - Bengali, German, Polish, Brazillian Portuguese, Japanese, Italian, Galician - and Ukrainian + Bengali, German, Polish, Brazillian Portuguese, Japanese, Italian, Galician, + French and Ukrainian * Major update and activation on Windows of Modern Greek * New Asturian translation ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Tag 1.1.5 : Jean-Baptiste Kempf : VLC 1.1.5 - 'The Luggage'
[vlc/vlc-1.1] [branch: refs/tags/1.1.5] Tag:2ee9253080fa1a5858d36b690da38c40eea7d737 http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git?a=tag;h=2ee9253080fa1a5858d36b690da38c40eea7d737 Tagger: Jean-Baptiste Kempf j...@videolan.org Date: Thu Nov 11 23:53:43 2010 +0100 VLC 1.1.5 - 'The Luggage' The sixth release of the 1.1.x branch of VLC This is a minor release, focused on minor features, bugfixes and security issues: - VideoLAN-SA-1006 security issue on Windows - Game Music Emu support rewritten and activated - Integration of a new list of webshows from channels.com - Fixes on h264 playback hardware decoding using Intel GPU on Windows - Fixes on .webm live streams, and DVD - Multiple fixes in interfaces, scripts, demuxers and video outputs - Addition of libvlc_media_new_fd() - Translations ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: vlm: use make_URI() (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Fri Nov 12 01:38:22 2010 +0100| [888aed94a672eb42f56d7030da76854f10df5f23] | committer: Pierre Ynard vlm: use make_URI() http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=888aed94a672eb42f56d7030da76854f10df5f23 --- src/input/vlm.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/input/vlm.c b/src/input/vlm.c index efec710..fa1f4cd 100644 --- a/src/input/vlm.c +++ b/src/input/vlm.c @@ -58,6 +58,7 @@ #include vlm_event.h #include vlc_vod.h #include vlc_sout.h +#include vlc_url.h #include ../stream_output/stream_output.h #include ../libvlc.h @@ -586,8 +587,11 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media ) int i; vlc_gc_decref( p_media-vod.p_item ); -p_media-vod.p_item = input_item_New( p_vlm, p_cfg-ppsz_input[0], + +char *psz_uri = make_URI( p_cfg-ppsz_input[0], NULL ); +p_media-vod.p_item = input_item_New( p_vlm, psz_uri, p_cfg-psz_name ); +free( psz_uri ); if( p_cfg-psz_output ) { @@ -960,7 +964,10 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char * /* Start new one */ p_instance-i_index = i_input_index; -input_item_SetURI( p_instance-p_item, p_media-cfg.ppsz_input[p_instance-i_index] ) ; +char *psz_uri = make_URI( p_media-cfg.ppsz_input[p_instance-i_index], + NULL ); +input_item_SetURI( p_instance-p_item, psz_uri ) ; +free( psz_uri ); if( asprintf( psz_log, _(Media: %s), p_media-cfg.psz_name ) != -1 ) { ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Reset the stream position when rar stream_filter failed to load. ( Laurent Aimar )
vlc | branch: master | Laurent Aimar fen...@videolan.org | Tue Nov 9 19:28:43 2010 +0100| [21bb2451d59a2346d44166825faf170a98d27d81] | committer: Laurent Aimar Reset the stream position when rar stream_filter failed to load. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=21bb2451d59a2346d44166825faf170a98d27d81 --- modules/access/rar/stream.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/modules/access/rar/stream.c b/modules/access/rar/stream.c index e7c92a4..eaa0a11 100644 --- a/modules/access/rar/stream.c +++ b/modules/access/rar/stream.c @@ -92,7 +92,9 @@ static int Open(vlc_object_t *object) int count; rar_file_t **files; +const int64_t position = stream_Tell(s-p_source); if (RarParse(s-p_source, count, files) || count = 0) { +stream_Seek(s-p_source, position); msg_Err(s, Invalid or unsupported RAR archive); free(files); return VLC_EGENERIC; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Fixed rar stream_filter generated playlist. (Laurent Aimar )
vlc | branch: master | Laurent Aimar fen...@videolan.org | Tue Nov 9 19:29:17 2010 +0100| [735ec223092c17d5b77cdfcca25a528531e69a70] | committer: Laurent Aimar Fixed rar stream_filter generated playlist. The items url where not complete. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=735ec223092c17d5b77cdfcca25a528531e69a70 --- modules/access/rar/stream.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/modules/access/rar/stream.c b/modules/access/rar/stream.c index eaa0a11..fcf9180 100644 --- a/modules/access/rar/stream.c +++ b/modules/access/rar/stream.c @@ -104,8 +104,13 @@ static int Open(vlc_object_t *object) * Reusing WriteXSPF from the zip access is probably a good idea * (becareful about '\' and '/'. */ +char *mrl; +if (asprintf(mrl, %s://%s, s-psz_access, s-psz_path) 0) +mrl = NULL; char *base; -char *encoded = encode_URI_component(s-psz_path); +char *encoded = mrl ? encode_URI_component(mrl) : NULL; +free(mrl); + if (!encoded || asprintf(base, rar://%s, encoded) 0) base = NULL; free(encoded); ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Fixed CC support when present using multiples specs (close #4327). (Laurent Aimar )
vlc | branch: master | Laurent Aimar fen...@videolan.org | Fri Nov 12 02:58:41 2010 +0100| [7159174488dd3e97023df461b1baf4a1af132ef2] | committer: Laurent Aimar Fixed CC support when present using multiples specs (close #4327). http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7159174488dd3e97023df461b1baf4a1af132ef2 --- modules/codec/cc.h | 87 +--- 1 files changed, 62 insertions(+), 25 deletions(-) diff --git a/modules/codec/cc.h b/modules/codec/cc.h index f582c36..500973f 100644 --- a/modules/codec/cc.h +++ b/modules/codec/cc.h @@ -28,6 +28,14 @@ /* CC have a maximum rate of 9600 bit/s (per field?) */ #define CC_MAX_DATA_SIZE (2 * 3*600) +enum +{ +CC_PAYLOAD_NONE, +CC_PAYLOAD_GA94, +CC_PAYLOAD_DVD, +CC_PAYLOAD_REPLAYTV, +CC_PAYLOAD_SCTE20, +}; typedef struct { /* Which channel are present */ @@ -36,6 +44,10 @@ typedef struct /* */ bool b_reorder; +/* */ +int i_payload_type; +int i_payload_other_count; + /* CC data per field * byte[x+0]: field (0/1) * byte[x+1]: cc data 1 @@ -53,6 +65,8 @@ static inline void cc_Init( cc_data_t *c ) c- pb_present[i] = false; c-i_data = 0; c-b_reorder = false; +c-i_payload_type = CC_PAYLOAD_NONE; +c-i_payload_other_count = 0; } static inline void cc_Exit( cc_data_t *c ) { @@ -87,14 +101,57 @@ static inline void cc_Extract( cc_data_t *c, bool b_top_field_first, const uint8 static const uint8_t p_cc_replaytv5b[2] = { 0xaa, 0x02 }; static const uint8_t p_cc_scte20[2] = { 0x03, 0x81 }; static const uint8_t p_cc_scte20_old[2] = { 0x03, 0x01 }; -//static const uint8_t p_afd_start[4] = { 0x44, 0x54, 0x47, 0x31 }; if( i_src 4 ) return; +int i_payload_type; if( !memcmp( p_cc_ga94, p_src, 4 ) i_src = 5+1+1+1 p_src[4] == 0x03 ) { -/* Extract CC from DVB/ATSC TS */ +/* CC from DVB/ATSC TS */ +i_payload_type = CC_PAYLOAD_GA94; +} +else if( !memcmp( p_cc_dvd, p_src, 4 ) i_src 4+1 ) +{ +i_payload_type = CC_PAYLOAD_DVD; +} +else if( i_src = 2+2 + 2+2 + ( ( !memcmp( p_cc_replaytv4a, p_src[0], 2 ) !memcmp( p_cc_replaytv4b, p_src[4], 2 ) ) || + ( !memcmp( p_cc_replaytv5a, p_src[0], 2 ) !memcmp( p_cc_replaytv5b, p_src[4], 2 ) ) ) ) +{ +i_payload_type = CC_PAYLOAD_REPLAYTV; +} +else if( ( !memcmp( p_cc_scte20, p_src, 2 ) || + !memcmp( p_cc_scte20_old, p_src, 2 ) ) i_src 2 ) +{ +i_payload_type = CC_PAYLOAD_SCTE20; +} +else +{ +#if 0 +#define V(x) ( ( x 0x20 || x = 0x7f ) ? '?' : x ) +fprintf( stderr, -- unknown user data ); +for( int i = 0; i i_src; i++ ) +fprintf( stderr, %2.2x , p_src[i] ); +for( int i = 0; i i_src; i++ ) +fprintf( stderr, %c , V(p_src[i]) ); +fprintf( stderr, \n ); +#undef V +#endif +return; +} + +if( c-i_payload_type != CC_PAYLOAD_NONE c-i_payload_type != i_payload_type ) +{ +c-i_payload_other_count++; +if( c-i_payload_other_count 50 ) +return; +} +c-i_payload_type= i_payload_type; +c-i_payload_other_count = 0; + +if( i_payload_type == CC_PAYLOAD_GA94 ) +{ /* cc_data() * u1 reserved(1) * u1 process_cc_data_flag @@ -143,9 +200,8 @@ static inline void cc_Extract( cc_data_t *c, bool b_top_field_first, const uint8 } c-b_reorder = true; } -else if( !memcmp( p_cc_dvd, p_src, 4 ) i_src 4+1 ) +else if( i_payload_type == CC_PAYLOAD_DVD ) { -/* DVD CC */ const int b_truncate = p_src[4] 0x01; const int i_field_first = (p_src[4] 0x80) ? 0 : 1; const int i_count_cc2 = (p_src[4] 1) 0xf; @@ -173,11 +229,8 @@ static inline void cc_Extract( cc_data_t *c, bool b_top_field_first, const uint8 } c-b_reorder = false; } -else if( i_src = 2+2 + 2+2 - ( ( !memcmp( p_cc_replaytv4a, p_src[0], 2 ) !memcmp( p_cc_replaytv4b, p_src[4], 2 ) ) || - ( !memcmp( p_cc_replaytv5a, p_src[0], 2 ) !memcmp( p_cc_replaytv5b, p_src[4], 2 ) ) ) ) +else if( i_payload_type == CC_PAYLOAD_REPLAYTV ) { -/* ReplayTV CC */ const uint8_t *cc = p_src[0]; int i; if( c-i_data + 2*3 CC_MAX_DATA_SIZE ) @@ -191,10 +244,8 @@ static inline void cc_Extract( cc_data_t *c, bool b_top_field_first, const uint8 } c-b_reorder = false; } -else if( ( !memcmp( p_cc_scte20, p_src, 2 ) || - !memcmp( p_cc_scte20_old, p_src, 2 ) ) i_src 2 ) +else { -/* SCTE-20 CC */ bs_t s; bs_init( s, p_src[2], i_src - 2 ); const int i_cc_count = bs_read( s, 5 ); @@ -226,20 +277,6 @@ static inline void cc_Extract( cc_data_t *c, bool
[vlc-commits] commit: contribs: use latest binary p ackage from master for this branch ( Felix Paul K ühne )
vlc/vlc-1.1 | branch: master | Felix Paul Kühne fkue...@videolan.org | Fri Nov 12 17:52:12 2010 +0100| [5233b6feeaa8352a417a8eede5e10e09a7479f91] | committer: Felix Paul Kühne contribs: use latest binary package from master for this branch http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=5233b6feeaa8352a417a8eede5e10e09a7479f91 --- extras/contrib/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/extras/contrib/Makefile b/extras/contrib/Makefile index 4b65bb5..4496e82 100644 --- a/extras/contrib/Makefile +++ b/extras/contrib/Makefile @@ -47,7 +47,7 @@ src: using-src ifdef HAVE_DARWIN_OS -CONTRIBREV=34 +CONTRIBREV=35 contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2: $(WGET) http://downloads.videolan.org/pub/videolan/testing/contrib/$@ ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: macosx: removed version info from README ( Felix Paul Kühne )
vlc/vlc-1.1 | branch: master | Felix Paul Kühne fkue...@videolan.org | Fri Nov 12 17:51:49 2010 +0100| [81a0df8a6dee5fccf012a18685606c44498af917] | committer: Felix Paul Kühne macosx: removed version info from README http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=81a0df8a6dee5fccf012a18685606c44498af917 --- extras/package/macosx/README.MacOSX.rtf | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extras/package/macosx/README.MacOSX.rtf b/extras/package/macosx/README.MacOSX.rtf index e0fea6e..5cf34be 100644 --- a/extras/package/macosx/README.MacOSX.rtf +++ b/extras/package/macosx/README.MacOSX.rtf @@ -1,10 +1,10 @@ -{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf270 +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 Courier;} {\colortbl;\red255\green255\blue255;} \vieww16720\viewh13620\viewkind0 \pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\f0\fs48 \cf0 VLC media player, version 0.9\ +\f0\fs48 \cf0 VLC media player\ Mac OS X-specific information \fs24 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural @@ -43,7 +43,7 @@ The following frequently asked questions are answered below :\ \b \cf0 \ul 1. How do I install ? \b0 \ulnone \ -When you download VLC media player, you will end up with a VLC-0.9.x.dmg file. Double-click to open this file. An icon will now appear on your Desktop, right beside your drive(s). Open it and drag the VLC application from the resulting window to the place where you want to install it. Most often this is the directory Applications on your main harddrive.\ +When you download VLC media player, you will end up with a VLC-1.1.x.dmg file. Double-click to open this file. An icon will now appear on your Desktop, right beside your drive(s). Open it and drag the VLC application from the resulting window to the place where you want to install it. Most often this is the directory Applications on your main harddrive.\ \ \ @@ -151,7 +151,7 @@ Select your audio device in Properties For:, then click the Configure Speaker \pard\tx1440\tx2880\tx4320\tx5760\tx7200\qj \b0 \cf0 \ulnone Your first stop is \ul http://www.videolan.org/doc\ulnone . The documentation on this page can usually help you with your problems.\ -If you cannot find an answer there then please visit \ul http://forum.videolan.org\ulnone. Use the Search function there and see if someone else might have already answered your question or run into your problem. Feature requests can also be made in the Request forum.\ +If you cannot find an answer there then please visit \ul http://forum.videolan.org\ulnone . Use the Search function there and see if someone else might have already answered your question or run into your problem. Feature requests can also be made in the Request forum.\ An editable wiki is available at \ul http://wiki.videolan.org\ulnone .\ \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\qj @@ -165,4 +165,4 @@ An editable wiki is available at \ul http://wiki.videolan.org\ulnone .\ For additional information and support, please see: \ul http://www.videolan.org/support\ulnone \ -- \ Derk-Jan Hartman Felix Paul K\'fchne for the VideoLAN team.\ -$Id$} +$Id$} \ No newline at end of file ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: OpenGL: use clz() ( R émi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sat Nov 13 18:47:44 2010 +0200| [b9a7045b5126535b46d4afb94329e5d38c260467] | committer: Rémi Denis-Courmont OpenGL: use clz() http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9a7045b5126535b46d4afb94329e5d38c260467 --- modules/video_output/opengl.c | 11 --- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c index e7ea1ab..d66eaec 100644 --- a/modules/video_output/opengl.c +++ b/modules/video_output/opengl.c @@ -93,14 +93,11 @@ # define VLCGL_TYPE VLCGL_RGB_TYPE #endif -static inline int GetAlignedSize(int i_size) +static inline int GetAlignedSize(unsigned size) { -/* Return the nearest power of 2 */ -int i_result = 1; -while(i_result i_size) -i_result *= 2; - -return i_result; +/* Return the smallest larger or equal power of 2 */ +unsigned align = 1 (8 * sizeof (unsigned) - clz(size)); +return ((align 1) == size) ? size : align; } int vout_display_opengl_Init(vout_display_opengl_t *vgl, ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt4: try again to fix the quitting issue (Jean-Baptiste Kempf )
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf j...@videolan.org | Sat Nov 13 18:05:27 2010 +0100| [6f4519c7c804a8f0e204ace4d130554c5da18d36] | committer: Jean-Baptiste Kempf Qt4: try again to fix the quitting issue This seems to work on XP, 7 (32+64) and Linux (32+64) I know it is a hack, but so far, this is the only solution I have found. http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=6f4519c7c804a8f0e204ace4d130554c5da18d36 --- modules/gui/qt4/components/interface_widgets.cpp |2 ++ modules/gui/qt4/main_interface.cpp | 11 +++ modules/gui/qt4/main_interface.hpp |1 + modules/gui/qt4/qt4.cpp | 10 +++--- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index c930277..c615ace 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -173,6 +173,8 @@ void VideoWidget::release( void ) { msg_Dbg( p_intf, Video is not needed anymore ); +if(!stable) +return; assert( stable ); layout-removeWidget( stable ); stable-deleteLater(); diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 5893d19..1bd3e63 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -223,6 +223,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) CONNECT( THEDP, toolBarConfUpdated(), this, recreateToolbars() ); +CONNECT( this, askToQuit(), THEDP, quit() ); /** END of CONNECTS**/ @@ -263,6 +264,7 @@ MainInterface::~MainInterface() if( stackCentralOldWidget == videoWidget ) showTab( bgWidget ); +releaseVideoSlot(); #ifdef WIN32 if( himl ) ImageList_Destroy( himl ); @@ -584,7 +586,8 @@ void MainInterface::releaseVideo( void ) /* Function that is CONNECTED to the previous emit */ void MainInterface::releaseVideoSlot( void ) { -videoWidget-release(); +if( videoWidget ) +videoWidget-release(); setVideoOnTop( false ); setVideoFullScreen( false ); @@ -1130,9 +1133,9 @@ void MainInterface::wheelEvent( QWheelEvent *e ) void MainInterface::closeEvent( QCloseEvent *e ) { -e-accept(); -hide(); -THEDP-quit(); +//hide(); +e-ignore(); +emit askToQuit(); } void MainInterface::setInterfaceFullScreen( bool fs ) diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp index e2a5985..4f4d208 100644 --- a/modules/gui/qt4/main_interface.hpp +++ b/modules/gui/qt4/main_interface.hpp @@ -235,6 +235,7 @@ signals: void askVideoOnTop( bool ); void minimalViewToggled( bool ); void fullscreenInterfaceToggled( bool ); +void askToQuit(); }; diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 0213ad7..5ed7682 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -365,8 +365,14 @@ static void Close( vlc_object_t *p_this ) if( !p_sys-b_isDialogProvider ) var_Destroy (pl_Get(p_this), qt4-iface); +/* And quit */ +msg_Dbg( p_intf, Please die, die, die... ); +QApplication::closeAllWindows(); + +//QApplication::quit(); QVLCApp::triggerQuit(); +msg_Dbg( p_intf, Please die, die, die 2... ); vlc_join (p_sys-thread, NULL); #ifdef Q_WS_X11 free (x11_display); @@ -469,9 +475,7 @@ static void *Thread( void *obj ) /* Launch */ app.exec(); -/* And quit */ -QApplication::closeAllWindows(); - +msg_Dbg( p_intf, Exec finished() ); if (p_mi != NULL) { #warning BUG! ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: On the road to 1.1.6 (Jean-Baptiste Kempf )
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf j...@videolan.org | Sat Nov 13 19:39:58 2010 +0100| [264eb6d145507c0e6f152ce86cd26441bc4156d6] | committer: Jean-Baptiste Kempf On the road to 1.1.6 http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=264eb6d145507c0e6f152ce86cd26441bc4156d6 --- NEWS |8 +++- configure.ac |6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 72ea2ee..ea7740b 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,13 @@ +Changes between 1.1.5 and 1.1.6-git: +- + + + Changes between 1.1.4.1 and 1.1.5: -- Security: - * Fix a Windows crash on accessing Network Shared files/drives, + * Fix a Windows crash on accessing Network Shared files/drives, VideoLAN-SA-1006 Access: @@ -45,6 +50,7 @@ Translations: * Major update and activation on Windows of Modern Greek * New Asturian translation + Changes between 1.1.4 and 1.1.4.1: -- diff --git a/configure.ac b/configure.ac index 0ce7a88..d4f6121 100644 --- a/configure.ac +++ b/configure.ac @@ -2,11 +2,11 @@ dnl Autoconf settings for vlc AC_COPYRIGHT([Copyright 2002-2010 the VideoLAN team]) -AC_INIT(vlc, 1.1.5) +AC_INIT(vlc, 1.1.6-git) VERSION_MAJOR=1 VERSION_MINOR=1 -VERSION_REVISION=5 -VERSION_EXTRA= +VERSION_REVISION=6 +VERSION_EXTRA=-git PKGDIR=vlc AC_SUBST(PKGDIR) ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Return fatal error to the upper layers when connection is lost while reading the ICY metadata . Otherwise we will end up with an endless loop since -1 is interpreted by AStreamRe
vlc | branch: master | Sven Petai had...@bsd.ee | Sat Nov 6 11:32:59 2010 +0200| [2a3e95d7b511fb627ac79a626068f4ba4271ad13] | committer: Rémi Denis-Courmont Return fatal error to the upper layers when connection is lost while reading the ICY metadata. Otherwise we will end up with an endless loop since -1 is interpreted by AStreamRefillStream() as a temporary error. Signed-off-by: Rémi Denis-Courmont r...@remlab.net http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2a3e95d7b511fb627ac79a626068f4ba4271ad13 --- modules/access/http.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/access/http.c b/modules/access/http.c index e4ea721..5519af9 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -826,7 +826,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) if( ReadICYMeta( p_access ) ) { p_access-info.b_eof = true; -return -1; +return 0; } } if( i_len i_next ) ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Make returning fatal error from the Read() more obvious. No functional change. (Sven Petai )
vlc | branch: master | Sven Petai had...@bsd.ee | Sat Nov 6 12:25:01 2010 +0200| [ec1566fe68ee6b2e027b379671c75dae21c1bb52] | committer: Rémi Denis-Courmont Make returning fatal error from the Read() more obvious. No functional change. Signed-off-by: Rémi Denis-Courmont r...@remlab.net http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec1566fe68ee6b2e027b379671c75dae21c1bb52 --- modules/access/http.c | 30 ++ 1 files changed, 10 insertions(+), 20 deletions(-) diff --git a/modules/access/http.c b/modules/access/http.c index 5519af9..b1890d1 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -760,10 +760,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) int i_read; if( p_sys-fd == -1 ) -{ -p_access-info.b_eof = true; -return 0; -} +goto fatal; if( p_sys-b_has_size ) { @@ -780,10 +777,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) if( p_sys-b_chunked ) { if( p_sys-i_chunk 0 ) -{ -p_access-info.b_eof = true; -return 0; -} +goto fatal; if( p_sys-i_chunk = 0 ) { @@ -801,8 +795,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) if( p_sys-i_chunk = 0 ) /* eof */ { p_sys-i_chunk = -1; -p_access-info.b_eof = true; -return 0; +goto fatal; } } @@ -811,10 +804,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) } if( i_len == 0 ) -{ -p_access-info.b_eof = true; -return 0; -} +goto fatal; if( p_sys-i_icy_meta 0 p_access-info.i_pos-p_sys-i_icy_offset 0 ) { @@ -824,10 +814,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) if( i_next == p_sys-i_icy_meta ) { if( ReadICYMeta( p_access ) ) -{ -p_access-info.b_eof = true; -return 0; -} +goto fatal; } if( i_len i_next ) i_len = i_next; @@ -883,10 +870,9 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) if( i_read = 0 ) { -p_access-info.b_eof = true; if( i_read 0 ) p_sys-b_error = true; -return 0; +goto fatal; } } @@ -900,6 +886,10 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) } return i_read; + +fatal: +p_access-info.b_eof = true; +return 0; } static int ReadICYMeta( access_t *p_access ) ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: qt4: Get rid of towlower in f avor of portability ( Juho Vähä-Herttua )
vlc | branch: master | Juho Vähä-Herttua juh...@iki.fi | Fri Nov 12 15:26:00 2010 +0200| [fb48e363450c0a56d1688a510528a246ae7c36a1] | committer: Rémi Denis-Courmont qt4: Get rid of towlower in favor of portability Signed-off-by: Rémi Denis-Courmont r...@remlab.net http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb48e363450c0a56d1688a510528a246ae7c36a1 --- modules/gui/qt4/util/customwidgets.cpp | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/gui/qt4/util/customwidgets.cpp b/modules/gui/qt4/util/customwidgets.cpp index de5c877..1a0abbb 100644 --- a/modules/gui/qt4/util/customwidgets.cpp +++ b/modules/gui/qt4/util/customwidgets.cpp @@ -424,12 +424,13 @@ int qtEventToVLCKey( QKeyEvent *e ) uint32_t i_vlck = 0; if( qtk = 0xff ) -/* VLC and X11 use lowercase whereas Qt uses uppercase */ -#if defined( __STDC_ISO_10646__ ) || defined( _WIN32 ) || defined( __APPLE__ ) -i_vlck = towlower( qtk ); -#else -# error FIXME -#endif +{ +/* VLC and X11 use lowercase whereas Qt uses uppercase, this + * method should be equal to towlower in case of latin1 */ +if( qtk = 'A' qtk = 'Z' ) i_vlck = qtk+32; +else if( qtk = 0xC0 qtk = 0xDE qtk != 0xD7) i_vlck = qtk+32; +else i_vlck = qtk; +} else { const vlc_qt_key_t *map; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Update the release howto to actually match what we are doing ( Jean-Baptiste Kempf )
vlc | branch: master | Jean-Baptiste Kempf j...@videolan.org | Sat Nov 13 20:33:06 2010 +0100| [83b0e6f2e20271e2b6c691a887b21bad5869f4d9] | committer: Jean-Baptiste Kempf Update the release howto to actually match what we are doing http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=83b0e6f2e20271e2b6c691a887b21bad5869f4d9 --- doc/release-howto.txt | 79 +--- 1 files changed, 28 insertions(+), 51 deletions(-) diff --git a/doc/release-howto.txt b/doc/release-howto.txt index a0c7953..186bdb4 100644 --- a/doc/release-howto.txt +++ b/doc/release-howto.txt @@ -6,26 +6,26 @@ * Tests: compilation, regression tests ... * Changes on the git repository - - update the version number everywhere it's needed + - Check that the version number everywhere it's needed · configure.ac - - update the NEWS files, as well as the Trac database. - read all the commits and add important things to the NEWS file - - update the milestones info on https://trac.videolan.org/vlc - - Add a note about the matching contrib package in INSTALL.win32 + · NEWS + - Update important things and add them to the NEWS file + - Close the milestone on Trac https://trac.videolan.org/vlc - Update OpenGPG key embedded in include/vlc_update.h if needed - Increase the libvlccore and libvlc revisions in src/Makefile.am _if_and_only_if_ the ABI number has not been increased instead, in which case the revision goes back to zero. * Commit + * Tag the commit * Tarballs (Use a clean tree !!!) - - Use 'make distcheck' to make sure all files are exported -correctly - - copy the tar.xz file on ftp.videolan.org in -/opt/ftp/pub/videolan/testing/vlc-X.X.X/ + - Use 'make distcheck' to make sure all files are exported correctly + - copy the tar.xz file on altair.videolan.org + - copy the binaries files on altair.videolan.org, if possible - generate SHA, MD5 hashes and OpenPGP signature of these files (use sha*sum --binary, md5sum --binary, gpg --sign --detach --armor) +Use the ~/bin/sumandsign.sh script * Contribs - Put a copy of the libraries or git snapshot in vlc-X.X.X/contrib @@ -33,56 +33,40 @@ - Update developers.v.o/vlc and www.v.o/vlc/download-sources.html * Win32 Packages -make the packages using the nightly builds configure/options/... , don't - forget --enable-update-check -don't forget to test the installer and uninstaller (the first 0.8.4 -uninstaller was broken ... kind of suxxs) -add the .zip and .exe files to /opt/ftp/pub/videolan/testing/vlc-X.X.X/win32/ -generate md5 plus SHA1 hashes and gpg signature of these files + - configure using the extras/package/win32/configure-mingw-release.sh script + - move to altair and generate md5 plus SHA1 hashes and gpg signature of these files (c.f. Tarballs) * OS X packages -Information on compilation: wiki.videolan.org/OSXCompile -configure with --enable-update-check -compile the source on both a PowerPC and an Intel-based Mac. Don't try to + - configure using ./configure --enable-macosx + - compile the source on both a PowerPC and an Intel-based Mac. Don't try to cross-compile for either platform. Don't forget the framework. -use extras/package/macosx/ub.sh to create a Universal Binary. Test it on - PowerPC and Intel-based Macs. -add the .dmg files to /opt/ftp/pub/videolan/testing/vlc-X.X.X/macosx/ -Nomenclature is vlc-X.X.X-$(PLATFORM).dmg respectively - vlc-plugin-X.X.X-$(PLATFORM).dmg and vlckit-X.X.X-$(PLATFORM).dmg. -Don't put any platform for the UB package. -generate md5 plus SHA1 hashes and gpg signature of these files - (c.f. gpg --sign --detach --armor) + - use extras/package/macosx/ub.sh to create a Universal Binary. + - move to altair and generate md5 plus SHA1 hashes and gpg signature of these files +(c.f. Tarballs) * Commit changes ... it never works the first time * Tag the release - git tag -a -m VLC Release VERSION VERSION (Create an annotated tag, you can skip -a if you used -m) git push origin VERSION -(You are advised to play with it on the sandrox.git if you feel - uncomfortable) - - * Move /opt/ftp/pub/videolan/testing/vlc-X.X.X to - /opt/ftp/pub/videolan/vlc/X.X.X - - At first block access to this directory by http or ftp. Only authorize - rsync. - This is to avoid leak as some journalists and forums seem to watch the ftp. - - Update the latest symlink + * Move the signed files from altair to ganesh, on /opt/ftp/pub/videolan/vlc/X.X.X + - At first block access to this directory by http or ftp. Only authorize rsync. +This is to avoid leak as some journalists and forums seem to watch the ftp. + - Update the last symlink * Update the website - - edit the /index.php /vlc/*.php pages + - edit the /index.php /vlc/*.php, include/os-specific.php files + - create a /vlc/release
[vlc-commits] Tag 1.1.5 : Jean-Baptiste Kempf : VLC 1.1.5 - 'The Luggage'
[vlc/vlc-1.1] [branch: refs/tags/1.1.5] Tag:15716e8d78b71dd9afe334faa9234e51a3790a83 http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git?a=tag;h=15716e8d78b71dd9afe334faa9234e51a3790a83 Tagger: Jean-Baptiste Kempf j...@videolan.org Date: Sat Nov 13 18:22:50 2010 +0100 VLC 1.1.5 - 'The Luggage' This is the sixth release of the 1.1.x branch of VLC. This is a minor release, focused on minor features, bugfixes and security issues: - VideoLAN-SA-1006 security issue on Windows - Game Music Emu support rewritten and activated - Integration of a new list of webshows from channels.com - Fixes on h264 playback hardware decoding using Intel GPU on Windows - Fixes on .webm live streams, and DVD - Multiple fixes in interfaces, scripts, demuxers and video outputs - Addition of libvlc_media_new_fd() - Translations ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: OpenCV: do not assume picture is at p_data_orig ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sat Nov 13 23:55:27 2010 +0200| [48cecf7cdc0443255ea15375865faa1c45d4214e] | committer: Rémi Denis-Courmont OpenCV: do not assume picture is at p_data_orig This seems quite wrong to me, but untested. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48cecf7cdc0443255ea15375865faa1c45d4214e --- modules/video_filter/opencv_example.c | 10 +- modules/video_filter/opencv_wrapper.c |1 - 2 files changed, 1 insertions(+), 10 deletions(-) diff --git a/modules/video_filter/opencv_example.c b/modules/video_filter/opencv_example.c index 5e84b74..b32cdcd 100644 --- a/modules/video_filter/opencv_example.c +++ b/modules/video_filter/opencv_example.c @@ -139,9 +139,6 @@ static void CloseFilter( vlc_object_t *p_this ) / * Filter: Check for faces and raises an event when one is found. - - * p_pic: A picture_t with its p_data_orig member set to an array of - * IplImages (one image for each picture_t plane). / static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) { @@ -156,13 +153,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) msg_Err( p_filter, no image array ); return NULL; } -if (!(p_pic-p_data_orig)) -{ -msg_Err( p_filter, no image array ); -return NULL; -} //(hack) cast the picture_t to array of IplImage* -p_img = (IplImage**) p_pic-p_data_orig; +p_img = (IplImage**) p_pic-p[0].p_pixels; i_planes = p_pic-i_planes; //check the image array for validity diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c index 721eec3..a2e45ae 100644 --- a/modules/video_filter/opencv_wrapper.c +++ b/modules/video_filter/opencv_wrapper.c @@ -509,7 +509,6 @@ static void VlcPictureToIplImage( vout_thread_t *p_vout, picture_t *p_in ) //Hack the above opencv image array into a picture_t so that it can be sent to //another video filter -p_sys-hacked_pic.p_data_orig = p_sys-p_cv_image; p_sys-hacked_pic.i_planes = planes; p_sys-hacked_pic.format.i_chroma = fmt_out.i_chroma; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: OSD: remove always NULL p_f eedback button field ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sat Nov 13 23:40:24 2010 +0200| [a69d057ffdfa6477287e0ccaf544eb50557827ad] | committer: Rémi Denis-Courmont OSD: remove always NULL p_feedback button field http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a69d057ffdfa6477287e0ccaf544eb50557827ad --- include/vlc_osd.h |1 - modules/misc/osd/osd_menu.c | 20 2 files changed, 0 insertions(+), 21 deletions(-) diff --git a/include/vlc_osd.h b/include/vlc_osd.h index 06168b4..02b394e 100644 --- a/include/vlc_osd.h +++ b/include/vlc_osd.h @@ -170,7 +170,6 @@ struct osd_button_t osd_state_t *p_current_state; /* pointer to current state image */ osd_state_t *p_states; /* doubly linked list of states */ -picture_t *p_feedback; /* feedback picture */ char*psz_name; /* name of button */ diff --git a/modules/misc/osd/osd_menu.c b/modules/misc/osd/osd_menu.c index 57cd24e..a26e7c1 100644 --- a/modules/misc/osd/osd_menu.c +++ b/modules/misc/osd/osd_menu.c @@ -92,7 +92,6 @@ osd_button_t *osd_ButtonNew( const char *psz_action, int i_x, int i_y ) p_button-psz_action = strdup(psz_action); p_button-psz_action_down = NULL; -p_button-p_feedback = NULL; p_button-i_x = i_x; p_button-i_y = i_y; @@ -128,12 +127,6 @@ void osd_ButtonFree( osd_menu_t *p_menu, osd_button_t *p_button ) free( p_current-p_next-psz_name ); free( p_current-p_next-psz_action ); free( p_current-p_next-psz_action_down ); -if( p_current-p_feedback ) -{ -free( p_current-p_feedback-p_data_orig ); -free( p_current-p_feedback ); -p_current-p_feedback = NULL; -} /* Free all states first */ if( p_current-p_next-p_states ) @@ -148,13 +141,6 @@ void osd_ButtonFree( osd_menu_t *p_menu, osd_button_t *p_button ) free( p_current-p_up-psz_name ); free( p_current-p_up-psz_action ); free( p_current-p_up-psz_action_down ); -if( p_current-p_feedback ) -{ -free( p_current-p_feedback-p_data_orig ); -free( p_current-p_feedback ); -} - -p_current-p_feedback = NULL; /* Free all states first */ if( p_current-p_up-p_states ) @@ -171,12 +157,6 @@ void osd_ButtonFree( osd_menu_t *p_menu, osd_button_t *p_button ) free( p_button-psz_name ); free( p_button-psz_action ); free( p_button-psz_action_down ); -if( p_current-p_feedback ) -{ -free( p_current-p_feedback-p_data_orig ); -free( p_current-p_feedback ); -p_current-p_feedback = NULL; -} if( p_button-p_states ) osd_StatesFree( p_menu, p_button-p_states ); ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: rtp input: vorbis payload format is now an RFC (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Sat Nov 13 23:48:23 2010 +0100| [d1a8c96a9f08ac62facc360398d6bf3a33d2eeff] | committer: Pierre Ynard rtp input: vorbis payload format is now an RFC http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d1a8c96a9f08ac62facc360398d6bf3a33d2eeff --- modules/access/rtp/xiph.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/access/rtp/xiph.c b/modules/access/rtp/xiph.c index c99280a..ecae060 100644 --- a/modules/access/rtp/xiph.c +++ b/modules/access/rtp/xiph.c @@ -40,7 +40,7 @@ #include rtp.h /* PT=dynamic - * vorbis: Xiph Vorbis audio (draft-ietf-avt-rtp-vorbis-09, RFC FIXME) + * vorbis: Xiph Vorbis audio (RFC 5215) */ typedef struct rtp_vorbis_t { ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: rtp: use VLC_TS_INVALID (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Sun Nov 14 05:11:12 2010 +0100| [349f269051e7d7c5a20b8db61b0fb9f7e4b20151] | committer: Pierre Ynard rtp: use VLC_TS_INVALID http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=349f269051e7d7c5a20b8db61b0fb9f7e4b20151 --- modules/access/rtp/rtp.c |2 +- modules/access/rtp/session.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c index 55e8dd7..3cf48eb 100644 --- a/modules/access/rtp/rtp.c +++ b/modules/access/rtp/rtp.c @@ -423,7 +423,7 @@ static void codec_decode (demux_t *demux, void *data, block_t *block) { if (data) { -block-i_dts = 0; /* RTP does not specify this */ +block-i_dts = VLC_TS_INVALID; /* RTP does not specify this */ es_out_Control (demux-out, ES_OUT_SET_PCR, block-i_pts ); es_out_Send (demux-out, (es_out_id_t *)data, block); } diff --git a/modules/access/rtp/session.c b/modules/access/rtp/session.c index a9df4f1..7fb52dc 100644 --- a/modules/access/rtp/session.c +++ b/modules/access/rtp/session.c @@ -168,7 +168,7 @@ rtp_source_create (demux_t *demux, const rtp_session_t *session, source-ssrc = ssrc; source-jitter = 0; source-ref_rtp = 0; -/* TODO: use 0, but VLC does not like negative PTS at the moment */ +/* TODO: use VLC_TS_0, but VLC does not like negative PTS at the moment */ source-ref_ntp = UINT64_C (1) 62; source-max_seq = source-bad_seq = init_seq; source-last_seq = init_seq - 1; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Fix const warnings (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Sun Nov 14 10:23:25 2010 +0100| [f3f203e5fd90f74850ffd0663e90e3f30cc05a29] | committer: Pierre Ynard Fix const warnings http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3f203e5fd90f74850ffd0663e90e3f30cc05a29 --- modules/access/rtp/xiph.c |2 +- modules/demux/avformat/demux.c | 10 +- modules/demux/xiph.h |9 + 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/access/rtp/xiph.c b/modules/access/rtp/xiph.c index ecae060..fc54d80 100644 --- a/modules/access/rtp/xiph.c +++ b/modules/access/rtp/xiph.c @@ -115,7 +115,7 @@ static ssize_t vorbis_header (void **pextra, const uint8_t *buf, size_t len) unsigned sizes[3] = { idlen, cmtlen, setuplen }; -void *payloads[3] = { +const void *payloads[3] = { buf + 0, buf + idlen, buf + cmtlen diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index b195d27..69d8108 100644 --- a/modules/demux/avformat/demux.c +++ b/modules/demux/avformat/demux.c @@ -392,14 +392,14 @@ int OpenDemux( vlc_object_t *p_this ) if( cc-codec_id == CODEC_ID_THEORA b_ogg ) { unsigned pi_size[3]; -void *pp_data[3]; +const void *pp_data[3]; unsigned i_count; for( i_count = 0; i_count 3; i_count++ ) { if( i_extra 2 ) break; pi_size[i_count] = GetWBE( p_extra ); -pp_data[i_count] = (uint8_t*)p_extra[2]; +pp_data[i_count] = p_extra[2]; if( i_extra pi_size[i_count] + 2 ) break; @@ -415,15 +415,15 @@ int OpenDemux( vlc_object_t *p_this ) } else if( cc-codec_id == CODEC_ID_SPEEX b_ogg ) { -uint8_t p_dummy_comment[] = { +const uint8_t p_dummy_comment[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; unsigned pi_size[2]; -void *pp_data[2]; +const void *pp_data[2]; pi_size[0] = i_extra; -pp_data[0] = (uint8_t*)p_extra; +pp_data[0] = p_extra; pi_size[1] = sizeof(p_dummy_comment); pp_data[1] = p_dummy_comment; diff --git a/modules/demux/xiph.h b/modules/demux/xiph.h index dc1df97..24e4ca9 100644 --- a/modules/demux/xiph.h +++ b/modules/demux/xiph.h @@ -69,7 +69,7 @@ static inline int xiph_SplitHeaders(unsigned packet_size[], void *packet[], unsi } static inline int xiph_PackHeaders(int *extra_size, void **extra, - unsigned packet_size[], void *packet[], unsigned packet_count ) + unsigned packet_size[], const void *packet[], unsigned packet_count ) { if (packet_count = 0 || packet_count XIPH_MAX_HEADER_COUNT) return VLC_EGENERIC; @@ -117,7 +117,7 @@ static inline int xiph_PackHeaders(int *extra_size, void **extra, } static inline int xiph_AppendHeaders(int *extra_size, void **extra, - unsigned size, const void *data) + unsigned size, void *data) { unsigned packet_size[XIPH_MAX_HEADER_COUNT]; void *packet[XIPH_MAX_HEADER_COUNT]; @@ -134,8 +134,9 @@ static inline int xiph_AppendHeaders(int *extra_size, void **extra, free(*extra); packet_size[count] = size; -packet[count] = (void*)data; -if (xiph_PackHeaders(extra_size, extra, packet_size, packet, count + 1)) { +packet[count] = data; +if (xiph_PackHeaders(extra_size, extra, packet_size, + (const void **)packet, count + 1)) { *extra_size = 0; *extra = NULL; } ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Fix constness (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Sun Nov 14 11:58:01 2010 +0100| [8de0803830d33aeb3c5cbca98cb6e94f16aacc1d] | committer: Pierre Ynard Fix constness Partially reverts f3f203e5fd90f74850ffd0663e90e3f30cc05a29 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8de0803830d33aeb3c5cbca98cb6e94f16aacc1d --- modules/demux/xiph.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/demux/xiph.h b/modules/demux/xiph.h index 24e4ca9..9c92906 100644 --- a/modules/demux/xiph.h +++ b/modules/demux/xiph.h @@ -117,7 +117,7 @@ static inline int xiph_PackHeaders(int *extra_size, void **extra, } static inline int xiph_AppendHeaders(int *extra_size, void **extra, - unsigned size, void *data) + unsigned size, const void *data) { unsigned packet_size[XIPH_MAX_HEADER_COUNT]; void *packet[XIPH_MAX_HEADER_COUNT]; @@ -134,7 +134,7 @@ static inline int xiph_AppendHeaders(int *extra_size, void **extra, free(*extra); packet_size[count] = size; -packet[count] = data; +packet[count] = (void*)data; if (xiph_PackHeaders(extra_size, extra, packet_size, (const void **)packet, count + 1)) { *extra_size = 0; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: contribs: fixed libiconv hack on Darwin10 ( Felix Paul Kühne )
vlc | branch: master | Felix Paul Kühne fkue...@videolan.org | Sun Nov 14 16:41:50 2010 +0100| [e536be03ef35cdd59f4096a9e2e66b0862da1954] | committer: Felix Paul Kühne contribs: fixed libiconv hack on Darwin10 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e536be03ef35cdd59f4096a9e2e66b0862da1954 --- extras/contrib/bootstrap |2 ++ extras/contrib/contrib.mak |2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/extras/contrib/bootstrap b/extras/contrib/bootstrap index c4893ba..c327467 100755 --- a/extras/contrib/bootstrap +++ b/extras/contrib/bootstrap @@ -342,6 +342,8 @@ case $DISTRO in case $TARGET in x86_64*|i686*) add_enabled_makefile_cfg HAVE_MACOSX_ON_INTEL ;; +esac +case $TARGET in *darwin10) add_enabled_makefile_cfg HAVE_MACOSX_DARWIN_10 ;; *darwin9) add_enabled_makefile_cfg HAVE_MACOSX_DARWIN_9 ;; esac diff --git a/extras/contrib/contrib.mak b/extras/contrib/contrib.mak index 45af547..dc8d36c 100644 --- a/extras/contrib/contrib.mak +++ b/extras/contrib/contrib.mak @@ -69,7 +69,7 @@ contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2: (cd build-src rm -rf *gecko* $(MAKE) .gecko) # libiconv.la is no longer present on Snow Leopard, so fix possible references to it, which would # result in linking issues -ifdef HAVE_DARWIN_10 +ifdef HAVE_MACOSX_DARWIN_10 (cd $(PREFIX)/lib sed -e 's%/usr/lib/libiconv.la%$(PREFIX)/lib/libiconv.la%g' -i.orig *.la rm -f *.la.orig) (cd build-src rm -f .iconv $(MAKE) .iconv) endif ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: swscale: fix 15- and 16-bits RGB conversions ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 14 18:26:19 2010 +0200| [37e37fb11e1da56e02d79a973b7bc170223b] | committer: Rémi Denis-Courmont swscale: fix 15- and 16-bits RGB conversions This is tested with X11 and should fix LP#665298. This partially reverts commit fb7f014161f68c914e028adbea68b7ee9863c76e. RV24 is left as is because I cannot test it on my GPU. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=37e37fb11e1da56e02d79a973b7bc170223b --- modules/codec/avcodec/chroma.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c index 8418e78..9a40417 100644 --- a/modules/codec/avcodec/chroma.c +++ b/modules/codec/avcodec/chroma.c @@ -92,8 +92,8 @@ static const struct VLC_RGB( VLC_FOURCC('R','G','B','4'), PIX_FMT_RGB4, PIX_FMT_BGR4, 0x10, 0x06, 0x01 ) VLC_RGB( VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8, PIX_FMT_BGR8, 0xC0, 0x38, 0x07 ) -VLC_RGB( VLC_CODEC_RGB15, PIX_FMT_BGR555, PIX_FMT_RGB555, 0x7c00, 0x03e0, 0x001f ) -VLC_RGB( VLC_CODEC_RGB16, PIX_FMT_BGR565, PIX_FMT_RGB565, 0xf800, 0x07e0, 0x001f ) +VLC_RGB( VLC_CODEC_RGB15, PIX_FMT_RGB555, PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f ) +VLC_RGB( VLC_CODEC_RGB16, PIX_FMT_RGB565, PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f ) VLC_RGB( VLC_CODEC_RGB24, PIX_FMT_BGR24, PIX_FMT_RGB24, 0xff, 0x00ff00, 0xff ) VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32, PIX_FMT_BGR32, 0x00ff, 0xff00, 0x00ff ) ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: swscale: fix 15- and 16-bits RGB conversions ( Rémi Denis-Courmont )
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 14 18:26:19 2010 +0200| [621c2e9779fd6481978ef9fc38b0332fbc24b2b6] | committer: Rémi Denis-Courmont swscale: fix 15- and 16-bits RGB conversions This is tested with X11 and should fix LP#665298. This partially reverts commit fb7f014161f68c914e028adbea68b7ee9863c76e. RV24 is left as is because I cannot test it on my GPU. (cherry picked from commit 37e37fb11e1da56e02d79a973b7bc170223b) http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=621c2e9779fd6481978ef9fc38b0332fbc24b2b6 --- modules/codec/avcodec/chroma.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c index f857f09..fd0cebf 100644 --- a/modules/codec/avcodec/chroma.c +++ b/modules/codec/avcodec/chroma.c @@ -98,8 +98,8 @@ static const struct VLC_RGB( VLC_FOURCC('R','G','B','4'), PIX_FMT_RGB4, PIX_FMT_BGR4, 0x10, 0x06, 0x01 ) VLC_RGB( VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8, PIX_FMT_BGR8, 0xC0, 0x38, 0x07 ) -VLC_RGB( VLC_CODEC_RGB15, PIX_FMT_BGR555, PIX_FMT_RGB555, 0x7c00, 0x03e0, 0x001f ) -VLC_RGB( VLC_CODEC_RGB16, PIX_FMT_BGR565, PIX_FMT_RGB565, 0xf800, 0x07e0, 0x001f ) +VLC_RGB( VLC_CODEC_RGB15, PIX_FMT_RGB555, PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f ) +VLC_RGB( VLC_CODEC_RGB16, PIX_FMT_RGB565, PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f ) VLC_RGB( VLC_CODEC_RGB24, PIX_FMT_BGR24, PIX_FMT_RGB24, 0xff, 0x00ff00, 0xff ) VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32, PIX_FMT_BGR32, 0x00ff, 0xff00, 0x00ff ) ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: windrive: basic disc discover y for Win32 ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 14 23:13:17 2010 +0200| [c37a60a3fd351a26fa5c11f41b5f16ff625036c7] | committer: Rémi Denis-Courmont windrive: basic disc discovery for Win32 This is completely untested (other than compiling linking). http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c37a60a3fd351a26fa5c11f41b5f16ff625036c7 --- modules/LIST |1 + modules/services_discovery/Modules.am |8 +++ modules/services_discovery/windrive.c | 86 + 3 files changed, 95 insertions(+), 0 deletions(-) diff --git a/modules/LIST b/modules/LIST index fe326c3..ee82cfe 100644 --- a/modules/LIST +++ b/modules/LIST @@ -340,6 +340,7 @@ $Id$ * wave: Wave video effect * waveout: simple audio output module for Windows * win32text: Text renderer using native Win32 API + * windrive: Windows logical disc drives * wingapi: Win CE video output * wingdi: WIN 32 / WIN CE GDI video output * wma_fixed: wma decoder using integer decoder from Rockbox diff --git a/modules/services_discovery/Modules.am b/modules/services_discovery/Modules.am index ed17718..846d112 100644 --- a/modules/services_discovery/Modules.am +++ b/modules/services_discovery/Modules.am @@ -24,6 +24,14 @@ if HAVE_XCB libvlc_LTLIBRARIES += libxcb_apps_plugin.la endif +libwindrive_plugin_la_SOURCES = windrive.c +libwindrive_plugin_la_CFLAGS = $(AM_CFLAGS) +libwindrive_plugin_la_LIBADD = $(AM_LIBADD) +libwindrive_plugin_la_DEPENDENCIES = +if HAVE_WIN32 +libvlc_LTLIBRARIES += libwindrive_plugin.la +endif + EXTRA_LTLIBRARIES += \ libudev_plugin.la libvlc_LTLIBRARIES += \ diff --git a/modules/services_discovery/windrive.c b/modules/services_discovery/windrive.c new file mode 100644 index 000..d17a76b --- /dev/null +++ b/modules/services_discovery/windrive.c @@ -0,0 +1,86 @@ +/** + * @file win_disc.c + * @brief List of disc drives for VLC media player for Windows + */ +/* + * Copyright © 2010 Rémi Denis-Courmont + * + * This library 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 library 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 General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, 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 + +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; + +LONG drives = GetLogicalDrives (); +char mrl[12] = file:///A:/, name[3] = A:; +TCHAR path[4] = A:\\; + +for (char d = 0; d 26; d++) +{ +input_item_t *item; +char letter = 'A' + d; + +/* Does this drive actually exist? */ +if (!(drives (1 d))) +continue; +/* Is it a disc drive? */ +path[0] = letter; +if (GetDriveType (path) != DRIVE_CDROM) +continue; + +mrl[8] = name[0] = letter; +item = input_item_NewWithType (VLC_OBJECT (sd), 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)); +} +return VLC_SUCCESS; +} ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: video_filters: remove dummy assignement. ( Rémi Duraffort )
vlc | branch: master | Rémi Duraffort ivo...@videolan.org | Mon Nov 15 18:07:39 2010 +0100| [70cf9406b4d6d62195ee4bd9ad022909075eae97] | committer: Rémi Duraffort video_filters: remove dummy assignement. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=70cf9406b4d6d62195ee4bd9ad022909075eae97 --- modules/video_filter/erase.c |3 +-- modules/video_filter/osdmenu.c |1 - 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/modules/video_filter/erase.c b/modules/video_filter/erase.c index 111e92a..4bcb020 100644 --- a/modules/video_filter/erase.c +++ b/modules/video_filter/erase.c @@ -251,7 +251,6 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic, const int i_visible_pitch = p_inpic-p[i_plane].i_visible_pitch; const int i_visible_lines = p_inpic-p[i_plane].i_visible_lines; -uint8_t *p_outpix = p_outpic-p[i_plane].p_pixels; uint8_t *p_mask = p_sys-p_mask-A_PIXELS; int i_x = p_sys-i_x, i_y = p_sys-i_y; @@ -280,7 +279,7 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic, plane_CopyPixels( p_outpic-p[i_plane], p_inpic-p[i_plane] ); /* Horizontal linear interpolation of masked areas */ -p_outpix = p_outpic-p[i_plane].p_pixels + i_y*i_pitch + i_x; +uint8_t *p_outpix = p_outpic-p[i_plane].p_pixels + i_y*i_pitch + i_x; for( y = 0; y i_height; y++, p_mask += i_mask_pitch, p_outpix += i_pitch ) { diff --git a/modules/video_filter/osdmenu.c b/modules/video_filter/osdmenu.c index 7e2efd2..0400813 100644 --- a/modules/video_filter/osdmenu.c +++ b/modules/video_filter/osdmenu.c @@ -462,7 +462,6 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t i_date ) p_sys-i_end_date = p_spu-i_stop; } -p_sys-i_last_date = i_date; p_spu-i_start = p_sys-i_last_date = i_date; /* Send an empty subpicture to clear the display ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: C++: use prefix iterators ins tead of postfix. ( Rémi Duraffort )
vlc | branch: master | Rémi Duraffort ivo...@videolan.org | Fri Nov 12 10:57:39 2010 +0100| [30a0aa26b0aac7166e90c94d6f76b7d2b5682a34] | committer: Rémi Duraffort C++: use prefix iterators instead of postfix. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30a0aa26b0aac7166e90c94d6f76b7d2b5682a34 --- modules/demux/mkv/chapters.cpp |2 +- modules/demux/mkv/matroska_segment.cpp |6 +++--- modules/gui/qt4/components/epg/EPGWidget.cpp |2 +- .../gui/qt4/components/playlist/playlist_model.cpp |2 +- modules/gui/skins2/src/theme_loader.cpp|2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/demux/mkv/chapters.cpp b/modules/demux/mkv/chapters.cpp index dfcaa30..5b44e0d 100644 --- a/modules/demux/mkv/chapters.cpp +++ b/modules/demux/mkv/chapters.cpp @@ -383,7 +383,7 @@ mtime_t chapter_edition_c::Duration() const if ( sub_chapters.size() ) { std::vectorchapter_item_c*::const_iterator index = sub_chapters.end(); -index--; +--index; i_result = (*index)-i_user_end_time; } diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp index 977bf84..a91aeda 100644 --- a/modules/demux/mkv/matroska_segment.cpp +++ b/modules/demux/mkv/matroska_segment.cpp @@ -70,19 +70,19 @@ matroska_segment_c::~matroska_segment_c() while ( index != stored_editions.end() ) { delete (*index); -index++; +++index; } std::vectorchapter_translation_c*::iterator indext = translations.begin(); while ( indext != translations.end() ) { delete (*indext); -indext++; +++indext; } std::vectorKaxSegmentFamily*::iterator indexf = families.begin(); while ( indexf != families.end() ) { delete (*indexf); -indexf++; +++indexf; } } diff --git a/modules/gui/qt4/components/epg/EPGWidget.cpp b/modules/gui/qt4/components/epg/EPGWidget.cpp index 3bc91ac..6fc743b 100644 --- a/modules/gui/qt4/components/epg/EPGWidget.cpp +++ b/modules/gui/qt4/components/epg/EPGWidget.cpp @@ -124,7 +124,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg ) { m_epgView-delEvent( item ); delete item; -i--; +--i; m_events.erase( i + 1 ); } else diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp index 1f91c23..24bf638 100644 --- a/modules/gui/qt4/components/playlist/playlist_model.cpp +++ b/modules/gui/qt4/components/playlist/playlist_model.cpp @@ -553,7 +553,7 @@ PLItem * PLModel::findInner( PLItem *root, int i_id, bool b_input ) const if( childFound ) return childFound; } -it++; +++it; } return NULL; } diff --git a/modules/gui/skins2/src/theme_loader.cpp b/modules/gui/skins2/src/theme_loader.cpp index 7a67113..7696026 100644 --- a/modules/gui/skins2/src/theme_loader.cpp +++ b/modules/gui/skins2/src/theme_loader.cpp @@ -296,7 +296,7 @@ bool ThemeLoader::extract( const string fileName ) // Look for winamp2.xml in the resource path liststring resPath = pOsFactory-getResourcePath(); liststring::const_iterator it; -for( it = resPath.begin(); it != resPath.end(); it++ ) +for( it = resPath.begin(); it != resPath.end(); ++it ) { if( findFile( *it, WINAMP2_XML_FILE, xmlFile ) ) break; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: directory: small simplificati on ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 15 20:14:27 2010 +0200| [5c74532978769a77a9af617dba8fa6eda897a353] | committer: Rémi Denis-Courmont directory: small simplification http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c74532978769a77a9af617dba8fa6eda897a353 --- modules/access/directory.c | 62 ++- 1 files changed, 26 insertions(+), 36 deletions(-) diff --git a/modules/access/directory.c b/modules/access/directory.c index b778cf0..3dd96a7 100644 --- a/modules/access/directory.c +++ b/modules/access/directory.c @@ -81,10 +81,9 @@ struct directory_t struct access_sys_t { directory_t *current; -DIR *handle; -char *uri; char *ignored_exts; -int mode; +char mode; +bool header; int i_item_count; char *psz_xspf_extension; }; @@ -123,11 +122,30 @@ int DirInit (access_t *p_access, DIR *handle) if (unlikely(uri == NULL)) goto error; +/* Open the base directory */ +directory_t *root = malloc (sizeof (*root)); +if (unlikely(root == NULL)) +{ +free (uri); +goto error; +} +root-parent = NULL; +root-handle = handle; +root-uri = uri; +#ifndef HAVE_OPENAT +root-path = strdup (p_access-psz_filepath); +#endif +if (fstat (dirfd (handle), root-st)) +{ +free (root); +free (uri); +goto error; +} + p_access-p_sys = p_sys; -p_sys-current = NULL; -p_sys-handle = handle; -p_sys-uri = uri; +p_sys-current = root; p_sys-ignored_exts = var_InheritString (p_access, ignore-filetypes); +p_sys-header = true; p_sys-i_item_count = 0; p_sys-psz_xspf_extension = strdup( ); @@ -178,11 +196,6 @@ void DirClose( vlc_object_t * p_this ) free (current); } -/* corner case: Block() not called ever */ -if (p_sys-handle != NULL) -closedir (p_sys-handle); -free (p_sys-uri); - free (p_sys-psz_xspf_extension); free (p_sys-ignored_exts); free (p_sys); @@ -214,7 +227,7 @@ block_t *DirBlock (access_t *p_access) if (p_access-info.b_eof) return NULL; -if (current == NULL) +if (p_sys-header) { /* Startup: send the XSPF header */ static const char header[] = ?xml version=\1.0\ encoding=\UTF-8\?\n @@ -224,30 +237,7 @@ block_t *DirBlock (access_t *p_access) if (!block) goto fatal; memcpy (block-p_buffer, header, sizeof (header) - 1); - -/* Open the base directory */ -current = malloc (sizeof (*current)); -if (current == NULL) -{ -block_Release (block); -goto fatal; -} -current-parent = NULL; -current-handle = p_sys-handle; -#ifndef HAVE_OPENAT -current-path = strdup (p_access-psz_filepath); -#endif -current-uri = p_sys-uri; -if (fstat (dirfd (current-handle), current-st)) -{ -free (current); -block_Release (block); -goto fatal; -} - -p_sys-handle = NULL; -p_sys-uri = NULL; -p_sys-current = current; +p_sys-header = false; return block; } ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Fix typo. ( Rémi Duraf fort )
vlc | branch: master | Rémi Duraffort ivo...@videolan.org | Mon Nov 15 19:20:24 2010 +0100| [18d1dcb4b64d5c252aa91fd4a38684f52a03695a] | committer: Rémi Duraffort Fix typo. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=18d1dcb4b64d5c252aa91fd4a38684f52a03695a --- .gitignore |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/.gitignore b/.gitignore index 2ba7644..0ded65d 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,4 @@ CMakeCache.txt CPackConfig.cmake CPackSourceConfig.cmake -/include/vlc/libvlc_version.h +include/vlc/libvlc_version.h ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: directory: cleanup, avoid u seless allocs ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 15 21:14:17 2010 +0200| [5f27b4c202dc309db6cf4bc4320f735ff4764abe] | committer: Rémi Denis-Courmont directory: cleanup, avoid useless allocs http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f27b4c202dc309db6cf4bc4320f735ff4764abe --- modules/access/directory.c | 212 ++-- 1 files changed, 105 insertions(+), 107 deletions(-) diff --git a/modules/access/directory.c b/modules/access/directory.c index 3dd96a7..515705b 100644 --- a/modules/access/directory.c +++ b/modules/access/directory.c @@ -70,10 +70,10 @@ struct directory_t directory_t *parent; DIR *handle; char*uri; -#ifndef WIN32 -struct stat st; -#endif -#ifndef HAVE_OPENAT +#ifdef HAVE_OPENAT +dev_tdevice; +ino_tinode; +#else char *path; #endif }; @@ -85,7 +85,7 @@ struct access_sys_t char mode; bool header; int i_item_count; -char *psz_xspf_extension; +char *xspf_ext; }; /* @@ -132,22 +132,26 @@ int DirInit (access_t *p_access, DIR *handle) root-parent = NULL; root-handle = handle; root-uri = uri; -#ifndef HAVE_OPENAT -root-path = strdup (p_access-psz_filepath); -#endif -if (fstat (dirfd (handle), root-st)) +#ifdef HAVE_OPENAT +struct stat st; +if (fstat (dirfd (handle), st)) { free (root); free (uri); goto error; } +root-device = st.st_dev; +root-inode = st.st_ino; +#else +root-path = strdup (p_access-psz_filepath); +#endif p_access-p_sys = p_sys; p_sys-current = root; p_sys-ignored_exts = var_InheritString (p_access, ignore-filetypes); p_sys-header = true; p_sys-i_item_count = 0; -p_sys-psz_xspf_extension = strdup( ); +p_sys-xspf_ext = strdup (); /* Handle mode */ char *psz = var_InheritString (p_access, recursive); @@ -196,26 +200,20 @@ void DirClose( vlc_object_t * p_this ) free (current); } -free (p_sys-psz_xspf_extension); +free (p_sys-xspf_ext); free (p_sys-ignored_exts); free (p_sys); } /* Detect directories that recurse into themselves. */ -static bool has_inode_loop (const directory_t *dir) +static bool has_inode_loop (const directory_t *dir, dev_t dev, ino_t inode) { -#ifndef WIN32 -dev_t dev = dir-st.st_dev; -ino_t inode = dir-st.st_ino; - -while ((dir = dir-parent) != NULL) -if ((dir-st.st_dev == dev) (dir-st.st_ino == inode)) +while (dir != NULL) +{ +if ((dir-device == dev) (dir-inode == inode)) return true; -#else -# undef fstat -# define fstat( fd, st ) (0) -VLC_UNUSED( dir ); -#endif +dir = dir-parent; +} return false; } @@ -255,11 +253,12 @@ block_t *DirBlock (access_t *p_access) if (p_sys-current == NULL) { /* End of XSPF playlist */ char *footer; -int len = asprintf( footer, /trackList\n \ - extension application=\http://www.videolan.org/vlc/playlist/0\;\n \ -%s \ - /extension\n \ -/playlist\n, p_sys-psz_xspf_extension ); +int len = asprintf (footer, /trackList\n + extension application=\http://www.videolan.org/; + vlc/playlist/0\\n +%s + /extension\n +/playlist\n, p_sys-xspf_ext ? p_sys-xspf_ext : ); if (unlikely(len == -1)) goto fatal; @@ -273,14 +272,12 @@ block_t *DirBlock (access_t *p_access) { /* This was the end of a subnode */ /* Write the ID to the extension */ -char *old_xspf_extension = p_sys-psz_xspf_extension; -if (old_xspf_extension == NULL) -goto fatal; - -int len2 = asprintf( p_sys-psz_xspf_extension, %s /vlc:node\n, old_xspf_extension ); -if (len2 == -1) -goto fatal; -free( old_xspf_extension ); +char *old_xspf_ext = p_sys-xspf_ext; +if (old_xspf_ext != NULL + asprintf (p_sys-xspf_ext, %s /vlc:node\n, + old_xspf_ext ? old_xspf_ext : ) == -1) +p_sys-xspf_ext = NULL; +free (old_xspf_ext); } return NULL; } @@ -291,83 +288,83 @@ block_t *DirBlock (access_t *p_access) free (entry); return NULL; } + /* Handle recursion */ if (p_sys-mode != MODE_COLLAPSE) { -directory_t *sub = malloc (sizeof (*sub)); -if (sub == NULL) -{ -free (entry); -return NULL; -} - DIR *handle; #ifdef HAVE_OPENAT int fd = vlc_openat (dirfd (current-handle), entry, O_RDONLY); -if (fd != -1
[vlc-commits] commit: directory: collate file names from the same directory ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 15 22:24:03 2010 +0200| [e4ea738909bdacad129723015449ba6344b315bd] | committer: Rémi Denis-Courmont directory: collate file names from the same directory http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4ea738909bdacad129723015449ba6344b315bd --- modules/access/directory.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/access/directory.c b/modules/access/directory.c index 9beafe3..4e43924 100644 --- a/modules/access/directory.c +++ b/modules/access/directory.c @@ -96,6 +96,11 @@ static int visible (const char *name) return name[0] != '.'; } +static int collate (const char **a, const char **b) +{ +return strcoll (*a, *b); +} + /* * Open: open the directory */ @@ -140,7 +145,7 @@ int DirInit (access_t *p_access, DIR *handle) root-parent = NULL; root-handle = handle; root-uri = uri; -root-filec = vlc_loaddir (handle, root-filev, visible, NULL); +root-filec = vlc_loaddir (handle, root-filev, visible, collate); if (root-filec 0) root-filev = NULL; root-i = 0; @@ -346,7 +351,7 @@ block_t *DirBlock (access_t *p_access) } sub-parent = current; sub-handle = handle; -sub-filec = vlc_loaddir (handle, sub-filev, visible, NULL); +sub-filec = vlc_loaddir (handle, sub-filev, visible, collate); if (sub-filec 0) sub-filev = NULL; sub-i = 0; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt: Workaround the bug of preference height on small screens ( Jean-Baptiste Kempf )
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf j...@videolan.org | Mon Nov 15 22:35:23 2010 +0100| [862bdbdee27819b97a90211ecfa745a42a6620bf] | committer: Jean-Baptiste Kempf Qt: Workaround the bug of preference height on small screens Close #3884 http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=862bdbdee27819b97a90211ecfa745a42a6620bf --- modules/gui/qt4/dialogs/preferences.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/gui/qt4/dialogs/preferences.cpp b/modules/gui/qt4/dialogs/preferences.cpp index 2bfa9db..57d612d 100644 --- a/modules/gui/qt4/dialogs/preferences.cpp +++ b/modules/gui/qt4/dialogs/preferences.cpp @@ -111,7 +111,7 @@ PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf ) tree_panel_l-setMargin( 1 ); main_panel_l-setContentsMargins( 6, 0, 0, 3 ); -b_small = (p_intf-p_sys-i_screenHeight 750); +b_small = (p_intf-p_sys-i_screenHeight 850); if( b_small ) msg_Dbg( p_intf, Small); setMaximumHeight( p_intf-p_sys-i_screenHeight ); for( int i = 0; i SPrefsMax ; i++ ) simple_panels[i] = NULL; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt: correctly implement play-and-exit in menu (Jean-Baptiste Kempf )
vlc | branch: master | Jean-Baptiste Kempf j...@videolan.org | Mon Nov 15 22:20:09 2010 +0100| [5e85bff1849e4391b6598bfbcc5a6c65cd1e151d] | committer: Jean-Baptiste Kempf Qt: correctly implement play-and-exit in menu This calls a var_GetBool each time a menu is redrawn. This may be not optimal. Maybe a callback on play-and-exit would be better? Do we care about the performance on that part (menu display)? Close #3842 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5e85bff1849e4391b6598bfbcc5a6c65cd1e151d --- modules/gui/qt4/input_manager.cpp |4 modules/gui/qt4/input_manager.hpp |1 + modules/gui/qt4/menus.cpp | 11 --- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp index c6ed2b0..1cefa87 100644 --- a/modules/gui/qt4/input_manager.cpp +++ b/modules/gui/qt4/input_manager.cpp @@ -1146,6 +1146,10 @@ void MainInputManager::activatePlayQuit( bool b_exit ) var_SetBool( THEPL, play-and-exit, b_exit ); } +bool MainInputManager::getPlayExitState() +{ +return var_GetBool( THEPL, play-and-exit ); +} / * Static callbacks for MIM * diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp index 3654984..65a32e1 100644 --- a/modules/gui/qt4/input_manager.hpp +++ b/modules/gui/qt4/input_manager.hpp @@ -265,6 +265,7 @@ public: vout_thread_t* getVout(); aout_instance_t *getAout(); +bool getPlayExitState(); private: MainInputManager( intf_thread_t * ); virtual ~MainInputManager(); diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp index 2e5d085..f3e5cd6 100644 --- a/modules/gui/qt4/menus.cpp +++ b/modules/gui/qt4/menus.cpp @@ -487,13 +487,10 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface action-setChecked( mi-isPlDocked() ); CONNECT( action, triggered( bool ), mi, dockPlaylist( bool ) ); -if( !current ) -// I don't want to manage consistency between menus, so no popup-menu -{ -action = menu-addAction( qtr( Quit after Playback ) ); -action-setCheckable( true ); -CONNECT( action, triggered( bool ), THEMIM, activatePlayQuit( bool ) ); -} +action = menu-addAction( qtr( Quit after Playback ) ); +action-setCheckable( true ); +action-setChecked( THEMIM-getPlayExitState() ); +CONNECT( action, triggered( bool ), THEMIM, activatePlayQuit( bool ) ); #if 0 /* For Visualisations. Not yet working */ adv = menu-addAction( qtr( Visualizations selector ), ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt: improve look of extension dialog (Jean-Baptiste Kempf )
vlc | branch: master | Jean-Baptiste Kempf j...@videolan.org | Mon Nov 15 21:57:34 2010 +0100| [7a2f855c7e7923b988f6014c8a195e40aac8a346] | committer: Jean-Baptiste Kempf Qt: improve look of extension dialog Should close #4332 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a2f855c7e7923b988f6014c8a195e40aac8a346 --- modules/gui/qt4/dialogs/plugins.cpp |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/modules/gui/qt4/dialogs/plugins.cpp b/modules/gui/qt4/dialogs/plugins.cpp index c29bd2d..07f08ea 100644 --- a/modules/gui/qt4/dialogs/plugins.cpp +++ b/modules/gui/qt4/dialogs/plugins.cpp @@ -420,6 +420,7 @@ void ExtensionItemDelegate::paint( QPainter *painter, /// @todo Add extension's icon // Title: bold +pixpaint-setRenderHint( QPainter::TextAntialiasing ); font.setBold( true ); pixpaint-setFont( font ); pixpaint-drawText( QRect( 10, 7, width - 70, metrics.height() ), ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt: correctly implement play-and-exit in menu (Jean-Baptiste Kempf )
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf j...@videolan.org | Mon Nov 15 22:20:09 2010 +0100| [d79c2ea8b55513acdc93b765002c12f98f6277d3] | committer: Jean-Baptiste Kempf Qt: correctly implement play-and-exit in menu This calls a var_GetBool each time a menu is redrawn. This may be not optimal. Maybe a callback on play-and-exit would be better? Do we care about the performance on that part (menu display)? Close #3842 (cherry picked from commit 5e85bff1849e4391b6598bfbcc5a6c65cd1e151d) Signed-off-by: Jean-Baptiste Kempf j...@videolan.org http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=d79c2ea8b55513acdc93b765002c12f98f6277d3 --- modules/gui/qt4/input_manager.cpp |4 modules/gui/qt4/input_manager.hpp |1 + modules/gui/qt4/menus.cpp | 11 --- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp index 669a9db..7961729 100644 --- a/modules/gui/qt4/input_manager.cpp +++ b/modules/gui/qt4/input_manager.cpp @@ -1148,6 +1148,10 @@ void MainInputManager::activatePlayQuit( bool b_exit ) var_SetBool( THEPL, play-and-exit, b_exit ); } +bool MainInputManager::getPlayExitState() +{ +return var_GetBool( THEPL, play-and-exit ); +} / * Static callbacks for MIM * diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp index 3654984..65a32e1 100644 --- a/modules/gui/qt4/input_manager.hpp +++ b/modules/gui/qt4/input_manager.hpp @@ -265,6 +265,7 @@ public: vout_thread_t* getVout(); aout_instance_t *getAout(); +bool getPlayExitState(); private: MainInputManager( intf_thread_t * ); virtual ~MainInputManager(); diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp index 2302559..e95a5ef 100644 --- a/modules/gui/qt4/menus.cpp +++ b/modules/gui/qt4/menus.cpp @@ -484,13 +484,10 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface action-setChecked( mi-isPlDocked() ); CONNECT( action, triggered( bool ), mi, dockPlaylist( bool ) ); -if( !current ) -// I don't want to manage consistency between menus, so no popup-menu -{ -action = menu-addAction( qtr( Quit after Playback ) ); -action-setCheckable( true ); -CONNECT( action, triggered( bool ), THEMIM, activatePlayQuit( bool ) ); -} +action = menu-addAction( qtr( Quit after Playback ) ); +action-setCheckable( true ); +action-setChecked( THEMIM-getPlayExitState() ); +CONNECT( action, triggered( bool ), THEMIM, activatePlayQuit( bool ) ); #if 0 /* For Visualisations. Not yet working */ adv = menu-addAction( qtr( Visualizations selector ), ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: directory: build fix (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Tue Nov 16 06:00:20 2010 +0100| [4ba326218a87f8748f6792e45f158b1238efba1f] | committer: Pierre Ynard directory: build fix http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ba326218a87f8748f6792e45f158b1238efba1f --- modules/access/directory.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/modules/access/directory.c b/modules/access/directory.c index 4e43924..0e0d57e 100644 --- a/modules/access/directory.c +++ b/modules/access/directory.c @@ -225,6 +225,7 @@ void DirClose( vlc_object_t * p_this ) free (p_sys); } +#ifdef HAVE_OPENAT /* Detect directories that recurse into themselves. */ static bool has_inode_loop (const directory_t *dir, dev_t dev, ino_t inode) { @@ -236,6 +237,7 @@ static bool has_inode_loop (const directory_t *dir, dev_t dev, ino_t inode) } return false; } +#endif block_t *DirBlock (access_t *p_access) { ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: i18n: add new file (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Tue Nov 16 06:06:27 2010 +0100| [d3e5e2ca2465892e5ac203daf8b78fd1faec4970] | committer: Pierre Ynard i18n: add new file http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3e5e2ca2465892e5ac203daf8b78fd1faec4970 --- po/POTFILES.in |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 5480643..223774d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1008,6 +1008,7 @@ modules/services_discovery/podcast.c modules/services_discovery/sap.c modules/services_discovery/udev.c modules/services_discovery/upnp_intel.cpp +modules/services_discovery/windrive.c modules/services_discovery/xcb_apps.c modules/stream_filter/decomp.c modules/stream_filter/record.c ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Subtitles: remove .txt for autodetection (Jean-Baptiste Kempf )
vlc | branch: master | Jean-Baptiste Kempf j...@videolan.org | Mon Nov 15 23:04:51 2010 +0100| [2afaacab847a7081f841cfd1c0dc3193c9e3e5bf] | committer: Jean-Baptiste Kempf Subtitles: remove .txt for autodetection This lead to way too many false positive and complaints when VLC tried to open a .txt file that had nothing to do with a subtitle Signed-off-by: Jean-Baptiste Kempf j...@videolan.org http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2afaacab847a7081f841cfd1c0dc3193c9e3e5bf --- src/input/subtitles.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/input/subtitles.c b/src/input/subtitles.c index 9c6843d..ed3f7c7 100644 --- a/src/input/subtitles.c +++ b/src/input/subtitles.c @@ -57,7 +57,7 @@ static const char const sub_exts[][6] = { idx, sub, srt, ssa, ass, smi, utf, utf8, utf-8, -txt, rt, aqt, +rt, aqt, usf, jss, cdg, psb, mpsub,mpl2, pjs, dks, ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Subtitles: remove .txt for autodetection (Jean-Baptiste Kempf )
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf j...@videolan.org | Mon Nov 15 23:04:51 2010 +0100| [9f777cc695008fa6d4732a598100145192aa702d] | committer: Jean-Baptiste Kempf Subtitles: remove .txt for autodetection This lead to way too many false positive and complaints when VLC tried to open a .txt file that had nothing to do with a subtitle Signed-off-by: Jean-Baptiste Kempf j...@videolan.org (cherry picked from commit 2afaacab847a7081f841cfd1c0dc3193c9e3e5bf) Signed-off-by: Jean-Baptiste Kempf j...@videolan.org http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=9f777cc695008fa6d4732a598100145192aa702d --- src/input/subtitles.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/input/subtitles.c b/src/input/subtitles.c index 2ca105f..bd5e49c 100644 --- a/src/input/subtitles.c +++ b/src/input/subtitles.c @@ -61,7 +61,7 @@ static const char const sub_exts[][6] = { idx, sub, srt, ssa, ass, smi, utf, utf8, utf-8, -txt, rt, aqt, +rt, aqt, usf, jss, cdg, psb, mpsub,mpl2, pjs, dks, ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Add http-referrer option to HTTP access module (Jonas Gehring )
vlc | branch: master | Jonas Gehring jonas.gehr...@boolsoft.org | Fri Nov 12 23:49:17 2010 +0100| [ef7a981f943c426c7868ef80b78ec0752bb5b820] | committer: Jean-Baptiste Kempf Add http-referrer option to HTTP access module Signed-off-by: Jean-Baptiste Kempf j...@videolan.org http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ef7a981f943c426c7868ef80b78ec0752bb5b820 --- modules/access/http.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/modules/access/http.c b/modules/access/http.c index b1890d1..899c838 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -119,6 +119,8 @@ vlc_module_begin () add_integer( http-caching, 4 * DEFAULT_PTS_DELAY / 1000, CACHING_TEXT, CACHING_LONGTEXT, true ) change_safe() +add_string( http-referrer, NULL, NULL, NULL, false ) +change_safe() add_string( http-user-agent, NULL, NULL, NULL, false ) change_safe() change_private() @@ -156,6 +158,7 @@ struct access_sys_t /* From uri */ vlc_url_t url; char*psz_user_agent; +char*psz_referrer; http_auth_t auth; /* Proxy */ @@ -281,6 +284,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access, p_sys-b_icecast = false; p_sys-psz_location = NULL; p_sys-psz_user_agent = NULL; +p_sys-psz_referrer = NULL; p_sys-b_pace_control = true; p_sys-b_ssl = false; #ifdef HAVE_ZLIB_H @@ -350,6 +354,9 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access, } } +/* HTTP referrer */ +p_sys-psz_referrer = var_InheritString( p_access, http-referrer ); + /* Check proxy */ psz = var_InheritString( p_access, http-proxy ); if( psz ) @@ -596,6 +603,7 @@ connect: free( p_sys-psz_pragma ); free( p_sys-psz_location ); free( p_sys-psz_user_agent ); +free( p_sys-psz_referrer ); Disconnect( p_access ); cookies = p_sys-cookies; @@ -690,6 +698,7 @@ error: free( p_sys-psz_pragma ); free( p_sys-psz_location ); free( p_sys-psz_user_agent ); +free( p_sys-psz_referrer ); Disconnect( p_access ); @@ -730,6 +739,7 @@ static void Close( vlc_object_t *p_this ) free( p_sys-psz_icy_title ); free( p_sys-psz_user_agent ); +free( p_sys-psz_referrer ); Disconnect( p_access ); @@ -1275,6 +1285,13 @@ static int Request( access_t *p_access, uint64_t i_tell ) net_Printf( p_access, p_sys-fd, pvs, User-Agent: %s\r\n, p_sys-psz_user_agent ); +/* Referrer */ +if (p_sys-psz_referrer) +{ +net_Printf( p_access, p_sys-fd, pvs, +Referer: %s\r\n, +p_sys-psz_referrer); +} /* Offset */ if( p_sys-i_version == 1 ! p_sys-b_continuous ) { ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: python-vlc: move MediaEvent / EventUnion / Event definitions into header.py (Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Tue Nov 16 10:58:03 2010 +0100| [17c8d8ebc3a1a9e07876287f89065835b2d74365] | committer: Olivier Aubert python-vlc: move MediaEvent / EventUnion / Event definitions into header.py http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=17c8d8ebc3a1a9e07876287f89065835b2d74365 --- footer.py | 33 - header.py | 33 + 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/footer.py b/footer.py index 7fb40c9..3c5c6a4 100644 --- a/footer.py +++ b/footer.py @@ -1,38 +1,5 @@ ### Start of footer.py ### -class MediaEvent(ctypes.Structure): -_fields_ = [ -('media_name', ctypes.c_char_p), -('instance_name', ctypes.c_char_p), -] - -class EventUnion(ctypes.Union): -_fields_ = [ -('meta_type', ctypes.c_uint), -('new_child', ctypes.c_uint), -('new_duration', ctypes.c_longlong), -('new_status', ctypes.c_int), -('media', ctypes.c_void_p), -('new_state', ctypes.c_uint), -# Media instance -('new_position', ctypes.c_float), -('new_time', ctypes.c_longlong), -('new_title', ctypes.c_int), -('new_seekable', ctypes.c_longlong), -('new_pausable', ctypes.c_longlong), -# FIXME: Skipped MediaList and MediaListView... -('filename', ctypes.c_char_p), -('new_length', ctypes.c_longlong), -('media_event', MediaEvent), -] - -class Event(ctypes.Structure): -_fields_ = [ -('type', EventType), -('object', ctypes.c_void_p), -('u', EventUnion), -] - _EventManagers = {} # FIXME: the EventManager global dict could be removed if diff --git a/header.py b/header.py index 973c740..d5541bb 100755 --- a/header.py +++ b/header.py @@ -208,4 +208,37 @@ def track_description_list(head): libvlc_track_description_release(head) return l +class MediaEvent(ctypes.Structure): +_fields_ = [ +('media_name', ctypes.c_char_p), +('instance_name', ctypes.c_char_p), +] + +class EventUnion(ctypes.Union): +_fields_ = [ +('meta_type', ctypes.c_uint), +('new_child', ctypes.c_uint), +('new_duration', ctypes.c_longlong), +('new_status', ctypes.c_int), +('media', ctypes.c_void_p), +('new_state', ctypes.c_uint), +# Media instance +('new_position', ctypes.c_float), +('new_time', ctypes.c_longlong), +('new_title', ctypes.c_int), +('new_seekable', ctypes.c_longlong), +('new_pausable', ctypes.c_longlong), +# FIXME: Skipped MediaList and MediaListView... +('filename', ctypes.c_char_p), +('new_length', ctypes.c_longlong), +('media_event', MediaEvent), +] + +class Event(ctypes.Structure): +_fields_ = [ +('type', EventType), +('object', ctypes.c_void_p), +('u', EventUnion), +] + ### End of header.py ### ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: python-vlc: remove the _EventManagers global dict (Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Tue Nov 16 10:58:43 2010 +0100| [2bb3aed0b03faa8d0ce237f08ba971d6af10d9c9] | committer: Olivier Aubert python-vlc: remove the _EventManagers global dict http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=2bb3aed0b03faa8d0ce237f08ba971d6af10d9c9 --- footer.py | 17 - override.py | 31 +-- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/footer.py b/footer.py index 3c5c6a4..c6e4580 100644 --- a/footer.py +++ b/footer.py @@ -1,22 +1,5 @@ ### Start of footer.py ### -_EventManagers = {} - -# FIXME: the EventManager global dict could be removed if -# _callback_handler was made a method of EventManager. -_called_from_ctypes = ctypes.CFUNCTYPE(None, ctypes.POINTER(Event), ctypes.c_void_p) -...@_called_from_ctypes -def _callback_handler(event, key): -'''(INTERNAL) handle callback call from ctypes. -''' -try: # retrieve Python callback and arguments -call, args, kwds = _EventManagers[key]._callbacks_[event.contents.type.value] -# FIXME: event could be dereferenced here to event.contents, -# this would simplify the callback code. -call(event, *args, **kwds) -except KeyError: # detached? -pass - def callbackmethod(f): Backward compatibility with the now useless @callbackmethod decorator. diff --git a/override.py b/override.py index aabae9d..aeabb91 100644 --- a/override.py +++ b/override.py @@ -63,10 +63,10 @@ class Instance: l = [] head = ao = libvlc_audio_output_list_get(self) while ao: -l.append( { 'name': ao.contents.name, +l.append( { 'name': ao.contents.name, 'description': ao.contents.description, -'devices': [ { 'id': libvlc_audio_output_device_id(self, ao.contents.name, i), - 'longname': libvlc_audio_output_device_longname(self, ao.contents.name, i) } +'devices': [ { 'id': libvlc_audio_output_device_id(self, ao.contents.name, i), + 'longname': libvlc_audio_output_device_longname(self, ao.contents.name, i) } for i in range(libvlc_audio_output_device_count(self, ao.contents.name) ) ] } ) ao = ao.contents.next libvlc_audio_output_list_release(head) @@ -229,7 +229,7 @@ class EventManager: o = object.__new__(cls) o._as_parameter_ = ptr # was ctypes.c_void_p(ptr) o._callbacks_ = {} # 3-tuples of Python objs -_EventManagers[id(o)] = o # map id to instance +o._callback_handler = None return o def event_attach(self, eventtype, callback, *args, **kwds): @@ -250,7 +250,26 @@ class EventManager: if not hasattr(callback, '__call__'): # callable() raise LibVLCException(%s required: %r % ('callable', callback)) -r = libvlc_event_attach(self, eventtype, _callback_handler, id(self)) +if self._callback_handler is None: +_called_from_ctypes = ctypes.CFUNCTYPE(None, ctypes.POINTER(Event), ctypes.c_void_p) +@_called_from_ctypes +def _callback_handler(event, data): +(INTERNAL) handle callback call from ctypes. + +Note: we cannot simply make this an instance method of +EventManager since ctypes callback does not append +self as first parameter. Hence we use a closure. + +try: # retrieve Python callback and arguments +call, args, kwds = self._callbacks_[event.contents.type.value] +# FIXME: event could be dereferenced here to event.contents, +# this would simplify the callback code. +call(event, *args, **kwds) +except KeyError: # detached? +pass +self._callback_handler = _callback_handler + +r = libvlc_event_attach(self, eventtype, self._callback_handler, None) if not r: self._callbacks_[eventtype.value] = (callback, args, kwds) return r @@ -266,4 +285,4 @@ class EventManager: t = eventtype.value if t in self._callbacks_: del self._callbacks_[t] # remove, regardless of libvlc return value -libvlc_event_detach(self, eventtype, _callback_handler, id(self)) +libvlc_event_detach(self, eventtype, self._callback_handler, None) ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Improve event callback handling. (Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Tue Nov 16 10:41:20 2010 +0100| [31a59582dee1fce9dcbe0bce3ea2027f14c68073] | committer: Olivier Aubert Improve event callback handling. With the extended EventManager, callback methods do not have to be decorated anymore. They are properly wrapped by the EventManager upon call. Signed-off-by: Olivier Aubert olivier.aub...@liris.cnrs.fr http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=31a59582dee1fce9dcbe0bce3ea2027f14c68073 --- footer.py | 68 ++ override.py | 68 +++ 2 files changed, 122 insertions(+), 14 deletions(-) diff --git a/footer.py b/footer.py index 313bedd..7fb40c9 100644 --- a/footer.py +++ b/footer.py @@ -33,15 +33,38 @@ class Event(ctypes.Structure): ('u', EventUnion), ] -# Decorator for callback methods -callbackmethod=ctypes.CFUNCTYPE(None, ctypes.POINTER(Event), ctypes.c_void_p) - -# Example callback method -...@callbackmethod -def debug_callback(event, data): -print Debug callback method -print Event:, event.contents.type -print Data, data +_EventManagers = {} + +# FIXME: the EventManager global dict could be removed if +# _callback_handler was made a method of EventManager. +_called_from_ctypes = ctypes.CFUNCTYPE(None, ctypes.POINTER(Event), ctypes.c_void_p) +...@_called_from_ctypes +def _callback_handler(event, key): +'''(INTERNAL) handle callback call from ctypes. +''' +try: # retrieve Python callback and arguments +call, args, kwds = _EventManagers[key]._callbacks_[event.contents.type.value] +# FIXME: event could be dereferenced here to event.contents, +# this would simplify the callback code. +call(event, *args, **kwds) +except KeyError: # detached? +pass + +def callbackmethod(f): +Backward compatibility with the now useless @callbackmethod decorator. + +This method will be removed after a transition period. + +return f + +# Example callback, useful for debugging +def debug_callback(event, *args, **kwds): +l = [event %s % (event.contents.type,)] +if args: + l.extend(map(str, args)) +if kwds: + l.extend(sorted( %s=%s % t for t in kwds.iteritems() )) +print Debug callback (%s) % , .join(l) if __name__ == '__main__': try: @@ -59,11 +82,17 @@ if __name__ == '__main__': termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) return ch -@callbackmethod -def end_callback(event, data): +def end_callback(event): print End of stream sys.exit(0) +echo_position = False +def pos_callback(event, player): +if echo_position: +print %s to %.2f%% (%.2f%%) % (event.contents.type, + event.contents.u.new_position * 100, + player.get_position() * 100) + if sys.argv[1:]: instance=Instance() media=instance.media_new(sys.argv[1]) @@ -71,12 +100,17 @@ if __name__ == '__main__': player.set_media(media) player.play() -event_manager=player.event_manager() -event_manager.event_attach(EventType.MediaPlayerEndReached, end_callback, None) + # Some event manager examples. Note, the callback can be any Python + # callable and does not need to be decorated. Optionally, specify + # any number of positional and/or keyword arguments to be passed + # to the callback (in addition to the first one, an Event instance). +event_manager = player.event_manager() +event_manager.event_attach(EventType.MediaPlayerEndReached, end_callback) +event_manager.event_attach(EventType.MediaPlayerPositionChanged, pos_callback, player) def print_info(): Print information about the media. -media=player.get_media() +media = player.get_media() print State:, player.get_state() print Media:, media.get_mrl() try: @@ -116,6 +150,11 @@ if __name__ == '__main__': Exit. sys.exit(0) +def toggle_echo_position(): +Toggle echoing of media position +global echo_position +echo_position = not echo_position + keybindings={ 'f': player.toggle_fullscreen, ' ': player.pause, @@ -125,6 +164,7 @@ if __name__ == '__main__': ',': one_frame_backward, '?': print_help, 'i': print_info, +'p': toggle_echo_position, 'q': quit_app, } diff --git a/override.py b/override.py index 297e6b5..aabae9d 100644 --- a/override.py +++ b/override.py @@ -199,3 +199,71 @@ class Log: def dump(self): return [ str(m) for m in self ] + +class EventManager: +Create an event manager and handler
[vlc-commits] commit: python-vlc: dereference event. contents in EventManager callback wrapper. (Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Tue Nov 16 11:03:08 2010 +0100| [48408481cce5210896f81fbb3439b3a3cd497e8a] | committer: Olivier Aubert python-vlc: dereference event.contents in EventManager callback wrapper. This allows callback method to simply access the Event class. http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=48408481cce5210896f81fbb3439b3a3cd497e8a --- footer.py |6 +++--- override.py |5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/footer.py b/footer.py index c6e4580..5c9cd44 100644 --- a/footer.py +++ b/footer.py @@ -9,7 +9,7 @@ def callbackmethod(f): # Example callback, useful for debugging def debug_callback(event, *args, **kwds): -l = [event %s % (event.contents.type,)] +l = [event %s % (event.type,)] if args: l.extend(map(str, args)) if kwds: @@ -39,8 +39,8 @@ if __name__ == '__main__': echo_position = False def pos_callback(event, player): if echo_position: -print %s to %.2f%% (%.2f%%) % (event.contents.type, - event.contents.u.new_position * 100, +print %s to %.2f%% (%.2f%%)\r % (event.type, + event.u.new_position * 100, player.get_position() * 100) if sys.argv[1:]: diff --git a/override.py b/override.py index aeabb91..10a7fd9 100644 --- a/override.py +++ b/override.py @@ -262,9 +262,8 @@ class EventManager: try: # retrieve Python callback and arguments call, args, kwds = self._callbacks_[event.contents.type.value] -# FIXME: event could be dereferenced here to event.contents, -# this would simplify the callback code. -call(event, *args, **kwds) +# We dereference event.contents here to simplify callback code. +call(event.contents, *args, **kwds) except KeyError: # detached? pass self._callback_handler = _callback_handler ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: python-vlc: define a generic _Enum class (Jean Brouwers )
vlc/python | branch: master | Jean Brouwers mrje...@gmail.com | Tue Nov 16 11:39:56 2010 +0100| [4b862c74b54da6788a449813190e1fcd0566ac84] | committer: Olivier Aubert python-vlc: define a generic _Enum class Signed-off-by: Olivier Aubert olivier.aub...@liris.cnrs.fr http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=4b862c74b54da6788a449813190e1fcd0566ac84 --- generate.py | 67 +++--- 1 files changed, 36 insertions(+), 31 deletions(-) diff --git a/generate.py b/generate.py index ec696e0..ea94a72 100755 --- a/generate.py +++ b/generate.py @@ -437,48 +437,53 @@ class PythonGenerator(object): return res def generate_enums(self, enums): -for (typ, name, values, comment) in enums: -if typ != 'enum': -raise Exception('This method only handles enums') -pyname=self.type2class[name] - -self.output(class %s(ctypes.c_ulong): % pyname) -self.output('%s\n' % comment) - -conv={} -# Convert symbol names -for k, v in values: -n=k.split('_')[-1] -if len(n) == 1: -# Single character. Some symbols use 1_1, 5_1, etc. -n=_.join( k.split('_')[-2:] ) -if re.match('^[0-9]', n): -# Cannot start an identifier with a number -n='_'+n -conv[k]=n +self.output( +class _Enum(ctypes.c_ulong): +'''Base class +''' +_names={} -self.output(_names={) -for k, v in values: -self.output(%s: '%s', % (v, conv[k])) -self.output(}) +def __str__(self): +n=self._names.get(self.value, '') or ('FIXME_(%r)' % (self.value,)) +return '.'.join((self.__class__.__name__, n)) -self.output( def __repr__(self): -return ..join((self.__class__.__module__, self.__class__.__name__, self._names[self.value])) +return '.'.join((self.__class__.__module__, self.__str__())) def __eq__(self, other): -return ( (isinstance(other, ctypes.c_ulong) and self.value == other.value) - or (isinstance(other, (int, long)) and self.value == other ) ) +return ( (isinstance(other, _Enum) and self.value == other.value) + or (isinstance(other, (int, long)) and self.value == other) ) def __ne__(self, other): return not self.__eq__(other) -) +) +for (typ, name, values, comment) in enums: +if typ != 'enum': +raise Exception('This method only handles enums') + +pyname = self.type2class[name] + +self.output(class %s(_Enum): % pyname) +self.output('%s\n' % comment) + +self.output(_names={) +l = [] +# Convert symbol names for k, v in values: -self.output(%(class)s.%(attribute)s=%(class)s(%(value)s) % { +k = k.split('_') +n = k[-1] +if len(n) = 1: # Single character name +n = '_'.join( k[-2:] ) # Some use 1_1, 5_1, etc. +if n[0].isdigit(): # Cannot start with a number +n = '_' + n +self.output(%s: '%s', % (v, n)) +l.append(%(class)s.%(attribute)s=%(class)s(%(value)s) % { 'class': pyname, -'attribute': conv[k], -'value': v +'attribute': n, +'value': v, }) +self.output(}) +self.output(\n.join(sorted(l))) self.output() def output_ctypes(self, rtype, method, params, comment): ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: python-vlc: modify function parameter handling (Jean Brouwers )
vlc/python | branch: master | Jean Brouwers mrje...@gmail.com | Tue Nov 16 11:50:37 2010 +0100| [157b3cef24e0bc6fce0ef6639dd4fcd40cded321] | committer: Olivier Aubert python-vlc: modify function parameter handling Signed-off-by: Olivier Aubert olivier.aub...@liris.cnrs.fr http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=157b3cef24e0bc6fce0ef6639dd4fcd40cded321 --- generate.py | 135 ++- 1 files changed, 68 insertions(+), 67 deletions(-) diff --git a/generate.py b/generate.py index ea94a72..6e19687 100755 --- a/generate.py +++ b/generate.py @@ -36,24 +36,6 @@ import operator import itertools from optparse import OptionParser -# DefaultDict from ASPN python cookbook -import copy -class DefaultDict(dict): -Dictionary with a default value for unknown keys. -def __init__(self, default=None, **items): -dict.__init__(self, **items) -self.default = default - -def __getitem__(self, key): -if key in self: -return self.get(key) -else: -## Need copy in case self.default is something like [] -return self.setdefault(key, copy.deepcopy(self.default)) - -def __copy__(self): -return DefaultDict(self.default, **self) - # Methods not decorated/not referenced blacklist=[ libvlc_set_exit_handler, @@ -69,10 +51,29 @@ python_param_re=re.compile('(@param\s+\S+)(.+)') forward_re=re.compile('.+\(\s*(.+?)\s*\)(\s*\S+)') enum_re=re.compile('(?:typedef\s+)?(enum)\s*(\S+)\s*\{\s*(.+)\s*\}\s*(?:\S+)?;') -# Definition of parameter passing mode for types. This should not be -# hardcoded this way, but works alright ATM. -parameter_passing=DefaultDict(default=1) -parameter_passing['libvlc_exception_t*']=3 + +# Parameter direction definitions. +class Flag(object): +Enum-like, parameter direction flag constants. + +In = 1 # input only +Out = 2# output only +InOut = 3 # in- and output +InZero = 4 # input, default int 0 +def __init__(self): +raise TypeError('Constants only') + +# Parameter passing flags for types. This shouldn't +# be hardcoded this way, but works all right ATM. +def paramFlag3(typ, *name_default): +# return the parameter flags as 1-, 2- or 3-tuple for the +# given type and optional parameter name and default value +t=( { 'int*':Flag.Out, # _video_get_cursor + 'unsigned*': Flag.Out, # _video_get_size + 'libvlc_exception_t*': Flag.InOut, + }.get(typ, Flag.In), ) +return str(t + name_default) + class Parser(object): def __init__(self, list_of_files): @@ -493,24 +494,24 @@ class _Enum(ctypes.c_ulong): # FIXME return -self.output(if hasattr(dll, '%s'): % method) -if params: -self.output(prototype=ctypes.CFUNCTYPE(%s, %s) % (self.type2class.get(rtype, 'FIXME_%s' % rtype), -, .join( self.type2class[p[0]] for p in params ))) -else: -self.output(prototype=ctypes.CFUNCTYPE(%s) % self.type2class.get(rtype, 'FIXME_%s' % rtype)) + # return value and arg types +args = , .join( [self.type2class.get(rtype, 'FIXME_%s' % (rtype,))] + + [self.type2class[p[0]] for p in params] ) + # tuple of arg flag tuples +flags = , .join( paramFlag3(p[0]) for p in params ) +if flags: +flags += ',' -if not params: -flags='paramflags= tuple()' -elif len(params) == 1: -flags=paramflags=( (%d, ), ) % parameter_passing[params[0][0]] -else: -flags=paramflags=%s % , .join( '(%d,)' % parameter_passing[p[0]] for p in params ) -self.output(flags) -self.output('%s = prototype( (%s, dll), paramflags )' % (method, method)) -self.output('%s.__doc__ = %s' % (method, comment)) -self.output() +comment = self.epydoc_comment(comment) + +self.output('''if hasattr(dll, '%(method)s'): +p = ctypes.CFUNCTYPE(%(args)s) +f = (%(flags)s) +%(method)s = p( ('%(method)s', dll), f ) +%(method)s.__doc__ = %(comment)s + +''' % locals()) def parse_override(self, name): Parse override definitions file. @@ -549,26 +550,23 @@ class _Enum(ctypes.c_ulong): return code, overridden_methods, docstring -def fix_python_comment(self, c, in_class=False): -Transform comment into python syntax. +def epydoc_comment(self, comment, fix_first=False): +Transform Doxygen into epydoc syntax and fix first parameter. -# Transform Doxygen syntax into epydoc syntax -c=c.replace('@{', '').replace('@see', 'See').replace('\\see', 'See').replace('\\ingroup', '').replace('\\param', '@param').replace('\\return', '@return') -if in_class
[vlc-commits] commit: python-vlc: fix video_get_size / video_get_cursor overrides ( Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Tue Nov 16 12:05:39 2010 +0100| [3ac0e1e0f5175a96bdc646addc1432e74eb43712] | committer: Olivier Aubert python-vlc: fix video_get_size / video_get_cursor overrides http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=3ac0e1e0f5175a96bdc646addc1432e74eb43712 --- override.py | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/override.py b/override.py index 4689888..9ab66e4 100644 --- a/override.py +++ b/override.py @@ -160,10 +160,7 @@ class MediaPlayer: @param num: video number (default 0) -x, y = ctypes.c_ulong(), ctypes.c_ulong() # or c_uint? -if libvlc_video_get_size(self, num, ctypes.byref(x), ctypes.byref(y)): -raise LibVLCException('invalid video number (%s)' % (num,)) -return int(x.value), int(y.value) +return libvlc_video_get_size(self, num) def video_get_width(self, num=0): Get the width of a video in pixels. @@ -198,10 +195,7 @@ class MediaPlayer: @param num: video number (default 0) -x, y = ctypes.c_long(), ctypes.c_long() # or c_int? -if libvlc_video_get_cursor(self, num, ctypes.byref(x), ctypes.byref(y)): -raise LibVLCException('invalid video number (%s)' % (num,)) -return int(x.value), int(y.value) +return libvlc_video_get_cursor(self, num) class MediaListPlayer: Create a new MediaListPlayer instance. ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: python-vlc: define Rectangle class (Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Tue Nov 16 11:11:48 2010 +0100| [b40a0d6fa27be1ab96bd8c4e1f8962b145dd52d9] | committer: Olivier Aubert python-vlc: define Rectangle class http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=b40a0d6fa27be1ab96bd8c4e1f8962b145dd52d9 --- header.py |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/header.py b/header.py index d5541bb..4e872ad 100755 --- a/header.py +++ b/header.py @@ -241,4 +241,12 @@ class Event(ctypes.Structure): ('u', EventUnion), ] +class Rectangle(ctypes.Structure): +_fields_ = [ +('top',ctypes.c_int), +('left', ctypes.c_int), +('bottom', ctypes.c_int), +('right', ctypes.c_int), +] + ### End of header.py ### ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Merge VoD module into RTP stream output module (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Tue Nov 16 22:33:20 2010 +0100| [c6d32327273ed56344937ea654673c08e0e25cc3] | committer: Pierre Ynard Merge VoD module into RTP stream output module Cleaner and better working solution for VoD than the bad hack that we currently have. Instead of (badly) duplicating large portions of codes, it reuses the existing RTSP stack and factorizes the RTP payload code, and provides support for a number of ES not limited to one audio and one video tracks, as well as for missing features in RTSP headers. The VoD module is responsible for starting and running the RTSP stack. When a VoD media instance is started, the VLM passes down media and session parameters as variables to the RTP stream output object, that uses them to hook back into the VoD code (and through it, into the RTSP stack), to retrieve accurate, already set up parameters, and provide playback data. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c6d32327273ed56344937ea654673c08e0e25cc3 --- modules/stream_out/Modules.am |2 +- modules/stream_out/rtp.c | 509 +++-- modules/stream_out/rtp.h | 71 -- modules/stream_out/rtpfmt.c | 320 + modules/stream_out/rtsp.c | 309 ++--- modules/stream_out/vod.c | 626 + src/input/vlm.c |6 + 7 files changed, 1444 insertions(+), 399 deletions(-) Diff: http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=c6d32327273ed56344937ea654673c08e0e25cc3 ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: rtp sout: make private functions static (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Wed Nov 17 00:06:27 2010 +0100| [53391ce60fd8459e52a98a312063fe4ee0946bb6] | committer: Pierre Ynard rtp sout: make private functions static http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=53391ce60fd8459e52a98a312063fe4ee0946bb6 --- modules/stream_out/rtpfmt.c | 70 +- 1 files changed, 35 insertions(+), 35 deletions(-) diff --git a/modules/stream_out/rtpfmt.c b/modules/stream_out/rtpfmt.c index 3eea18b..c31fd32 100644 --- a/modules/stream_out/rtpfmt.c +++ b/modules/stream_out/rtpfmt.c @@ -35,22 +35,23 @@ #include assert.h -int rtp_packetize_mpa (sout_stream_id_t *, block_t *); -int rtp_packetize_mpv (sout_stream_id_t *, block_t *); -int rtp_packetize_ac3 (sout_stream_id_t *, block_t *); -int rtp_packetize_split(sout_stream_id_t *, block_t *); -int rtp_packetize_swab (sout_stream_id_t *, block_t *); -int rtp_packetize_mp4a (sout_stream_id_t *, block_t *); -int rtp_packetize_mp4a_latm (sout_stream_id_t *, block_t *); -int rtp_packetize_h263 (sout_stream_id_t *, block_t *); -int rtp_packetize_h264 (sout_stream_id_t *, block_t *); -int rtp_packetize_amr (sout_stream_id_t *, block_t *); -int rtp_packetize_spx (sout_stream_id_t *, block_t *); -int rtp_packetize_t140 (sout_stream_id_t *, block_t *); -int rtp_packetize_g726_16 (sout_stream_id_t *, block_t *); -int rtp_packetize_g726_24 (sout_stream_id_t *, block_t *); -int rtp_packetize_g726_32 (sout_stream_id_t *, block_t *); -int rtp_packetize_g726_40 (sout_stream_id_t *, block_t *); +static int rtp_packetize_mpa (sout_stream_id_t *, block_t *); +static int rtp_packetize_mpv (sout_stream_id_t *, block_t *); +static int rtp_packetize_ac3 (sout_stream_id_t *, block_t *); +static int rtp_packetize_split(sout_stream_id_t *, block_t *); +static int rtp_packetize_swab (sout_stream_id_t *, block_t *); +static int rtp_packetize_mp4a (sout_stream_id_t *, block_t *); +static int rtp_packetize_mp4a_latm (sout_stream_id_t *, block_t *); +static int rtp_packetize_h263 (sout_stream_id_t *, block_t *); +static int rtp_packetize_h264 (sout_stream_id_t *, block_t *); +static int rtp_packetize_amr (sout_stream_id_t *, block_t *); +static int rtp_packetize_spx (sout_stream_id_t *, block_t *); +static int rtp_packetize_t140 (sout_stream_id_t *, block_t *); +static int rtp_packetize_g726_16 (sout_stream_id_t *, block_t *); +static int rtp_packetize_g726_24 (sout_stream_id_t *, block_t *); +static int rtp_packetize_g726_32 (sout_stream_id_t *, block_t *); +static int rtp_packetize_g726_40 (sout_stream_id_t *, block_t *); +static int rtp_packetize_vorbis (sout_stream_id_t *, block_t *); static void sprintf_hexa( char *s, uint8_t *p_data, int i_data ) { @@ -352,13 +353,12 @@ int rtp_get_fmt( vlc_object_t *obj, es_format_t *p_fmt, const char *mux, } -int +static int rtp_packetize_h264_nal( sout_stream_id_t *id, const uint8_t *p_data, int i_data, int64_t i_pts, int64_t i_dts, bool b_last, int64_t i_length ); -int rtp_packetize_mpa( sout_stream_id_t *id, - block_t *in ) +static int rtp_packetize_mpa( sout_stream_id_t *id, block_t *in ) { int i_max = rtp_mtu (id) - 4; /* payload max in one packet */ int i_count = ( in-i_buffer + i_max - 1 ) / i_max; @@ -394,7 +394,7 @@ int rtp_packetize_mpa( sout_stream_id_t *id, } /* rfc2250 */ -int rtp_packetize_mpv( sout_stream_id_t *id, block_t *in ) +static int rtp_packetize_mpv( sout_stream_id_t *id, block_t *in ) { int i_max = rtp_mtu (id) - 4; /* payload max in one packet */ int i_count = ( in-i_buffer + i_max - 1 ) / i_max; @@ -492,7 +492,7 @@ int rtp_packetize_mpv( sout_stream_id_t *id, block_t *in ) return VLC_SUCCESS; } -int rtp_packetize_ac3( sout_stream_id_t *id, block_t *in ) +static int rtp_packetize_ac3( sout_stream_id_t *id, block_t *in ) { int i_max = rtp_mtu (id) - 2; /* payload max in one packet */ int i_count = ( in-i_buffer + i_max - 1 ) / i_max; @@ -528,7 +528,7 @@ int rtp_packetize_ac3( sout_stream_id_t *id, block_t *in ) return VLC_SUCCESS; } -int rtp_packetize_split( sout_stream_id_t *id, block_t *in ) +static int rtp_packetize_split( sout_stream_id_t *id, block_t *in ) { int i_max = rtp_mtu (id); /* payload max in one packet */ int i_count = ( in-i_buffer + i_max - 1 ) / i_max; @@ -561,7 +561,7 @@ int rtp_packetize_split( sout_stream_id_t *id, block_t *in ) } /* split and convert from little endian to network byte order */ -int rtp_packetize_swab( sout_stream_id_t *id, block_t *in ) +static int rtp_packetize_swab( sout_stream_id_t *id, block_t *in ) { int i_max = rtp_mtu (id); /* payload max in one packet */ int i_count = ( in-i_buffer + i_max - 1 ) / i_max; @@ -594,7 +594,7 @@ int rtp_packetize_swab( sout_stream_id_t *id, block_t *in ) } /* rfc3016 */ -int rtp_packetize_mp4a_latm
[vlc-commits] commit: skins2: fix wrong check (cosmetics) (Erwan Tulou )
vlc | branch: master | Erwan Tulou erwa...@videolan.org | Wed Nov 17 10:31:00 2010 +0100| [a7f80fa2a49eec99c0e8d6410a13501e970a0650] | committer: Erwan Tulou skins2: fix wrong check (cosmetics) For clarity, i_children can be -1 (at init) or 0 for no child. Yet, there was no bug, since buildNode was just a noop for -1. pointed out on the forum http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a7f80fa2a49eec99c0e8d6410a13501e970a0650 --- modules/gui/skins2/vars/playtree.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/gui/skins2/vars/playtree.cpp b/modules/gui/skins2/vars/playtree.cpp index c8dfb91..17ef793 100644 --- a/modules/gui/skins2/vars/playtree.cpp +++ b/modules/gui/skins2/vars/playtree.cpp @@ -248,7 +248,7 @@ void Playtree::buildNode( playlist_item_t *pNode, VarTree rTree ) playlist_CurrentPlayingItem(m_pPlaylist) == pNode-pp_children[i], false, pNode-pp_children[i]-i_flags PLAYLIST_RO_FLAG, pNode-pp_children[i] ); -if( pNode-pp_children[i]-i_children ) +if( pNode-pp_children[i]-i_children 0 ) { buildNode( pNode-pp_children[i], rTree.back() ); } ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Lift the line length limit on c onfig files (fixes #4338) ( Rémi Denis-Cour mont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Wed Nov 17 19:07:27 2010 +0200| [b9bb646863451b46379d86cea26c348ec6c64576] | committer: Rémi Denis-Courmont Lift the line length limit on config files (fixes #4338) http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9bb646863451b46379d86cea26c348ec6c64576 --- src/config/file.c | 133 ++--- 1 files changed, 55 insertions(+), 78 deletions(-) diff --git a/src/config/file.c b/src/config/file.c index d5c3a00..53dbfd7 100644 --- a/src/config/file.c +++ b/src/config/file.c @@ -183,33 +183,27 @@ int config_LoadConfigFile( vlc_object_t *p_this ) rewind (file); /* no BOM, rewind */ } -char line[1024]; +char *line = NULL; +size_t bufsize; +ssize_t linelen; /* Ensure consistent number formatting... */ locale_t loc = newlocale (LC_NUMERIC_MASK, C, NULL); locale_t baseloc = uselocale (loc); vlc_rwlock_wrlock (config_lock); -while (fgets (line, 1024, file) != NULL) +while ((linelen = getline (line, bufsize, file)) != -1) { -/* Ignore comments and empty lines */ -switch (line[0]) -{ -case '#': -case '[': -case '\n': -case '\0': -continue; -} +line[linelen - 1] = '\0'; /* trim newline */ -char *ptr = strchr (line, '\n'); -if (ptr != NULL) -*ptr = '\0'; +/* Ignore comments, section and empty lines */ +if (memchr (#[, line[0], 3) != NULL) +continue; /* look for option name */ const char *psz_option_name = line; -ptr = strchr (line, '='); +char *ptr = strchr (line, '='); if (ptr == NULL) continue; /* syntax error */ *ptr = '\0'; @@ -261,6 +255,7 @@ int config_LoadConfigFile( vlc_object_t *p_this ) } } vlc_rwlock_unlock (config_lock); +free (line); if (ferror (file)) { @@ -375,13 +370,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, bool b_autosave ) { module_t *p_parser; -FILE *file = NULL; char *permanent = NULL, *temporary = NULL; -char p_line[1024], *p_index2; -unsigned long i_sizebuf = 0; -char *p_bigbuffer = NULL, *p_index; -bool b_backup; -int i_index; if( config_PrepareDir( p_this ) ) { @@ -389,8 +378,13 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, return -1; } -file = config_OpenConfigFile( p_this ); -if( file != NULL ) +/* List all available modules */ +module_t **list = module_list_get (NULL); + +char *bigbuf = NULL; +size_t bigsize = 0; +FILE *file = config_OpenConfigFile (p_this); +if (file != NULL) { struct stat st; @@ -403,72 +397,54 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, msg_Err (p_this, configuration file is read-only); goto error; } -i_sizebuf = ( st.st_size LONG_MAX ) ? st.st_size : 0; -} -p_bigbuffer = p_index = malloc( i_sizebuf+1 ); -if( !p_bigbuffer ) -goto error; -p_bigbuffer[0] = 0; +bigsize = (st.st_size LONG_MAX) ? st.st_size : 0; +bigbuf = malloc (bigsize + 1); +if (bigbuf == NULL) +goto error; -/* List all available modules */ -module_t **list = module_list_get (NULL); +/* backup file into memory, we only need to backup the sections we + * won't save later on */ +char *p_index = bigbuf; +char *line = NULL; +size_t bufsize; +ssize_t linelen; +bool backup = false; -/* backup file into memory, we only need to backup the sections we won't - * save later on */ -b_backup = false; -while( file fgets( p_line, 1024, file ) ) -{ -if( (p_line[0] == '[') (p_index2 = strchr(p_line,']'))) +while ((linelen = getline (line, bufsize, file)) != -1) { +char *p_index2; -/* we found a section, check if we need to do a backup */ -for( i_index = 0; (p_parser = list[i_index]) != NULL; i_index++ ) +if ((line[0] == '[') (p_index2 = strchr(line,']'))) { -if( ((p_index2 - p_line[1]) - == (int)strlen(p_parser-psz_object_name) ) - !memcmp( p_line[1], p_parser-psz_object_name, -strlen(p_parser-psz_object_name) ) ) +/* we found a new section, check if we need to do a backup */ +backup = true; +for (int i = 0; (p_parser = list[i]) != NULL; i++) { -if( !psz_module_name ) -break; -else if( !strcmp( psz_module_name
[vlc-commits] commit: Fix memory leak in previous com mit ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Wed Nov 17 19:37:43 2010 +0200| [3df6407dd21449d65a4c6741427714d51ab1223c] | committer: Rémi Denis-Courmont Fix memory leak in previous commit http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3df6407dd21449d65a4c6741427714d51ab1223c --- src/config/file.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/config/file.c b/src/config/file.c index 53dbfd7..a832000 100644 --- a/src/config/file.c +++ b/src/config/file.c @@ -442,6 +442,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, } fclose (file); file = NULL; +free (line); *p_index = '\0'; bigsize = p_index - bigbuf; } ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: contrib: Fixed SVN version number for contribs. (Pierre d' Herbemont )
vlc | branch: master | Pierre d'Herbemont pdherbem...@free.fr | Wed Nov 17 17:36:34 2010 +0100| [50c315b8e37a6193792dc1a9cca22583a05d6284] | committer: Pierre d'Herbemont contrib: Fixed SVN version number for contribs. We want to be able to re-create the exact same build for a given vlc version, including contrib. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50c315b8e37a6193792dc1a9cca22583a05d6284 --- extras/contrib/src/contrib-src.mak |8 extras/contrib/src/packages.mak|3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/extras/contrib/src/contrib-src.mak b/extras/contrib/src/contrib-src.mak index 0c30e83..efb9104 100644 --- a/extras/contrib/src/contrib-src.mak +++ b/extras/contrib/src/contrib-src.mak @@ -1066,8 +1066,8 @@ endif PHONY += ffmpeg-svn ffmpeg-tar -ffmpeg/.svn-co: - $(SVN) co $(FFMPEG_SVN) ffmpeg +ffmpeg/.svn-$(FFMPEG_SVN_REV): + $(SVN) co -r $(FFMPEG_SVN_REV) $(FFMPEG_SVN) ffmpeg ifdef HAVE_ISA_THUMB patch -p0 Patches/ffmpeg-avcodec-no-thumb.patch endif @@ -1176,7 +1176,7 @@ DISTCLEAN_PKG += libdvdcss-$(LIBDVDCSS_VERSION).tar.bz2 # libdvdread: We use dvdnav's dvdread # *** libdvdread: - $(SVN) co $(LIBDVDREAD_SVN) libdvdread + $(SVN) co -r $(LIBDVDREAD_SVN_REV) $(LIBDVDREAD_SVN) libdvdread (cd $@; patch -p 0 ../Patches/libdvdread-dvdcss-static.patch) ifdef HAVE_WIN32 (cd $@; patch -p 0 ../Patches/libdvdread-win32.patch) @@ -1198,7 +1198,7 @@ CLEAN_PKG += libdvdread ifdef SVN libdvdnav: - $(SVN) co $(LIBDVDNAV_SVN) libdvdnav + $(SVN) co -r $(LIBDVDNAV_SVN_REV) $(LIBDVDNAV_SVN) libdvdnav patch -d libdvdnav -p0 Patches/libdvdnav.patch (cd $@; ./autogen.sh noconfig) else diff --git a/extras/contrib/src/packages.mak b/extras/contrib/src/packages.mak index b543416..1968732 100644 --- a/extras/contrib/src/packages.mak +++ b/extras/contrib/src/packages.mak @@ -95,12 +95,15 @@ LIBMATROSKA_URL=http://dl.matroska.org/downloads/libmatroska/libmatroska-$(LIBMA FFMPEG_VERSION=0.4.8 FFMPEG_URL=$(SF)/ffmpeg/ffmpeg-$(FFMPEG_VERSION).tar.gz FFMPEG_SVN=svn://svn.ffmpeg.org/ffmpeg/trunk +FFMPEG_SVN_REV=25711 LIBDVDCSS_VERSION=1.2.10 LIBDVDCSS_URL=$(VIDEOLAN)/libdvdcss/$(LIBDVDCSS_VERSION)/libdvdcss-$(LIBDVDCSS_VERSION).tar.bz2 LIBDVDNAV_VERSION=4.1.1 LIBDVDNAV_URL=http://www1.mplayerhq.hu/MPlayer/releases/dvdnav/libdvdnav-$(LIBDVDNAV_VERSION).tar.gz LIBDVDNAV_SVN=svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav +LIBDVDNAV_SVN_REV=1211 LIBDVDREAD_SVN=svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread +LIBDVDREAD_SVN_REV=1218 LIBDVDREAD_VERSION=0.9.7 LIBDVDREAD_URL=http://www.dtek.chalmers.se/groups/dvd/dist/libdvdread-$(LIBDVDREAD_VERSION).tar.gz #LIBDVDREAD_URL=$(VIDEOLAN)/libdvdread/$(LIBDVDREAD_VERSION)/libdvdread-$(LIBDVDREAD_VERSION).tar.gz ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: ios_vout: Build fix. (Pierre d'Herbemont )
vlc | branch: master | Pierre d'Herbemont pdherbem...@free.fr | Wed Nov 17 18:53:21 2010 +0100| [74d18c465c5b27744aad6cc7eaf536671a77b18e] | committer: Pierre d'Herbemont ios_vout: Build fix. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=74d18c465c5b27744aad6cc7eaf536671a77b18e --- configure.ac |1 + modules/video_output/ios.m |4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 33deefb..a352b8f 100644 --- a/configure.ac +++ b/configure.ac @@ -3358,6 +3358,7 @@ AC_ARG_ENABLE(ios-vout, if test ${enable_ios_vout} = yes then VLC_ADD_PLUGIN([vout_ios]) + VLC_ADD_CFLAGS([vout_ios], [-DUSE_OPENGL_ES=1]) VLC_ADD_LDFLAGS([vout_ios], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit,-framework,Foundation]) fi diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m index c90ac61..1a02a3d 100644 --- a/modules/video_output/ios.m +++ b/modules/video_output/ios.m @@ -27,6 +27,8 @@ #import UIKit/UIKit.h #import OpenGLES/ES1/gl.h +#import OpenGLES/ES1/glext.h +#include QuartzCore/QuartzCore.h #ifdef HAVE_CONFIG_H # include config.h @@ -38,8 +40,8 @@ #include vlc_vout_opengl.h #define USE_OPENGL_ES 1 + #include opengl.h -#include QuartzCore/QuartzCore.h /** * Forward declarations ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: contrib: Remove ifdef recursion in .live target, and fix iOS build. (Pierre d'Herbemont )
vlc | branch: master | Pierre d'Herbemont pdherbem...@free.fr | Wed Nov 17 18:12:16 2010 +0100| [fdaea5426d669d7b7f707f2cdd8b0750dc316375] | committer: Pierre d'Herbemont contrib: Remove ifdef recursion in .live target, and fix iOS build. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fdaea5426d669d7b7f707f2cdd8b0750dc316375 --- extras/contrib/src/contrib-src.mak | 45 +-- 1 files changed, 22 insertions(+), 23 deletions(-) diff --git a/extras/contrib/src/contrib-src.mak b/extras/contrib/src/contrib-src.mak index efb9104..f3d0684 100644 --- a/extras/contrib/src/contrib-src.mak +++ b/extras/contrib/src/contrib-src.mak @@ -1282,34 +1282,33 @@ ifndef HAVE_WINCE endif endif -.live: live -ifdef HAVE_WIN32 - (cd $;./genMakefiles mingw make $(HOSTCC)) -else -ifdef HAVE_WINCE - (cd $; sed -e 's/-lws2_32/-lws2/g' -i.orig config.mingw) - (cd $;./genMakefiles mingw make $(HOSTCC)) -else -ifdef HAVE_MACOSX - (cd $; sed -e 's%-DBSD=1%-DBSD=1\ $(EXTRA_CFLAGS)\ $(EXTRA_LDFLAGS)%' -e 's%cc%$(CC)%' -e 's%c++%$(CXX)\ $(EXTRA_LDFLAGS)%' -i.orig config.macosx) - (cd $; ./genMakefiles macosx make) -else - (cd $; sed -e 's/=/= EXTRA_CPPFLAGS/' -e 's%EXTRA_CPPFLAGS%-I/include%' -i.orig groupsock/Makefile.head) -ifdef HAVE_UCLIBC -ifdef HAVE_BIGENDIAN - (cd $; ./genMakefiles armeb-uclibc make $(HOSTCC)) -endif -else +LIVE_TARGET-$(ENABLED)= linux +LIVE_TARGET-$(HAVE_WIN32) = mingw +LIVE_TARGET-$(HAVE_WINCE) = mingw +LIVE_TARGET-$(HAVE_DARWIN_OS) = macosx + ifeq ($(ARCH)$(HAVE_MAEMO),armel) - (cd $; ./genMakefiles armlinux make $(HOSTCC)) -else - (cd $; sed -e 's%-D_FILE_OFFSET_BITS=64%-D_FILE_OFFSET_BITS=64\ -fPIC\ -DPIC%' -i.orig config.linux) - (cd $; ./genMakefiles linux make $(HOSTCC)) -endif +LIVE_TARGET-$(ENABLED)= armlinux endif + +ifdef HAVE_BIGENDIAN +LIVE_TARGET-$(HAVE_UCLIBC)= armeb-uclib endif + +LIVE_PATCH-$(ENABLED)= +LIVE_PATCH-$(HAVE_WINCE) = sed -e 's/-lws2_32/-lws2/g' -i.orig config.mingw +LIVE_PATCH-$(HAVE_DARWIN_OS) = sed -e 's%-DBSD=1%-DBSD=1\ $(EXTRA_CFLAGS)\ $(EXTRA_LDFLAGS)%' -e 's%cc%$(CC)%' -e 's%c++%$(CXX)\ $(EXTRA_LDFLAGS)%' -i.orig config.macosx +LIVE_PATCH-$(HAVE_LINUX) = sed -e 's/=/= EXTRA_CPPFLAGS/' -e 's%EXTRA_CPPFLAGS%-I/include%' -i.orig groupsock/Makefile.head + +ifndef HAVE_UCLIBC +ifneq ($(ARCH)$(HAVE_MAEMO),armel) +LIVE_PATCH-$(HAVE_LINUX)+= ; sed -e 's%-D_FILE_OFFSET_BITS=64%-D_FILE_OFFSET_BITS=64\ -fPIC\ -DPIC%' -i.orig config.linux endif endif + +.live: live + (cd $; $(LIVE_PATCH-1) ) + (cd $; ./genMakefiles $(LIVE_TARGET-1) make $(HOSTCC)) mkdir -p $(PREFIX)/lib $(PREFIX)/include cp $/groupsock/libgroupsock.a $(PREFIX)/lib cp $/liveMedia/libliveMedia.a $(PREFIX)/lib ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: vod: use time instead of position for seek requests (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Wed Nov 17 19:23:43 2010 +0100| [cc3200cc52f5bca93cb35a54432ff0818398ad16] | committer: Pierre Ynard vod: use time instead of position for seek requests RTSP uses NPT in seconds, so don't convert for nothing... http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc3200cc52f5bca93cb35a54432ff0818398ad16 --- modules/misc/rtsp.c | 47 +++-- modules/stream_out/rtp.h |2 +- modules/stream_out/rtsp.c |6 ++-- modules/stream_out/vod.c | 28 -- src/input/vlm.c |4 +- 5 files changed, 43 insertions(+), 44 deletions(-) Diff: http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=cc3200cc52f5bca93cb35a54432ff0818398ad16 ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: bootstrap: Use a link to distro file instead of a copy. (Pierre d' Herbemont )
vlc | branch: master | Pierre d'Herbemont pdherbem...@free.fr | Wed Nov 17 19:17:24 2010 +0100| [dd5d3f52dc2d36ec7bc8fcb1200103259fdaee36] | committer: Pierre d'Herbemont bootstrap: Use a link to distro file instead of a copy. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dd5d3f52dc2d36ec7bc8fcb1200103259fdaee36 --- extras/contrib/bootstrap | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/extras/contrib/bootstrap b/extras/contrib/bootstrap index c327467..d3ef7df 100755 --- a/extras/contrib/bootstrap +++ b/extras/contrib/bootstrap @@ -149,14 +149,6 @@ rm -f ${config_mak} echo # Make changes if you know what you're doing. } ${config_mak} -# Create distro.mak -distro_mak=${BUILDDIR}/distro.mak -rm -f ${distro_mak} -{ -echo # Automatically generated by bootstrap -echo # Make changes if you know what you're doing. -} ${distro_mak} - if test $TARGET != $BUILD; then test -z $CC CC=${TARGET}-gcc test -z $CXXCXX=${TARGET}-g++ @@ -312,7 +304,10 @@ fi # Default Unix-like systems hint_distro unix -cat src/Distributions/${DISTRO}.mak ${distro_mak} +distro_mak=${BUILDDIR}/distro.mak +distro_file=`pwd`/src/Distributions/${DISTRO}.mak +rm ${distro_mak} +ln -sf ${distro_file} ${distro_mak} # # Distro specific settings ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: contrib: Build tools first. (Pierre d'Herbemont )
vlc | branch: master | Pierre d'Herbemont pdherbem...@free.fr | Wed Nov 17 19:47:22 2010 +0100| [16600c8ff8892b3adfd2ed4c751a8fe4d9db91a4] | committer: Pierre d'Herbemont contrib: Build tools first. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=16600c8ff8892b3adfd2ed4c751a8fe4d9db91a4 --- extras/contrib/contrib.mak|1 + extras/contrib/src/Distributions/macosx32.mak |4 +++- extras/contrib/src/Distributions/macosx64.mak |4 +++- extras/contrib/src/contrib-src.mak|2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/extras/contrib/contrib.mak b/extras/contrib/contrib.mak index dc8d36c..dcbe5cf 100644 --- a/extras/contrib/contrib.mak +++ b/extras/contrib/contrib.mak @@ -37,6 +37,7 @@ endif all: $(TARGETALL) using-src: + $(MAKE) -C build-src tools $(MAKE) -C build-src ifdef HAVE_DARWIN_10 diff --git a/extras/contrib/src/Distributions/macosx32.mak b/extras/contrib/src/Distributions/macosx32.mak index 66f5497..e43ab55 100644 --- a/extras/contrib/src/Distributions/macosx32.mak +++ b/extras/contrib/src/Distributions/macosx32.mak @@ -1,5 +1,7 @@ # Darwin rules -all: .automake .libtool .intl .pkgcfg .yasm .freetype \ +TOOLS = .libtool .intl .pkgcfg .yasm .automake + +all: .freetype \ .fribidi .a52 .mpeg2 .mad .ogg .vorbis .vorbisenc .theora \ .flac .speex .shout .faad .lame .twolame .ebml .matroska .ffmpeg \ .dvdcss .libdvdread .dvdnav .dvbpsi .live .caca .mod .fontconfig \ diff --git a/extras/contrib/src/Distributions/macosx64.mak b/extras/contrib/src/Distributions/macosx64.mak index f464224..7db1a67 100644 --- a/extras/contrib/src/Distributions/macosx64.mak +++ b/extras/contrib/src/Distributions/macosx64.mak @@ -1,5 +1,7 @@ # Darwin rules -all: .automake .libtool .intl .pkgcfg .yasm .freetype \ +TOOLS = .libtool .intl .pkgcfg .yasm .automake + +all: .freetype \ .fribidi .a52 .mpeg2 .mad .ogg .vorbis .vorbisenc .theora \ .flac .speex .shout .faad .lame .twolame .ebml .matroska .ffmpeg \ .dvdcss .libdvdread .dvdnav .dvbpsi .live .caca .mod .fontconfig \ diff --git a/extras/contrib/src/contrib-src.mak b/extras/contrib/src/contrib-src.mak index f3d0684..abaa82a 100644 --- a/extras/contrib/src/contrib-src.mak +++ b/extras/contrib/src/contrib-src.mak @@ -2671,6 +2671,8 @@ CLEAN_FILE += .gme CLEAN_PKG += game-music-emu-$(GME_VERSION) DISTCLEAN_PKG += game-music-emu-$(GME_VERSION).tbz2 +tools: $(TOOLS) + # *** # Some cleaning # *** ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: contrib: No need to remove distro file before ln -sf. (Pierre d' Herbemont )
vlc | branch: master | Pierre d'Herbemont pdherbem...@free.fr | Wed Nov 17 19:53:44 2010 +0100| [b2c851f49909af828752eebb2cd030a7be69e337] | committer: Pierre d'Herbemont contrib: No need to remove distro file before ln -sf. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b2c851f49909af828752eebb2cd030a7be69e337 --- extras/contrib/bootstrap |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/extras/contrib/bootstrap b/extras/contrib/bootstrap index d3ef7df..7e2a1b1 100755 --- a/extras/contrib/bootstrap +++ b/extras/contrib/bootstrap @@ -306,7 +306,6 @@ hint_distro unix distro_mak=${BUILDDIR}/distro.mak distro_file=`pwd`/src/Distributions/${DISTRO}.mak -rm ${distro_mak} ln -sf ${distro_file} ${distro_mak} # ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Revert live555: rtsp-cachi ng is needed also for SDP ( Rémi Denis-Courmon t )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Wed Nov 17 23:11:59 2010 +0200| [e3937421be7441c05dda2a56d62f5311615df80d] | committer: Rémi Denis-Courmont Revert live555: rtsp-caching is needed also for SDP This reverts commit 9ae385f64cedf3d88615e6a0ec6a10a3e3d68f49. This does not work. A pure demux cannot set the PTS delay. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e3937421be7441c05dda2a56d62f5311615df80d --- modules/demux/live555.cpp |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp index 949b5c9..99ce6d7 100644 --- a/modules/demux/live555.cpp +++ b/modules/demux/live555.cpp @@ -290,7 +290,10 @@ static int Open ( vlc_object_t *p_this ) return VLC_EGENERIC; } } -var_Create( p_demux, rtsp-caching, VLC_VAR_INTEGER|VLC_VAR_DOINHERIT ); +else +{ +var_Create( p_demux, rtsp-caching, VLC_VAR_INTEGER|VLC_VAR_DOINHERIT ); +} p_demux-pf_demux = Demux; p_demux-pf_control= Control; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Allow demux to select the PTS d elay, fallback to access ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Wed Nov 17 23:40:36 2010 +0200| [991aa6aaeed4212f8155bda43fdccbd6b0cc4e9f] | committer: Rémi Denis-Courmont Allow demux to select the PTS delay, fallback to access This will allow the SDP parsers to set their PTS delay according to rtsp-caching/rtp-caching rather than the caching value of the access module. The access module is irrelevant in that particular case. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=991aa6aaeed4212f8155bda43fdccbd6b0cc4e9f --- modules/demux/mp4/mp4.c |1 + modules/demux/subtitle.c |1 + modules/demux/vobsub.c |1 + src/input/demux.c|1 + src/input/input.c| 28 ++-- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index 0527d2a..04854f8 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -1019,6 +1019,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) case DEMUX_SET_GROUP: case DEMUX_HAS_UNSUPPORTED_META: case DEMUX_GET_ATTACHMENTS: +case DEMUX_GET_PTS_DELAY: return VLC_EGENERIC; default: diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c index e46c836..f0f7e03 100644 --- a/modules/demux/subtitle.c +++ b/modules/demux/subtitle.c @@ -636,6 +636,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) p_sys-i_next_demux_date = (int64_t)va_arg( args, int64_t ); return VLC_SUCCESS; +case DEMUX_GET_PTS_DELAY: case DEMUX_GET_FPS: case DEMUX_GET_META: case DEMUX_GET_ATTACHMENTS: diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c index 2082842..e999096 100644 --- a/modules/demux/vobsub.c +++ b/modules/demux/vobsub.c @@ -329,6 +329,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) p_sys-i_next_demux_date = (int64_t)va_arg( args, int64_t ); return VLC_SUCCESS; +case DEMUX_GET_PTS_DELAY: case DEMUX_GET_FPS: case DEMUX_GET_META: case DEMUX_GET_TITLE_INFO: diff --git a/src/input/demux.c b/src/input/demux.c index 049645e..b0d7dae 100644 --- a/src/input/demux.c +++ b/src/input/demux.c @@ -312,6 +312,7 @@ int demux_vaControlHelper( stream_t *s, } return VLC_EGENERIC; +case DEMUX_GET_PTS_DELAY: case DEMUX_GET_FPS: case DEMUX_GET_META: case DEMUX_HAS_UNSUPPORTED_META: diff --git a/src/input/input.c b/src/input/input.c index b827753..8a0e070 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -2388,12 +2388,6 @@ static int InputSourceInit( input_thread_t *p_input, if( in-p_demux ) { /* Get infos from access_demux */ -int i_ret = demux_Control( in-p_demux, - DEMUX_GET_PTS_DELAY, in-i_pts_delay ); -assert( !i_ret ); -in-i_pts_delay = __MAX( 0, __MIN( in-i_pts_delay, INPUT_PTS_DELAY_MAX ) ); - - in-b_title_demux = true; if( demux_Control( in-p_demux, DEMUX_GET_TITLE_INFO, in-title, in-i_title, @@ -2454,9 +2448,6 @@ static int InputSourceInit( input_thread_t *p_input, if( !p_input-b_preparsing ) { bool b_can_seek; -access_Control( in-p_access, - ACCESS_GET_PTS_DELAY, in-i_pts_delay ); -in-i_pts_delay = __MAX( 0, __MIN( in-i_pts_delay, INPUT_PTS_DELAY_MAX ) ); in-b_title_demux = false; if( access_Control( in-p_access, ACCESS_GET_TITLE_INFO, @@ -2603,7 +2594,7 @@ static int InputSourceInit( input_thread_t *p_input, /* get attachment * FIXME improve for b_preparsing: move it after GET_META and check psz_arturl */ -if( 1 || !p_input-b_preparsing ) +if( !p_input-b_preparsing ) { int i_attachment; input_attachment_t **attachment; @@ -2615,7 +2606,24 @@ static int InputSourceInit( input_thread_t *p_input, i_attachment, attachment ); vlc_mutex_unlock( p_input-p-p_item-lock ); } + +/* PTS delay: request from demux first. This is required for + * access_demux and some special cases like SDP demux. Otherwise, + * fallback to access */ +if( demux_Control( in-p_demux, DEMUX_GET_PTS_DELAY, + in-i_pts_delay ) ) +{ +/* GET_PTS_DELAY is mandatory for access_demux */ +assert( in-p_access ); +access_Control( in-p_access, +ACCESS_GET_PTS_DELAY, in-i_pts_delay ); +} +if( in-i_pts_delay INPUT_PTS_DELAY_MAX ) +in-i_pts_delay = INPUT_PTS_DELAY_MAX; +else if( in-i_pts_delay 0 ) +in-i_pts_delay = 0; } + if( !demux_Control( in-p_demux, DEMUX_GET_FPS, f_fps ) f_fps
[vlc-commits] commit: contrib: distclean target rem oves every thing ( Rémi Duraffort )
vlc | branch: master | Rémi Duraffort ivo...@videolan.org | Thu Nov 18 10:04:16 2010 +0100| [7853e28dd2d7c3aca3b80cdcdcd4c8e6c207ce8f] | committer: Rémi Duraffort contrib: distclean target removes every thing http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7853e28dd2d7c3aca3b80cdcdcd4c8e6c207ce8f --- extras/contrib/contrib.mak |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/extras/contrib/contrib.mak b/extras/contrib/contrib.mak index bae3db4..172b794 100644 --- a/extras/contrib/contrib.mak +++ b/extras/contrib/contrib.mak @@ -89,9 +89,7 @@ clean-bin: $(MAKE) -C build-src clean-dots distclean: - $(MAKE) clean - $(MAKE) -C build-src clean-src - rm -rf config.mak distro.mak + rm -rf $(BUILDDIRS) config.mak distro.mak build-src toolchain.cmake Makefile bin: using-bin ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: transcode: reduce decoder asp ect ratio fraction ( Rafaël Carré )
vlc | branch: master | Rafaël Carré rafael.ca...@gmail.com | Thu Nov 18 11:25:58 2010 +0100| [4cc2404ca5426f522822e4906572bfa7813669cd] | committer: Rafaël Carré transcode: reduce decoder aspect ratio fraction avoids integer overflow with aspect ratio = BIG:BIG fixes #4312 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4cc2404ca5426f522822e4906572bfa7813669cd --- modules/stream_out/transcode/video.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c index fcbde83..34a0087 100644 --- a/modules/stream_out/transcode/video.c +++ b/modules/stream_out/transcode/video.c @@ -495,6 +495,12 @@ static void transcode_video_encoder_init( sout_stream_t *p_stream, if( id-p_encoder-fmt_out.video.i_sar_num = 0 || id-p_encoder-fmt_out.video.i_sar_den = 0 ) { +vlc_ureduce( id-p_decoder-fmt_out.video.i_sar_num, + id-p_decoder-fmt_out.video.i_sar_den, + id-p_decoder-fmt_out.video.i_sar_num, + id-p_decoder-fmt_out.video.i_sar_den, + 0 ); + id-p_encoder-fmt_out.video.i_sar_num = id-p_decoder-fmt_out.video.i_sar_num * i_src_width / i_dst_width; id-p_encoder-fmt_out.video.i_sar_den = id-p_decoder-fmt_out.video.i_sar_den * i_src_height / i_dst_height; } ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: transcode: reduce decoder asp ect ratio fraction ( Rafaël Carré )
vlc/vlc-1.1 | branch: master | Rafaël Carré rafael.ca...@gmail.com | Thu Nov 18 11:25:58 2010 +0100| [39caba70757051594d7aa876bd0673248b618f0c] | committer: Rafaël Carré transcode: reduce decoder aspect ratio fraction avoids integer overflow with aspect ratio = BIG:BIG fixes #4312 (cherry picked from commit 4cc2404ca5426f522822e4906572bfa7813669cd) Signed-off-by: Rafaël Carré rafael.ca...@gmail.com http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=39caba70757051594d7aa876bd0673248b618f0c --- modules/stream_out/transcode/video.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c index 4ec192c..91b1045 100644 --- a/modules/stream_out/transcode/video.c +++ b/modules/stream_out/transcode/video.c @@ -435,6 +435,12 @@ static void transcode_video_encoder_init( sout_stream_t *p_stream, if( id-p_encoder-fmt_out.video.i_sar_num = 0 || id-p_encoder-fmt_out.video.i_sar_den = 0 ) { +vlc_ureduce( id-p_decoder-fmt_out.video.i_sar_num, + id-p_decoder-fmt_out.video.i_sar_den, + id-p_decoder-fmt_out.video.i_sar_num, + id-p_decoder-fmt_out.video.i_sar_den, + 0 ); + id-p_encoder-fmt_out.video.i_sar_num = id-p_decoder-fmt_out.video.i_sar_num * i_src_width / i_dst_width; id-p_encoder-fmt_out.video.i_sar_den = id-p_decoder-fmt_out.video.i_sar_den * i_src_height / i_dst_height; } ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: ncurses: redraw interface unc onditionally ( Rafaël Carré )
vlc | branch: master | Rafaël Carré rafael.ca...@gmail.com | Tue Nov 16 13:35:40 2010 +0100| [94189fcabf48c2a054c186b388ad0fc532ef235e] | committer: Rafaël Carré ncurses: redraw interface unconditionally redraw happens on getch() return, on timeout (1 second), or on keypress wether the key was handled or not. input change is now checked in the main loop http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=94189fcabf48c2a054c186b388ad0fc532ef235e --- modules/gui/ncurses.c | 125 ++--- 1 files changed, 66 insertions(+), 59 deletions(-) diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c index bb197c4..8bd6241 100644 --- a/modules/gui/ncurses.c +++ b/modules/gui/ncurses.c @@ -1493,7 +1493,7 @@ static bool HandleBrowseKey(intf_thread_t *p_intf, int key) return false; } -static bool HandleEditBoxKey(intf_thread_t *p_intf, int key, int box) +static void HandleEditBoxKey(intf_thread_t *p_intf, int key, int box) { intf_sys_t *p_sys = p_intf-p_sys; bool search = box == BOX_SEARCH; @@ -1505,7 +1505,7 @@ static bool HandleEditBoxKey(intf_thread_t *p_intf, int key, int box) switch(key) { case 0x0c: /* ^l */ -case KEY_CLEAR: clear(); return 1; +case KEY_CLEAR: clear(); return; case KEY_ENTER: case '\r': @@ -1543,13 +1543,13 @@ static bool HandleEditBoxKey(intf_thread_t *p_intf, int key, int box) p_sys-b_plidx_follow = true; } p_sys-i_box_type = BOX_PLAYLIST; -return 1; +return; case 0x1b: /* ESC */ /* Alt+key combinations return 2 keys in the terminal keyboard: * ESC, and the 2nd key. * If some other key is available immediately (where immediately - * means after wgetch() 1 second delay), that means that the + * means after getch() 1 second delay), that means that the * ESC key was not pressed. * * man 3X curs_getch says: @@ -1561,11 +1561,11 @@ static bool HandleEditBoxKey(intf_thread_t *p_intf, int key, int box) * */ if (getch() != ERR) -return 0; +return; if (search) p_sys-i_box_idx = p_sys-i_before_search; p_sys-i_box_type = BOX_PLAYLIST; -return 1; +return; case KEY_BACKSPACE: case 0x7f: @@ -1587,7 +1587,6 @@ static bool HandleEditBoxKey(intf_thread_t *p_intf, int key, int box) p_sys-psz_old_search = NULL; SearchPlaylist(p_sys, str); } -return 1; } static void InputNavigate(input_thread_t* p_input, const char *var) @@ -1596,7 +1595,7 @@ static void InputNavigate(input_thread_t* p_input, const char *var) var_TriggerCallback(p_input, var); } -static bool HandleCommonKey(intf_thread_t *p_intf, int key) +static void HandleCommonKey(intf_thread_t *p_intf, int key) { intf_sys_t *p_sys = p_intf-p_sys; playlist_t *p_playlist = pl_Get(p_intf); @@ -1604,40 +1603,40 @@ static bool HandleCommonKey(intf_thread_t *p_intf, int key) { case 0x1b: /* ESC */ if (getch() != ERR) -return false; +return; case 'q': case 'Q': case KEY_EXIT: libvlc_Quit(p_intf-p_libvlc); p_sys-b_exit = true; // terminate the main loop -return false; +return; case 'h': -case 'H': BoxSwitch(p_sys, BOX_HELP); return true; -case 'i': BoxSwitch(p_sys, BOX_INFO); return true; -case 'm': BoxSwitch(p_sys, BOX_META); return true; -case 'L': BoxSwitch(p_sys, BOX_LOG);return true; -case 'P': BoxSwitch(p_sys, BOX_PLAYLIST); return true; -case 'B': BoxSwitch(p_sys, BOX_BROWSE); return true; -case 'x': BoxSwitch(p_sys, BOX_OBJECTS);return true; -case 'S': BoxSwitch(p_sys, BOX_STATS); return true; +case 'H': BoxSwitch(p_sys, BOX_HELP); return; +case 'i': BoxSwitch(p_sys, BOX_INFO); return; +case 'm': BoxSwitch(p_sys, BOX_META); return; +case 'L': BoxSwitch(p_sys, BOX_LOG);return; +case 'P': BoxSwitch(p_sys, BOX_PLAYLIST); return; +case 'B': BoxSwitch(p_sys, BOX_BROWSE); return; +case 'x': BoxSwitch(p_sys, BOX_OBJECTS);return; +case 'S': BoxSwitch(p_sys, BOX_STATS); return; case '/': /* Search */ p_sys-psz_search_chain[0] = '\0'; p_sys-b_plidx_follow = false; p_sys-i_before_search = p_sys-i_box_idx; p_sys-i_box_type = BOX_SEARCH; -return true; +return; case 'A': /* Open */ p_sys-psz_open_chain[0] = '\0'; p_sys-i_box_type = BOX_OPEN; -return true; +return; /* Navigation */ -case KEY_RIGHT: ChangePosition(p_intf, +0.01); return true; -case KEY_LEFT: ChangePosition(p_intf, -0.01); return true; +case KEY_RIGHT: ChangePosition(p_intf, +0.01); return; +case KEY_LEFT: ChangePosition(p_intf
[vlc-commits] commit: python-vlc: fix return value in comment for libvlc methods using [ OUT] parameters (Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Thu Nov 18 08:26:08 2010 +0100| [d323422509952067315ddadc3bc535f6a9d75904] | committer: Olivier Aubert python-vlc: fix return value in comment for libvlc methods using [OUT] parameters http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=d323422509952067315ddadc3bc535f6a9d75904 --- generate.py |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/generate.py b/generate.py index 61a2972..3c7aef8 100755 --- a/generate.py +++ b/generate.py @@ -563,6 +563,11 @@ class _Enum(ctypes.c_ulong): ret = [ l.replace('@return', '@return:') for l in lines if '@return' in l ] params = [ python_param_re.sub('\\1:\\2', l) for l in lines if '@param' in l and not '[OUT]' in l ] +outparams = [ python_param_re.findall(l)[0][0] for l in lines if '@param' in l and '[OUT]' in l ] +if outparams: +# Replace the @return line +ret = [ '@return %s' % , .join(p.strip(@param ) for p in outparams) ] + if fix_first and params: # remove (self) params = params[1:] ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: python-vlc: add missing f.close() calls (Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Thu Nov 18 08:26:20 2010 +0100| [ba24b5b33f987a26d3d7ed8f3d8cfec93ce62aff] | committer: Olivier Aubert python-vlc: add missing f.close() calls http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=ba24b5b33f987a26d3d7ed8f3d8cfec93ce62aff --- generate.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/generate.py b/generate.py index 3c7aef8..10ef294 100755 --- a/generate.py +++ b/generate.py @@ -203,6 +203,7 @@ class Parser(object): yield (typ, name, values, comment) comment= +f.close() def parse_include(self, name): Parse include file. @@ -282,6 +283,7 @@ class Parser(object): params, comment) comment='' +f.close() def dump_methods(self): print ** Defined functions ** ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: python-vlc: add marquee usage example (Jean Brouwers )
vlc/python | branch: master | Jean Brouwers mrje...@gmail.com | Thu Nov 18 18:32:10 2010 +0100| [2e9e7a4a909c7b1e3a63be7d66d716aa8b640b62] | committer: Olivier Aubert python-vlc: add marquee usage example Signed-off-by: Olivier Aubert olivier.aub...@liris.cnrs.fr http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=2e9e7a4a909c7b1e3a63be7d66d716aa8b640b62 --- footer.py| 28 generated/vlc.py | 52 ++-- header.py| 22 +- 3 files changed, 91 insertions(+), 11 deletions(-) diff --git a/footer.py b/footer.py index b27a7ad..43e1127 100644 --- a/footer.py +++ b/footer.py @@ -2,7 +2,7 @@ def callbackmethod(f): Backward compatibility with the now useless @callbackmethod decorator. - + This method will be removed after a transition period. return f @@ -52,12 +52,32 @@ if __name__ == '__main__': print Error:, sys.exc_info()[1] if sys.argv[1:]: -instance=Instance() -media=instance.media_new(sys.argv[1]) -player=instance.media_player_new() +instance = Instance() +try: +# load marq option +media = instance.media_new(sys.argv[1], sub-filter=marq) +except NameError: +print NameError:, sys.exc_info()[1], (VLC release too old?) +sys.exit(1) +player = instance.media_player_new() player.set_media(media) player.play() + # Some marquee examples. Marquee requires 'sub-filter=marq' in the + # media_new() call above. See also the Media.add_options method. + # http://www.videolan.org/doc/play-howto/en/ch04.html +player.video_set_marquee_int(VideoMarqueeOption.Enable, 1) +player.video_set_marquee_int(VideoMarqueeOption.Size, 24) # pixels +player.video_set_marquee_int(VideoMarqueeOption.Position, Position.Bottom) +if False: # only one marquee can be specified +player.video_set_marquee_int(VideoMarqueeOption.Timeout, 5000) # millisec, 0=forever +t = media.get_mrl() # movie +else: # update marquee text periodically +player.video_set_marquee_int(VideoMarqueeOption.Timeout, 0) # millisec, 0=forever +player.video_set_marquee_int(VideoMarqueeOption.Refresh, 1000) # millisec (or sec?) +t = '%Y-%m-%d %H:%M:%S' +player.video_set_marquee_string(VideoMarqueeOption.Text, t) + # Some event manager examples. Note, the callback can be any Python # callable and does not need to be decorated. Optionally, specify # any number of positional and/or keyword arguments to be passed diff --git a/generated/vlc.py b/generated/vlc.py index c48e4c2..fc5de11 100644 --- a/generated/vlc.py +++ b/generated/vlc.py @@ -36,7 +36,7 @@ import ctypes import sys import os -build_date=Tue Nov 16 12:19:50 2010 +build_date=Thu Nov 18 18:31:42 2010 # Used for win32 and MacOS X detected_plugin_path=None @@ -538,8 +538,8 @@ def track_description_list(head): Convert a TrackDescription linked list to a python list, and release the linked list. l = [] -item = head if head: +item = head while item: l.append( (item.contents.id, item.contents.name) ) item = item.contents.next @@ -587,6 +587,26 @@ class Rectangle(ctypes.Structure): ('right', ctypes.c_int), ] +class Position(object): +Enum-like, position constants for VideoMarqueePosition option. + +Center=0 +Left=1 +CenterLeft=1 +Right=2 +CenterRight=2 +Top=4 +TopCenter=4 +TopLeft=5 +TopRight=6 +Bottom=8 +BottomCenter=8 +BottomLeft=9 +BottomRight=10 + +def __init__(self): +raise TypeError('Constants only') + ### End of header.py ### class EventManager(object): Create an event manager and handler. @@ -5132,12 +5152,32 @@ if __name__ == '__main__': print Error:, sys.exc_info()[1] if sys.argv[1:]: -instance=Instance() -media=instance.media_new(sys.argv[1]) -player=instance.media_player_new() +instance = Instance() +try: +# load marq option +media = instance.media_new(sys.argv[1], sub-filter=marq) +except NameError: +print NameError:, sys.exc_info()[1], (VLC release too old?) +sys.exit(1) +player = instance.media_player_new() player.set_media(media) player.play() + # Some marquee examples. Marquee requires 'sub-filter=marq' in the + # media_new() call above. See also the Media.add_options method. + # http://www.videolan.org/doc/play-howto/en/ch04.html +player.video_set_marquee_int(VideoMarqueeOption.Enable, 1) +player.video_set_marquee_int(VideoMarqueeOption.Size, 24) # pixels
[vlc-commits] commit: python-vlc: when doing the os.chdir hack on win32, restore the original path after DLL loading (Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Thu Nov 18 18:34:09 2010 +0100| [66a811cf1ddb08bb4509fad7e08daaa84c59d533] | committer: Olivier Aubert python-vlc: when doing the os.chdir hack on win32, restore the original path after DLL loading http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=66a811cf1ddb08bb4509fad7e08daaa84c59d533 --- header.py |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/header.py b/header.py index 10840f6..7c185f5 100755 --- a/header.py +++ b/header.py @@ -50,6 +50,7 @@ if sys.platform.startswith('linux'): elif sys.platform.startswith('win'): import ctypes.util p=ctypes.util.find_library('libvlc.dll') +current_path = os.getcwd() if p is None: import _winreg # Try to use registry settings for r in _winreg.HKEY_LOCAL_MACHINE, _winreg.HKEY_CURRENT_USER: @@ -73,6 +74,8 @@ elif sys.platform.startswith('win'): else: detected_plugin_path = os.path.dirname(p) dll=ctypes.CDLL(p) +# Restore correct path once the DLL is loaded +os.chdir(current_path) del p elif sys.platform.startswith('darwin'): # FIXME: should find a means to configure path ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: python-vlc: convert bug/note/warning/ version fields into epydoc syntax (Olivier Aubert )
vlc/python | branch: master | Olivier Aubert olivier.aub...@liris.cnrs.fr | Thu Nov 18 18:17:43 2010 +0100| [63e77629433736132b8d3c61e14b652af33b0cf0] | committer: Olivier Aubert python-vlc: convert bug/note/warning/version fields into epydoc syntax http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=63e77629433736132b8d3c61e14b652af33b0cf0 --- generate.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/generate.py b/generate.py index 10ef294..8662a58 100755 --- a/generate.py +++ b/generate.py @@ -557,8 +557,9 @@ class _Enum(ctypes.c_ulong): lines=comment.replace('@{', '').replace('\\ingroup', '') \ .replace('@see', 'See').replace('\\see', 'See') \ - .replace('\\note', 'NOTE:').replace('\\warning', 'WARNING:') \ .replace('\\param', '@param').replace('\\return', '@return') \ + .replace('\\note', '@note:').replace('\\warning', '@warning:') \ + .replace('\\bug', '@bug:').replace('\\version', '@version:') \ .strip().splitlines() doc = [ l for l in lines if '@param' not in l and '@return' not in l ] ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: fix [50c315b8e37a6] ( Raf aël Carré )
vlc | branch: master | Rafaël Carré rafael.ca...@gmail.com | Thu Nov 18 18:50:13 2010 +0100| [181c3eea4f7cc4c89474167cdb12f5cc62419883] | committer: Rafaël Carré fix [50c315b8e37a6] http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=181c3eea4f7cc4c89474167cdb12f5cc62419883 --- extras/contrib/src/contrib-src.mak |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/extras/contrib/src/contrib-src.mak b/extras/contrib/src/contrib-src.mak index 7e832dc..f30a52c 100644 --- a/extras/contrib/src/contrib-src.mak +++ b/extras/contrib/src/contrib-src.mak @@ -1120,7 +1120,7 @@ FFMPEG_DEPS-$(HAVE_MACOSX) += .yasm FFMPEG_DEPS-$(HAVE_WIN32) += .dshow_headers ifdef SVN -FFMPEG_MK_TARGET = ffmpeg/.svn-co +FFMPEG_MK_TARGET = ffmpeg/.svn-$(FFMPEG_SVN_REV) else FFMPEG_MK_TARGET = ffmpeg/.untar endif ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: fix [41373a85a2] ( Rafa ël Carré )
vlc | branch: master | Rafaël Carré rafael.ca...@gmail.com | Thu Nov 18 19:19:09 2010 +0100| [2f53024169a244b6ab9e6b20b5f71a2683634071] | committer: Rafaël Carré fix [41373a85a2] We don't want an universal build on osx http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2f53024169a244b6ab9e6b20b5f71a2683634071 --- extras/contrib/src/contrib-src.mak | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/extras/contrib/src/contrib-src.mak b/extras/contrib/src/contrib-src.mak index f30a52c..161e7ec 100644 --- a/extras/contrib/src/contrib-src.mak +++ b/extras/contrib/src/contrib-src.mak @@ -877,10 +877,12 @@ ifdef HAVE_WIN32 CROSS=$(HOST)- endif -VPX_TARGET-$(ENABLED) = $(TARGET) -VPX_TARGET-$(HAVE_WIN32) = x86-win32-gcc - -VPX_DEPS-$(ENABLED) = +VPX_TARGET-$(ENABLED) = FIXME +VPX_TARGET-$(HAVE_WIN32) = x86-win32-gcc +VPX_TARGET-$(HAVE_DARWIN_OS) = ppc32-darwin9-gcc +VPX_TARGET-$(HAVE_MACOSX_ON_INTEL) = x86-darwin9-gcc +VPX_TARGET-$(HAVE_MACOSX64)= x86_64-darwin9-gcc +VPX_DEPS-$(ENABLED)= VPX_DEPS-$(HAVE_MACOSX_ON_INTEL) += .yasm .libvpx: libvpx $(VPX_DEPS-1) ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Configure: do not use XCB on Symbian (Jean-Baptiste Kempf )
vlc | branch: master | Jean-Baptiste Kempf j...@videolan.org | Thu Nov 18 15:06:02 2010 +0100| [260cae1d37eb087684542c4c532bd731c225f8dd] | committer: Jean-Baptiste Kempf Configure: do not use XCB on Symbian http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=260cae1d37eb087684542c4c532bd731c225f8dd --- configure.ac |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index a352b8f..81d828f 100644 --- a/configure.ac +++ b/configure.ac @@ -376,6 +376,9 @@ case ${host_os} in hpux*) SYS=hpux ;; + symbian*) +SYS=symbian +;; *) SYS=${host_os} ;; @@ -3152,7 +3155,7 @@ dnl X C Bindings modules dnl AC_ARG_ENABLE(xcb, [ --enable-xcbX11 support with XCB (default enabled)],, [ - AS_IF([test ${SYS} != mingw32 -a ${SYS} != mingwce -a ${SYS} != darwin], [ + AS_IF([test ${SYS} != mingw32 -a ${SYS} != mingwce -a ${SYS} != darwin -a ${SYS} != symbian], [ enable_xcb=yes ], [ enable_xcb=no ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt: fix WinXP quitting issue (Jean-Baptiste Kempf )
vlc | branch: master | Jean-Baptiste Kempf j...@videolan.org | Fri Nov 19 02:58:42 2010 +0100| [7f485998dd63c9685f0a470439c9b2ea127ef5c5] | committer: Jean-Baptiste Kempf Qt: fix WinXP quitting issue http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7f485998dd63c9685f0a470439c9b2ea127ef5c5 --- modules/gui/qt4/main_interface.cpp | 13 + modules/gui/qt4/main_interface.hpp |1 + modules/gui/qt4/qt4.cpp| 17 +++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 3182775..5554aca 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -226,6 +226,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) CONNECT( THEDP, toolBarConfUpdated(), this, recreateToolbars() ); +CONNECT( this, askToQuit(), THEDP, quit() ); + /** END of CONNECTS**/ @@ -265,6 +267,8 @@ MainInterface::~MainInterface() if( stackCentralOldWidget == videoWidget ) showTab( bgWidget ); +releaseVideoSlot(); + #ifdef WIN32 if( himl ) ImageList_Destroy( himl ); @@ -597,7 +601,8 @@ void MainInterface::releaseVideo( void ) /* Function that is CONNECTED to the previous emit */ void MainInterface::releaseVideoSlot( void ) { -videoWidget-release(); +if( videoWidget ) +videoWidget-release(); setVideoOnTop( false ); setVideoFullScreen( false ); @@ -1180,9 +1185,9 @@ void MainInterface::wheelEvent( QWheelEvent *e ) void MainInterface::closeEvent( QCloseEvent *e ) { -e-accept(); -hide(); -THEDP-quit(); +e-ignore(); /* Do not quit */ +// hide(); +emit askToQuit(); /* ask THEDP to quit, so we have a unique method */ } void MainInterface::setInterfaceFullScreen( bool fs ) diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp index 5b55e76..4f7304e 100644 --- a/modules/gui/qt4/main_interface.hpp +++ b/modules/gui/qt4/main_interface.hpp @@ -244,6 +244,7 @@ signals: void askVideoOnTop( bool ); void minimalViewToggled( bool ); void fullscreenInterfaceToggled( bool ); +void askToQuit(); }; diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 5a29d30..9e7519e 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -396,8 +396,15 @@ static void Close( vlc_object_t *p_this ) var_Destroy (pl_Get(p_this), qt4-iface); } +/* And quit */ +msg_Dbg( p_intf, Please die, die, die... ); +QApplication::closeAllWindows(); + +//QApplication::quit(); + QVLCApp::triggerQuit(); +msg_Dbg( p_intf, Please die, die, die 2... ); #ifndef Q_WS_MAC vlc_join (p_sys-thread, NULL); #endif @@ -445,7 +452,7 @@ static void *Thread( void *obj ) #endif QSettings::UserScope, vlc, vlc-qt-interface ); -/* Icon setting */ +/* Icon setting, Mac uses icon from .icns */ #ifndef Q_WS_MAC if( QDate::currentDate().dayOfYear() = 352 ) /* One Week before Xmas */ app.setWindowIcon( QIcon(vlc_christmas_xpm) ); @@ -456,7 +463,7 @@ static void *Thread( void *obj ) /* Initialize timers and the Dialog Provider */ DialogsProvider::getInstance( p_intf ); -/* Detect screensize for small screens like TV or EEEpc*/ +/* Detect screensize for small screens like TV or Netbooks */ p_intf-p_sys-i_screenHeight = app.QApplication::desktop()-availableGeometry().height(); @@ -499,7 +506,7 @@ static void *Thread( void *obj ) #endif /* Last settings */ -app.setQuitOnLastWindowClosed( false ); +app.setQuitOnLastWindowClosed( true ); /* Retrieve last known path used in file browsing */ p_intf-p_sys-filepath = @@ -513,9 +520,7 @@ static void *Thread( void *obj ) /* Launch */ app.exec(); -/* And quit */ -QApplication::closeAllWindows(); - +msg_Dbg( p_intf, QApp exec() finished ); if (p_mi != NULL) { #warning BUG! ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt: tell that vlc processed the media keys (Hannes Domani )
vlc | branch: master | Hannes Domani ssb...@yahoo.de | Wed Nov 17 12:46:42 2010 +0100| [636b4a6bd4ac196c8ad6b09fc738ea8e0535c6c5] | committer: Jean-Baptiste Kempf Qt: tell that vlc processed the media keys Signed-off-by: Jean-Baptiste Kempf j...@videolan.org http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=636b4a6bd4ac196c8ad6b09fc738ea8e0535c6c5 --- modules/gui/qt4/main_interface_win32.cpp |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/modules/gui/qt4/main_interface_win32.cpp b/modules/gui/qt4/main_interface_win32.cpp index 1816353..5c8b0f1 100644 --- a/modules/gui/qt4/main_interface_win32.cpp +++ b/modules/gui/qt4/main_interface_win32.cpp @@ -182,6 +182,7 @@ bool MainInterface::winEvent ( MSG * msg, long * result ) break; case WM_APPCOMMAND: cmd = GET_APPCOMMAND_LPARAM(msg-lParam); +*result = TRUE; switch(cmd) { case APPCOMMAND_MEDIA_PLAY_PAUSE: @@ -213,8 +214,10 @@ bool MainInterface::winEvent ( MSG * msg, long * result ) break; default: msg_Dbg( p_intf, unknown APPCOMMAND = %d, cmd); + *result = FALSE; break; } +if (*result) return true; break; } return false; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: qt4: remove an assert (a ch eck for NULLity is enough). ( Rémi Duraffort )
vlc | branch: master | Rémi Duraffort ivo...@videolan.org | Fri Nov 19 10:51:07 2010 +0100| [d811e20b7a73233cc0669e0e53b88cdb1296e7ee] | committer: Rémi Duraffort qt4: remove an assert (a check for NULLity is enough). http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d811e20b7a73233cc0669e0e53b88cdb1296e7ee --- modules/gui/qt4/components/interface_widgets.cpp | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index e6ea283..c0d6748 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -171,10 +171,12 @@ void VideoWidget::release( void ) { msg_Dbg( p_intf, Video is not needed anymore ); -assert( stable ); -layout-removeWidget( stable ); -stable-deleteLater(); -stable = NULL; +if( stable ) +{ +layout-removeWidget( stable ); +stable-deleteLater(); +stable = NULL; +} updateGeometry(); } ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt4: pictureflow, if target futher than 20, jump closer and scroll last 20 items (Ilkka Ollakka )
vlc | branch: master | Ilkka Ollakka il...@videolan.org | Fri Nov 19 13:37:19 2010 +0200| [0c1d5a897672e4f2d153a91ba60ef21a238f8def] | committer: Ilkka Ollakka Qt4: pictureflow, if target futher than 20, jump closer and scroll last 20 items http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c1d5a897672e4f2d153a91ba60ef21a238f8def --- modules/gui/qt4/components/playlist/views.cpp | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/components/playlist/views.cpp b/modules/gui/qt4/components/playlist/views.cpp index 3b40a94..3af0233 100644 --- a/modules/gui/qt4/components/playlist/views.cpp +++ b/modules/gui/qt4/components/playlist/views.cpp @@ -403,8 +403,15 @@ QRect PicFlowView::visualRect(const QModelIndex index ) const void PicFlowView::scrollTo(const QModelIndex index, QAbstractItemView::ScrollHint) { int currentIndex = picFlow-centerIndex(); - if( qAbs( currentIndex - index.row()) 100 ) -picFlow-setCenterIndex( index.row()); + if( qAbs( currentIndex - index.row()) 20 ) + { +/* offset is offset from target index toward currentIndex */ +int offset = -19; +if( index.row() currentIndex ) +offset = 19; +picFlow-setCenterIndex( index.row() + offset ); +picFlow-showSlide( index.row() ); + } else picFlow-showSlide( index.row() ); } ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: vod: don't handle pause state toggling in the RTSP stack ( Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Fri Nov 19 13:45:54 2010 +0100| [5ac972d7f71ec8b80ed88806c7bf2246e8c2af1f] | committer: Pierre Ynard vod: don't handle pause state toggling in the RTSP stack RTSP doesn't toggle pause state, it sends unconditional PLAY/PAUSE commands. Let the VLM handle it. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ac972d7f71ec8b80ed88806c7bf2246e8c2af1f --- modules/misc/rtsp.c | 36 +++- modules/stream_out/rtp.h |2 +- modules/stream_out/rtsp.c | 16 modules/stream_out/vod.c |4 +--- src/input/vlm.c |2 +- 5 files changed, 14 insertions(+), 46 deletions(-) diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c index 910533f..77123af 100644 --- a/modules/misc/rtsp.c +++ b/modules/misc/rtsp.c @@ -113,7 +113,6 @@ typedef struct char *psz_session; bool b_playing; /* is it in play state */ -bool b_paused; /* is it in pause state */ int i_es; rtsp_client_es_t **es; @@ -1138,26 +1137,13 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl, CommandPush( p_vod, RTSP_CMD_TYPE_FORWARD, p_media, psz_session, 0, f_scale, NULL ); } - -if( p_rtsp-b_paused ) -{ -p_rtsp-b_paused = false; -CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media, - psz_session, 0, 0.0, NULL ); -} } -break; } -} - -if( p_rtsp-b_playing p_rtsp-b_paused ) -{ -CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media, - psz_session, 0, 0.0, NULL ); -p_rtsp-b_paused = false; +/* unpause, in case it's paused */ +CommandPush( p_vod, RTSP_CMD_TYPE_PLAY, p_media, psz_session, + 0, 0.0, ); break; } -else if( p_rtsp-b_playing ) break; if( httpd_ClientIP( cl, ip ) == NULL ) break; @@ -1233,12 +1219,8 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl, p_rtsp = RtspClientGet( p_media, psz_session ); if( !p_rtsp ) break; -if( !p_rtsp-b_paused ) -{ -CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media, psz_session, - 0, 0.0, NULL ); -p_rtsp-b_paused = true; -} +CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media, psz_session, + 0, 0.0, NULL ); answer-i_status = 200; answer-i_body = 0; @@ -1494,12 +1476,8 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl, p_rtsp = RtspClientGet( p_media, psz_session ); if( !p_rtsp ) break; -if( !p_rtsp-b_paused ) -{ -CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media, psz_session, - 0, 0.0, NULL ); -p_rtsp-b_paused = true; -} +CommandPush( p_vod, RTSP_CMD_TYPE_PAUSE, p_media, psz_session, + 0, 0.0, NULL ); answer-i_status = 200; answer-i_body = 0; diff --git a/modules/stream_out/rtp.h b/modules/stream_out/rtp.h index 1abfa31..a391577 100644 --- a/modules/stream_out/rtp.h +++ b/modules/stream_out/rtp.h @@ -91,7 +91,7 @@ int OpenVoD ( vlc_object_t * ); void CloseVoD( vlc_object_t * ); void vod_start(vod_media_t *p_media, const char *psz_session); -void vod_toggle_pause(vod_media_t *p_media, const char *psz_session); +void vod_pause(vod_media_t *p_media, const char *psz_session); void vod_stop(vod_media_t *p_media, const char *psz_session); void vod_seek(vod_media_t *p_media, const char *psz_session, int64_t time); diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c index 17f8dc3..2e00424 100644 --- a/modules/stream_out/rtsp.c +++ b/modules/stream_out/rtsp.c @@ -173,7 +173,6 @@ struct rtsp_session_t rtsp_stream_t *stream; uint64_t id; bool vod_started; /* true if the VoD media instance was created */ -bool paused; /* true if the client paused the VoD instance */ /* output (id-access) */ inttrackc; @@ -300,7 +299,6 @@ rtsp_session_t *RtspClientNew( rtsp_stream_t *rtsp ) s-stream = rtsp; vlc_rand_bytes (s-id, sizeof (s-id)); s-vod_started = false; -s-paused = false; s-trackc = 0; s-trackv = NULL; @@ -900,11 +898,8 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id, int64_t time = ParseNPT (range + 4
[vlc-commits] commit: vlm: accept ps and ts as mux arguments (Pierre Ynard )
vlc | branch: master | Pierre Ynard linkfa...@yahoo.fr | Fri Nov 19 19:56:09 2010 +0100| [62ac11aea889dea39d9fd9ced7a689dea76ce7ca] | committer: Pierre Ynard vlm: accept ps and ts as mux arguments Having to type mux mp2t was lame http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=62ac11aea889dea39d9fd9ced7a689dea76ce7ca --- src/input/vlm.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/input/vlm.c b/src/input/vlm.c index 080fd8f..38056b4 100644 --- a/src/input/vlm.c +++ b/src/input/vlm.c @@ -639,11 +639,19 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media ) if( p_cfg-vod.psz_mux ) { +const char *psz_mux; +if (!strcmp(p_cfg-vod.psz_mux, ps)) +psz_mux = mp2p; +else if (!strcmp(p_cfg-vod.psz_mux, ts)) +psz_mux = mp2t; +else +psz_mux = p_cfg-vod.psz_mux; + input_item_t item; es_format_t es, *p_es = es; union { char text[5]; uint32_t value; } fourcc; -sprintf( fourcc.text, %4.4s, p_cfg-vod.psz_mux ); +sprintf( fourcc.text, %4.4s, psz_mux ); fourcc.text[0] = tolower(fourcc.text[0]); fourcc.text[1] = tolower(fourcc.text[1]); fourcc.text[2] = tolower(fourcc.text[2]); ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: SDP: dummy access that return the URL path ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Fri Nov 19 17:45:40 2010 +0200| [93417b6fa7810c5898daed3c321673474553d4cb] | committer: Rémi Denis-Courmont SDP: dummy access that return the URL path With this, we can parse an SDP the same way if it comes from SAP (as sdp://...) or from a file or the network. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93417b6fa7810c5898daed3c321673474553d4cb --- modules/access/Modules.am |7 ++ modules/access/sdp.c | 134 + 2 files changed, 141 insertions(+), 0 deletions(-) diff --git a/modules/access/Modules.am b/modules/access/Modules.am index e7af171..0385ca6 100644 --- a/modules/access/Modules.am +++ b/modules/access/Modules.am @@ -21,6 +21,11 @@ libfilesystem_plugin_la_CFLAGS = $(AM_CFLAGS) libfilesystem_plugin_la_LIBADD = $(AM_LIBADD) libfilesystem_plugin_la_DEPENDENCIES = +libsdp_plugin_la_SOURCES = sdp.c +libsdp_plugin_la_CFLAGS = $(AM_CFLAGS) +libsdp_plugin_la_LIBADD = $(AM_LIBADD) +libsdp_plugin_la_DEPENDENCIES = + SOURCES_access_mmap = mmap.c SOURCES_access_directory = directory.c SOURCES_access_dv = dv.c @@ -54,6 +59,7 @@ SOURCES_access_vdr = vdr.c SOURCES_libbluray = bluray.c SOURCES_decklink = decklink.cpp + SOURCES_access_rar = rar/rar.c rar/rar.h rar/access.c SOURCES_stream_filter_rar = rar/rar.c rar/rar.h rar/stream.c @@ -75,6 +81,7 @@ libvlc_LTLIBRARIES += \ libaccess_ftp_plugin.la \ libaccess_imem_plugin.la \ libaccess_attachment_plugin.la \ +libsdp_plugin.la \ libaccess_rar_plugin.la \ libstream_filter_rar_plugin.la \ libaccess_vdr_plugin.la \ diff --git a/modules/access/sdp.c b/modules/access/sdp.c new file mode 100644 index 000..e0511e0 --- /dev/null +++ b/modules/access/sdp.c @@ -0,0 +1,134 @@ +/* + * sdp.c: Fake input for sdp:// scheme + * + * Copyright (C) 2010 Rémi Denis-Courmont + * + * 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 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_plugin.h +#include vlc_access.h + +static int Open (vlc_object_t *); +static void Close (vlc_object_t *); + +vlc_module_begin () +set_shortname (N_(SDP)) +set_description (N_(Session Description Protocol)) +set_category (CAT_INPUT) +set_subcategory (SUBCAT_INPUT_ACCESS) + +set_capability (access, 0) +set_callbacks (Open, Close) +add_shortcut (sdp) +vlc_module_end() + +static ssize_t Read (access_t *, uint8_t *, size_t); +static int Seek (access_t *, uint64_t); +static int Control (access_t *, int, va_list); + +struct access_sys_t +{ +size_t length; +char data[0]; +}; + +static int Open (vlc_object_t *obj) +{ +access_t *access = (access_t *)obj; +size_t len = strlen (access-psz_location); + +access_sys_t *sys = malloc (sizeof(*sys) + len); +if (unlikely(sys == NULL)) +return VLC_ENOMEM; + +/* NOTE: This copy is not really needed. Better safe than sorry. */ +sys-length = len; +memcpy (sys-data, access-psz_location, len); + +access_InitFields (access); +access-pf_read = Read; +access-pf_block = NULL; +access-pf_seek = Seek; +access-pf_control = Control; +access-p_sys = sys; + +return VLC_SUCCESS; +} + +static void Close (vlc_object_t *obj) +{ +access_t *access = (access_t *)obj; +access_sys_t *sys = access-p_sys; + +free (sys); +} + +static ssize_t Read (access_t *access, uint8_t *buf, size_t len) +{ +access_sys_t *sys = access-p_sys; + +if (access-info.i_pos = sys-length) +{ +access-info.b_eof = true; +return 0; +} + +if (len sys-length) +len = sys-length; +memcpy (buf, sys-data + access-info.i_pos, len); +access-info.i_pos += len; +return len; +} + +static int Seek (access_t *access, uint64_t position) +{ +access-info.i_pos = position; +access-info.b_eof = false; +return VLC_SUCCESS; +} + +static int Control (access_t *access, int query, va_list args) +{ +switch (query
[vlc-commits] commit: live555: remove sdp access_demux ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Fri Nov 19 17:52:09 2010 +0200| [8f8f1d5e5c74dfb6cf00a4c267d4042342d83975] | committer: Rémi Denis-Courmont live555: remove sdp access_demux http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8f8f1d5e5c74dfb6cf00a4c267d4042342d83975 --- modules/demux/live555.cpp |8 +--- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp index 949b5c9..20b485c 100644 --- a/modules/demux/live555.cpp +++ b/modules/demux/live555.cpp @@ -106,7 +106,7 @@ vlc_module_begin () add_submodule () set_description( N_(RTSP/RTP access and demux) ) -add_shortcut( rtsp, pnm, sdp, live, livedotcom ) +add_shortcut( rtsp, pnm, live, livedotcom ) set_capability( access_demux, 0 ) set_callbacks( Open, Close ) add_bool( rtsp-tcp, false, @@ -388,12 +388,6 @@ static int Open ( vlc_object_t *p_this ) } p_sys-p_sdp = (char*)p_sdp; } -else if( ( p_demux-s == NULL ) - !strcasecmp( p_demux-psz_access, sdp ) ) -{ -/* sdp:// link from SAP */ -p_sys-p_sdp = strdup( p_sys-psz_path ); -} else if( ( i_return = Connect( p_demux ) ) != VLC_SUCCESS ) { msg_Err( p_demux, Failed to connect with rtsp://%s, p_sys-psz_path ); ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: file output: support for writing to an already open file descriptor ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Fri Nov 19 18:11:36 2010 +0200| [23af3705afeb76416c6697b064af2e314590f3f2] | committer: Rémi Denis-Courmont file output: support for writing to an already open file descriptor http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=23af3705afeb76416c6697b064af2e314590f3f2 --- modules/access_output/file.c | 44 ++--- 1 files changed, 32 insertions(+), 12 deletions(-) diff --git a/modules/access_output/file.c b/modules/access_output/file.c index cb30317..f104f59 100644 --- a/modules/access_output/file.c +++ b/modules/access_output/file.c @@ -72,7 +72,7 @@ vlc_module_begin () set_capability( sout access, 50 ) set_category( CAT_SOUT ) set_subcategory( SUBCAT_SOUT_ACO ) -add_shortcut( file, stream ) +add_shortcut( file, stream, fd ) add_bool( SOUT_CFG_PREFIX append, false, APPEND_TEXT,APPEND_LONGTEXT, true ) #ifdef O_SYNC @@ -122,19 +122,40 @@ static int Open( vlc_object_t *p_this ) bool append = var_GetBool( p_access, SOUT_CFG_PREFIX append ); -if( !strcmp( p_access-psz_path, - ) ) +if (!strcmp (p_access-psz_access, fd)) { +char *end; + +fd = strtol (p_access-psz_path, end, 0); +if (!*p_access-psz_path || *end) +{ +msg_Err (p_access, invalid file descriptor: %s, + p_access-psz_path); +return VLC_EGENERIC; +} +fd = vlc_dup (fd); +if (fd == -1) +{ +msg_Err (p_access, cannot use file descriptor: %m); +return VLC_EGENERIC; +} +} #ifndef UNDER_CE +else +if( !strcmp( p_access-psz_path, - ) ) +{ #ifdef WIN32 setmode (fileno (stdout), O_BINARY); #endif fd = vlc_dup (fileno (stdout)); +if (fd == -1) +{ +msg_Err (p_access, cannot use standard output: %m); +return VLC_EGENERIC; +} msg_Dbg( p_access, using stdout ); -#else -#warning stdout is not supported on Windows Mobile, but may be used on Windows CE -fd = -1; -#endif } +#endif else { char *psz_tmp = str_format( p_access, p_access-psz_path ); @@ -146,12 +167,11 @@ static int Open( vlc_object_t *p_this ) #endif (append ? 0 : O_TRUNC), 0666 ); free( psz_tmp ); -} - -if (fd == -1) -{ -msg_Err( p_access, cannot open `%s' (%m), p_access-psz_path ); -return VLC_EGENERIC; +if (fd == -1) +{ +msg_Err (p_access, cannot create %s: %m, p_access-psz_path); +return VLC_EGENERIC; +} } p_access-pf_write = Write; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Improve libvlc_video_set_callbacks documentation ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sat Nov 20 12:07:37 2010 +0200| [bc957dc1a1a92f82f432ce2e45186dbc940b30cd] | committer: Rémi Denis-Courmont Improve libvlc_video_set_callbacks documentation This is untested. Doxygen does not seem to work anymore here: no module lists, no function documentation, only source code. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc957dc1a1a92f82f432ce2e45186dbc940b30cd --- include/vlc/libvlc_media_player.h | 61 + 1 files changed, 48 insertions(+), 13 deletions(-) diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h index 5342b2a..9dea326 100644 --- a/include/vlc/libvlc_media_player.h +++ b/include/vlc/libvlc_media_player.h @@ -213,34 +213,69 @@ VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *p_mi ); VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *p_mi ); /** - * Set callbacks and private data to render decoded video to a custom area - * in memory. Use libvlc_video_set_format() to configure the decoded format. + * Callback prototype to allocate and lock a picture buffer. * * Whenever a new video frame needs to be decoded, the lock callback is * invoked. Depending on the video chroma, one or three pixel planes of * adequate dimensions must be returned via the second parameter. Those * planes must be aligned on 32-bytes boundaries. * - * When the video frame is decoded, the unlock callback is invoked. The - * second parameter to the callback corresponds is the return value of the - * lock callback. The third parameter conveys the pixel planes for convenience. + * \param opaque private pointer as passed to libvlc_video_set_callbacks() [IN] + * \param planes start address of the pixel planes (LibVLC allocates the array + * of void pointers, this callback must initialize the array) [OUT] + * \return a private pointer for the display and unlock callbacks to identify + * the picture buffers + */ +typedef void *(*libvlc_video_lock_cb)(void *opaque, void **planes); + +/** + * Callback prototype to unlock a picture buffer. + * + * When the video frame decoding is complete, the unlock callback is invoked. + * This callback might not be needed at all. It is only an indication that the + * application can now read the pixel values if it needs to. + * + * \warning A picture buffer is unlocked after the picture is decoded, + * but before the picture is displayed. + * + * \param opaque private pointer as passed to libvlc_video_set_callbacks() [IN] + * \param picture private pointer returned from the libvlc_video_lock_cb + *callback [IN] + * \param planes pixel planes as allocated by the libvlc_video_lock_cb callback + * (this parameter is provided for convenience only) [IN] + */ +typedef void (*libvlc_video_unlock_cb)(void *opaque, void *picture, + void *const *planes); + +/** + * Callback prototype to display a picture. * * When the video frame needs to be shown, as determined by the media playback - * clock, the display callback is invoked. The second parameter also conveys - * the return value from the lock callback. + * clock, the display callback is invoked. + * + * \param opaque private pointer as passed to libvlc_video_set_callbacks() [IN] + * \param picture private pointer returned from the libvlc_video_lock_cb + *callback [IN] + */ +typedef void (*libvlc_video_display_cb)(void *opaque, void *picture); + +/** + * Set callbacks and private data to render decoded video to a custom area + * in memory. Use libvlc_video_set_format() to configure the decoded format. * * \param mp the media player - * \param lock callback to allocate video memory - * \param unlock callback to release video memory + * \param lock callback to lock video memory + * \param unlock callback to unlock video memory + * \param display callback to display video * \param opaque private pointer for the three callbacks (as first parameter) * \version LibVLC 1.1.1 or later */ VLC_PUBLIC_API void libvlc_video_set_callbacks( libvlc_media_player_t *mp, -void *(*lock) (void *opaque, void **plane), -void (*unlock) (void *opaque, void *picture, void *const *plane), -void (*display) (void *opaque, void *picture), -void *opaque ); + libvlc_video_lock_cb lock, + libvlc_video_unlock_cb unlock, + libvlc_video_display_cb display, + void *opaque ); /** * Set decoded video chroma and dimensions. This only works in combination with ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Doxyfile: update to version 1.7.1 ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sat Nov 20 12:17:01 2010 +0200| [880d51137df3eb2255868a244c46bd28407da110] | committer: Rémi Denis-Courmont Doxyfile: update to version 1.7.1 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=880d51137df3eb2255868a244c46bd28407da110 --- doc/Doxyfile.in | 149 ++- 1 files changed, 114 insertions(+), 35 deletions(-) Diff: http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=880d51137df3eb2255868a244c46bd28407da110 ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt4: toURI shouldn't need toNativeSeparators() (Ilkka Ollakka )
vlc | branch: master | Ilkka Ollakka il...@videolan.org | Sat Nov 20 15:07:31 2010 +0200| [a23e59574c13ceadff503979f38fb464073d3279] | committer: Ilkka Ollakka Qt4: toURI shouldn't need toNativeSeparators() Seems like most likely cause to #4078 (reappeared near sametime as toURI was introduced). http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a23e59574c13ceadff503979f38fb464073d3279 --- modules/gui/qt4/util/qt_dirs.cpp |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/modules/gui/qt4/util/qt_dirs.cpp b/modules/gui/qt4/util/qt_dirs.cpp index 5656941..0041899 100644 --- a/modules/gui/qt4/util/qt_dirs.cpp +++ b/modules/gui/qt4/util/qt_dirs.cpp @@ -28,9 +28,7 @@ QString toURI( const QString s ) { -QString path = toNativeSeparators( s ); - -char *psz = make_URI( qtu(path), NULL ); +char *psz = make_URI( qtu(s), NULL ); if( psz == NULL ) return qfu(); ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: vmem: trivial code factorization ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sat Nov 20 15:01:01 2010 +0200| [32e2d5373c04052ecc427202e047185fc7cbe037] | committer: Rémi Denis-Courmont vmem: trivial code factorization http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32e2d5373c04052ecc427202e047185fc7cbe037 --- modules/video_output/vmem.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c index f1c3fb4..ea2528a 100644 --- a/modules/video_output/vmem.c +++ b/modules/video_output/vmem.c @@ -2,7 +2,7 @@ * vmem.c: memory video driver for vlc * * Copyright (C) 2008 the VideoLAN team - * $Id$ + * Copyrgiht (C) 2010 Rémi Denis-Courmont * * Authors: Sam Hocevar s...@zoy.org * @@ -141,10 +141,6 @@ static int Open(vlc_object_t *object) fmt.i_bmask = 0xf800; break; case VLC_CODEC_RGB24: -fmt.i_rmask = 0xff; -fmt.i_gmask = 0x00ff00; -fmt.i_bmask = 0xff; -break; case VLC_CODEC_RGB32: fmt.i_rmask = 0xff; fmt.i_gmask = 0x00ff00; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Use \deprecated explicitly for l_v_get_height and l_v_get_widget ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sat Nov 20 15:52:47 2010 +0200| [d51b0e0ee82ab06970d08921c6f35825bf9657b5] | committer: Rémi Denis-Courmont Use \deprecated explicitly for l_v_get_height and l_v_get_widget http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d51b0e0ee82ab06970d08921c6f35825bf9657b5 --- include/vlc/libvlc_media_player.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h index 9ff0cf9..205ffaf 100644 --- a/include/vlc/libvlc_media_player.h +++ b/include/vlc/libvlc_media_player.h @@ -699,7 +699,7 @@ int libvlc_video_get_size( libvlc_media_player_t *p_mi, unsigned num, /** * Get current video height. - * You should use libvlc_video_get_size() instead. + * \deprecated Use libvlc_video_get_size() instead. * * \param p_mi the media player * \return the video pixel height or 0 if not applicable @@ -709,7 +709,7 @@ int libvlc_video_get_height( libvlc_media_player_t *p_mi ); /** * Get current video width. - * You should use libvlc_video_get_size() instead. + * \deprecated Use libvlc_video_get_size() instead. * * \param p_mi the media player * \return the video pixel width or 0 if not applicable ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: package/ios: Improve build.sh. (Pierre d'Herbemont )
vlc | branch: master | Pierre d'Herbemont pdherbem...@free.fr | Sat Nov 20 19:13:45 2010 +0100| [93ee8f45b2b3e301e0eb254618553375b7f0b26d] | committer: Pierre d'Herbemont package/ios: Improve build.sh. Make sure the specified SDK exists, add a verbose mode, allow to change the default SDK. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93ee8f45b2b3e301e0eb254618553375b7f0b26d --- extras/package/ios/build.sh | 125 ++- 1 files changed, 100 insertions(+), 25 deletions(-) diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh index 05b4f3a..398242b 100755 --- a/extras/package/ios/build.sh +++ b/extras/package/ios/build.sh @@ -1,26 +1,99 @@ #!/bin/sh set -e -echo Building libvlc for the iOS +PLATFORM=OS +SDK=iphoneos3.2 +VERBOSE=no + +usage() +{ +cat EOF +usage: $0 [-s] [-k sdk] + +OPTIONS + -k Specify which sdk to use ('xcodebuild -showsdks', current: ${SDK}) + -s Build for simulator +EOF +} + +spushd() +{ +pushd $1 21 /dev/null +} + +spopd() +{ +popd 21 /dev/null +} + +info() +{ +local blue=\033[1;34m +local normal=\033[0m +echo [${blue}info${normal}] $1 +} + +while getopts hvsk: OPTION +do + case $OPTION in + h) + usage + exit 1 + ;; + v) + VERBOSE=yes + ;; + s) + PLATFORM=Simulator + SDK=iphonesimulator3.2 + ;; + k) + SDK=$OPTARG + ;; + ?) + usage + exit 1 + ;; + esac +done +shift $(($OPTIND - 1)) + +if [ x$1 != x ]; then +usage +exit 1 +fi + +out=/dev/null +if [ $VERBOSE = yes ]; then + out=/dev/stdout +fi -if [ $1 = Simulator ]; then -PLATFORM=Simulator +info Building libvlc for the iOS + +if [ $PLATFORM = Simulator ]; then TARGET=i686-apple-darwin10 ARCH=i386 else -PLATFORM=OS TARGET=arm-apple-darwin10 ARCH=armv7 OPTIM=-mno-thumb fi +# Test if SDK exists +xcodebuild -find gcc -sdk ${SDK} ${out} + +SDK_VERSION=`echo ${SDK} | sed -e 's/iphoneos//' -e 's/iphonesimulator//'` + +info Using ${ARCH} with SDK version ${SDK_VERSION} + THIS_SCRIPT_PATH=`pwd`/$0 -pushd `dirname $0`/../../.. /dev/null +spushd `dirname ${THIS_SCRIPT_PATH}`/../../.. VLCROOT=`pwd` # Let's make sure VLCROOT is an absolute path -popd /dev/null +spopd + DEVROOT=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer -IOS_SDK_ROOT=${DEVROOT}/SDKs/iPhone${PLATFORM}4.2.sdk +IOS_SDK_ROOT=${DEVROOT}/SDKs/iPhone${PLATFORM}${SDK_VERSION}.sdk BUILDDIR=${VLCROOT}/build-ios-${PLATFORM} @@ -55,8 +128,7 @@ fi export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:${VLCROOT}/extras/contrib/build/bin:${VLCROOT}/extras/package/ios/resources -echo Boostraping contribs -pushd ${VLCROOT}/extras/contrib /dev/null +spushd ${VLCROOT}/extras/contrib # contains gas-processor.pl export PATH=$PATH:${VLCROOT}/extras/package/ios/resources @@ -64,19 +136,20 @@ export PATH=$PATH:${VLCROOT}/extras/package/ios/resources # The contrib will read the following export IOS_SDK_ROOT -echo Building contrib for iOS +info Building contrib for iOS in '${VLCROOT}/contrib-builddir-ios-${TARGET}' + ./bootstrap -t ${TARGET} -d ios \ -b ${VLCROOT}/contrib-builddir-ios-${TARGET} \ - -i ${VLCROOT}/contrib-ios-${TARGET} -pushd ${VLCROOT}/contrib-builddir-ios-${TARGET} /dev/null -make src -popd /dev/null + -i ${VLCROOT}/contrib-ios-${TARGET} ${out} +spushd ${VLCROOT}/contrib-builddir-ios-${TARGET} +make src ${out} +spopd -echo Building contrib for current host -./bootstrap -make +info Building contrib for current host +./bootstrap ${out} +make ${out} -popd +spopd if [ $PLATFORM = OS ]; then export AS=${IOS_GAS_PREPROCESSOR} ${CC} @@ -87,9 +160,10 @@ else fi -echo Bootstraping vlc +info Bootstraping vlc + if ! [ -e ${VLCROOT}/configure ]; then -${VLCROOT}/bootstrap +${VLCROOT}/bootstrap ${out} fi if [ .$PLATFORM != .Simulator ]; then @@ -101,7 +175,7 @@ if [ .$PLATFORM != .Simulator ]; then fi mkdir -p ${BUILDDIR} -pushd ${BUILDDIR} +spushd ${BUILDDIR} # Run configure only upon changes. if [ ${VLCROOT}/configure -nt config.log -o \ @@ -144,14 +218,15 @@ ${VLCROOT}/configure \ --disable-lua \ --disable-sse \ --disable-neon \ ---disable-mmx # MMX and SSE support requires llvm which is broken on Simulator +--disable-mmx ${out} # MMX and SSE support requires llvm which is broken on Simulator fi CORE_COUNT=`sysctl -n machdep.cpu.core_count` let MAKE_JOBS=$CORE_COUNT+1 -echo Running make -j$MAKE_JOBS +info Building libvlc +make -j$MAKE_JOBS ${out} -make -j$MAKE_JOBS -make install +info Installing libvlc +make install ${out} popd ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt4: cosmetic + comment ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 21 13:30:38 2010 +0200| [6088b41ddc3a01d634e4b18fe95f468e12e4a864] | committer: Rémi Denis-Courmont Qt4: cosmetic + comment http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6088b41ddc3a01d634e4b18fe95f468e12e4a864 --- modules/gui/qt4/qt4.cpp |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 9e7519e..168670b 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -359,12 +359,14 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) } #endif -/* */ +/* Wait for the interface to be ready. This prevents the main + * LibVLC thread from starting video playback before we can create + * an embedded video window. */ vlc_sem_wait (ready); vlc_sem_destroy (ready); #ifndef Q_WS_MAC -if( !p_sys-b_isDialogProvider ) +if( !isDialogProvider ) { RegisterIntf( p_this ); } ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt4: do not crash if the video window is released after the interface ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 21 13:45:19 2010 +0200| [841eb240885cbea14245dfd832c9f1ab31d12bf4] | committer: Rémi Denis-Courmont Qt4: do not crash if the video window is released after the interface This should fix #3359. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=841eb240885cbea14245dfd832c9f1ab31d12bf4 --- modules/gui/qt4/main_interface.cpp | 10 -- modules/gui/qt4/qt4.cpp| 66 +++ 2 files changed, 50 insertions(+), 26 deletions(-) diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 5554aca..ddf568d 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -267,7 +267,8 @@ MainInterface::~MainInterface() if( stackCentralOldWidget == videoWidget ) showTab( bgWidget ); -releaseVideoSlot(); +if( videoWidget ) +releaseVideoSlot(); #ifdef WIN32 if( himl ) @@ -601,8 +602,11 @@ void MainInterface::releaseVideo( void ) /* Function that is CONNECTED to the previous emit */ void MainInterface::releaseVideoSlot( void ) { -if( videoWidget ) -videoWidget-release(); +/* This function is called when the embedded video window is destroyed, + * or in the rare case that the embedded window is still here but the + * Qt4 interface exits. */ +assert( videoWidget ); +videoWidget-release(); setVideoOnTop( false ); setVideoFullScreen( false ); diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 168670b..136995c 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -28,6 +28,7 @@ #include QApplication #include QDate +#include QMutex #include qt4.hpp @@ -271,11 +272,9 @@ static vlc_sem_t ready; #ifdef Q_WS_X11 static char *x11_display = NULL; #endif -static struct -{ -vlc_mutex_t lock; -bool busy; -} one = { VLC_STATIC_MUTEX, false }; +static QMutex lock; +static bool busy = false; +static bool active = false; /* * Module callbacks @@ -321,11 +320,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) char *display = NULL; #endif -bool busy; -vlc_mutex_lock (one.lock); -busy = one.busy; -one.busy = true; -vlc_mutex_unlock (one.lock); +QMutexLocker locker (lock); if (busy) { msg_Err (p_this, cannot start Qt4 multiple times); @@ -352,9 +347,6 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) { delete p_sys; free (display); -vlc_mutex_lock (one.lock); -one.busy = false; -vlc_mutex_unlock (one.lock); return VLC_ENOMEM; } #endif @@ -364,6 +356,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) * an embedded video window. */ vlc_sem_wait (ready); vlc_sem_destroy (ready); +busy = active = true; #ifndef Q_WS_MAC if( !isDialogProvider ) @@ -416,8 +409,9 @@ static void Close( vlc_object_t *p_this ) #endif delete p_sys; -vlc_mutex_locker locker (one.lock); -one.busy = false; +QMutexLocker locker (lock); +assert (busy); +busy = false; } static void *Thread( void *obj ) @@ -487,15 +481,17 @@ static void *Thread( void *obj ) /* Create the normal interface in non-DP mode */ if( !p_intf-p_sys-b_isDialogProvider ) +{ p_mi = new MainInterface( p_intf ); +p_intf-p_sys-p_mi = p_mi; +} else p_mi = NULL; -p_intf-p_sys-p_mi = p_mi; /* Explain how to show a dialog :D */ p_intf-pf_show_dialog = ShowDialog; -/* */ +/* Tell the main LibVLC thread we are ready */ vlc_sem_post (ready); #ifdef Q_WS_MAC @@ -525,9 +521,8 @@ static void *Thread( void *obj ) msg_Dbg( p_intf, QApp exec() finished ); if (p_mi != NULL) { -#warning BUG! -/* FIXME: the video window may still be registerd at this point */ -/* See LP#448082 as an example. */ +QMutexLocker locker (lock); +active = false; p_intf-p_sys-p_mi = NULL; /* Destroy first the main interface because it is connected to some @@ -602,6 +597,10 @@ static int WindowOpen( vlc_object_t *p_obj ) return VLC_EGENERIC; } +QMutexLocker locker (lock); +if (unlikely(!active)) +return VLC_EGENERIC; + MainInterface *p_mi = p_intf-p_sys-p_mi; msg_Dbg( p_obj, requesting video... ); @@ -637,6 +636,13 @@ static int WindowOpen( vlc_object_t *p_obj ) static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args ) { MainInterface *p_mi = (MainInterface *)p_wnd-sys; +QMutexLocker locker (lock); + +if (unlikely(!active)) +{ +msg_Warn (p_wnd, video already released before control); +return VLC_EGENERIC; +} return p_mi-controlVideo( i_query, args ); } @@ -644,8 +650,22
[vlc-commits] commit: Qt4: do not crash if the video window is released after the interface ( Rémi Denis-Courmont )
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 21 14:08:14 2010 +0200| [269b9f1bc1a31d5cc7f709f3398a6686cbb7bd45] | committer: Rémi Denis-Courmont Qt4: do not crash if the video window is released after the interface This should fix #3359. (cherry picked from commit 841eb240885cbea14245dfd832c9f1ab31d12bf4) Conflicts: modules/gui/qt4/main_interface.cpp modules/gui/qt4/qt4.cpp http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=269b9f1bc1a31d5cc7f709f3398a6686cbb7bd45 --- modules/gui/qt4/main_interface.cpp | 11 -- modules/gui/qt4/qt4.cpp| 68 +++- 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 1bd3e63..a3ad197 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -264,7 +264,9 @@ MainInterface::~MainInterface() if( stackCentralOldWidget == videoWidget ) showTab( bgWidget ); -releaseVideoSlot(); +if( videoWidget ) +releaseVideoSlot(); + #ifdef WIN32 if( himl ) ImageList_Destroy( himl ); @@ -586,8 +588,11 @@ void MainInterface::releaseVideo( void ) /* Function that is CONNECTED to the previous emit */ void MainInterface::releaseVideoSlot( void ) { -if( videoWidget ) -videoWidget-release(); +/* This function is called when the embedded video window is destroyed, + * or in the rare case that the embedded window is still here but the + * Qt4 interface exits. */ +assert( videoWidget ); +videoWidget-release(); setVideoOnTop( false ); setVideoFullScreen( false ); diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 5ed7682..98d8aa6 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -28,6 +28,7 @@ #include QApplication #include QDate +#include QMutex #include qt4.hpp @@ -267,11 +268,9 @@ static vlc_sem_t ready; #ifdef Q_WS_X11 static char *x11_display = NULL; #endif -static struct -{ -vlc_mutex_t lock; -bool busy; -} one = { VLC_STATIC_MUTEX, false }; +static QMutex lock; +static bool busy = false; +static bool active = false; /* * Module callbacks @@ -299,11 +298,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) char *display = NULL; #endif -bool busy; -vlc_mutex_lock (one.lock); -busy = one.busy; -one.busy = true; -vlc_mutex_unlock (one.lock); +QMutexLocker locker (lock); if (busy) { msg_Err (p_this, cannot start Qt4 multiple times); @@ -326,15 +321,13 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) { delete p_sys; free (display); -vlc_mutex_lock (one.lock); -one.busy = false; -vlc_mutex_unlock (one.lock); return VLC_ENOMEM; } /* */ vlc_sem_wait (ready); vlc_sem_destroy (ready); +busy = active = true; if( !p_sys-b_isDialogProvider ) { @@ -379,9 +372,10 @@ static void Close( vlc_object_t *p_this ) x11_display = NULL; #endif delete p_sys; -vlc_mutex_lock (one.lock); -one.busy = false; -vlc_mutex_unlock (one.lock); + +QMutexLocker locker (lock); +assert (busy); +busy = false; } static void *Thread( void *obj ) @@ -449,15 +443,17 @@ static void *Thread( void *obj ) /* Create the normal interface in non-DP mode */ if( !p_intf-p_sys-b_isDialogProvider ) +{ p_mi = new MainInterface( p_intf ); +p_intf-p_sys-p_mi = p_mi; +} else p_mi = NULL; -p_intf-p_sys-p_mi = p_mi; /* Explain how to show a dialog :D */ p_intf-pf_show_dialog = ShowDialog; -/* */ +/* Tell the main LibVLC thread we are ready */ vlc_sem_post (ready); /* Last settings */ @@ -478,9 +474,8 @@ static void *Thread( void *obj ) msg_Dbg( p_intf, Exec finished() ); if (p_mi != NULL) { -#warning BUG! -/* FIXME: the video window may still be registerd at this point */ -/* See LP#448082 as an example. */ +QMutexLocker locker (lock); +active = false; p_intf-p_sys-p_mi = NULL; /* Destroy first the main interface because it is connected to some @@ -555,6 +550,10 @@ static int WindowOpen( vlc_object_t *p_obj ) return VLC_EGENERIC; } +QMutexLocker locker (lock); +if (unlikely(!active)) +return VLC_EGENERIC; + MainInterface *p_mi = p_intf-p_sys-p_mi; msg_Dbg( p_obj, requesting video... ); @@ -585,6 +584,13 @@ static int WindowOpen( vlc_object_t *p_obj ) static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args ) { MainInterface *p_mi = (MainInterface *)p_wnd-sys; +QMutexLocker locker (lock); + +if (unlikely(!active)) +{ +msg_Warn (p_wnd
[vlc-commits] commit: vmem: set the video format via callback ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 21 15:50:10 2010 +0200| [0e4caf6d4a776bd62ac1ff7bee3838ec51f281bb] | committer: Rémi Denis-Courmont vmem: set the video format via callback http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0e4caf6d4a776bd62ac1ff7bee3838ec51f281bb --- modules/video_output/vmem.c | 189 --- 1 files changed, 122 insertions(+), 67 deletions(-) diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c index ea2528a..06ed182 100644 --- a/modules/video_output/vmem.c +++ b/modules/video_output/vmem.c @@ -86,14 +86,24 @@ struct picture_sys_t { void *id; }; +/* NOTE: the callback prototypes must match those of LibVLC */ struct vout_display_sys_t { picture_pool_t *pool; +unsignedcount; + +void *opaque; void *(*lock)(void *sys, void **plane); void (*unlock)(void *sys, void *id, void *const *plane); void (*display)(void *sys, void *id); -void *opaque; +void (*cleanup)(void *sys); + +unsigned pitches[PICTURE_PLANE_MAX]; +unsigned lines[PICTURE_PLANE_MAX]; }; +typedef unsigned (*vlc_format_cb)(void **, char *, unsigned *, unsigned *, + unsigned *, unsigned *); + static picture_pool_t *Pool (vout_display_t *, unsigned); static void Display(vout_display_t *, picture_t *); static intControl(vout_display_t *, int, va_list); @@ -110,25 +120,71 @@ static void Unlock(picture_t *); static int Open(vlc_object_t *object) { vout_display_t *vd = (vout_display_t *)object; +vout_display_sys_t *sys = malloc(sizeof(*sys)); +if (unlikely(!sys)) +return VLC_ENOMEM; -/* */ -char *chroma_format = var_InheritString(vd, vmem-chroma); -const vlc_fourcc_t chroma = vlc_fourcc_GetCodecFromString(VIDEO_ES, chroma_format); -free(chroma_format); -if (!chroma) { -msg_Err(vd, vmem-chroma should be 4 characters long); +/* Get the callbacks */ +vlc_format_cb setup = var_InheritAddress(vd, vmem-setup); + +sys-lock = var_InheritAddress(vd, vmem-lock); +if (sys-lock == NULL) { +msg_Err(vd, missing lock callback); +free(sys); return VLC_EGENERIC; } +sys-unlock = var_InheritAddress(vd, vmem-unlock); +sys-display = var_InheritAddress(vd, vmem-display); +sys-cleanup = var_InheritAddress(vd, vmem-cleanup); +sys-opaque = var_InheritAddress(vd, vmem-data); +sys-pool = NULL; -/* */ +/* Define the video format */ video_format_t fmt = vd-fmt; -fmt.i_chroma = chroma; -fmt.i_width = var_InheritInteger(vd, vmem-width); -fmt.i_height = var_InheritInteger(vd, vmem-height); +if (setup != NULL) { +char chroma[5]; + +memcpy(chroma, fmt.i_chroma, 4); +chroma[4] = '\0'; +memset(sys-pitches, 0, sizeof(sys-pitches)); +memset(sys-lines, 0, sizeof(sys-lines)); + +sys-count = setup(sys-opaque, chroma, fmt.i_width, fmt.i_height, + sys-pitches, sys-lines); +if (sys-count == 0) { +msg_Err(vd, video format setup failure (no pictures)); +free(sys); +return VLC_EGENERIC; +} +fmt.i_chroma = vlc_fourcc_GetCodecFromString(VIDEO_ES, chroma); + +} else { +char *chroma = var_InheritString(vd, vmem-chroma); +fmt.i_chroma = vlc_fourcc_GetCodecFromString(VIDEO_ES, chroma); +free(chroma); + +fmt.i_width = var_InheritInteger(vd, vmem-width); +fmt.i_height = var_InheritInteger(vd, vmem-height); +sys-pitches[0] = var_InheritInteger(vd, vmem-pitch); +sys-lines[0] = fmt.i_height; +for (size_t i = 1; i PICTURE_PLANE_MAX; i++) +{ +sys-pitches[i] = sys-pitches[0]; +sys-lines[i] = sys-lines[0]; +} +sys-count = 1; +sys-cleanup = NULL; +} + +if (!fmt.i_chroma) { +msg_Err(vd, vmem-chroma should be 4 characters long); +free(sys); +return VLC_EGENERIC; +} /* Define the bitmasks */ -switch (chroma) +switch (fmt.i_chroma) { case VLC_CODEC_RGB15: fmt.i_rmask = 0x001f; @@ -154,63 +210,11 @@ static int Open(vlc_object_t *object) } /* */ -vout_display_sys_t *sys; -vd-sys = sys = calloc(1, sizeof(*sys)); -if (unlikely(!sys)) -return VLC_ENOMEM; - -sys-lock = var_InheritAddress(vd, vmem-lock); -if (sys-lock == NULL) { -msg_Err(vd, Invalid lock callback); -free(sys); -return VLC_EGENERIC; -} -sys-unlock = var_InheritAddress(vd, vmem-unlock); -sys-display = var_InheritAddress(vd, vmem-display); -sys-opaque = var_InheritAddress(vd, vmem-data); - -/* */ -const int pitch = var_InheritInteger(vd, vmem-pitch); -picture_resource_t rsc; -rsc.p_sys = malloc(sizeof(*rsc.p_sys)); -if(unlikely(!rsc.p_sys
[vlc-commits] commit: libvlc_set_format_callbacks: dynamic video format selection ( Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 21 15:54:13 2010 +0200| [55d09264802ef94593806a206e36fb8b4b8a6977] | committer: Rémi Denis-Courmont libvlc_set_format_callbacks: dynamic video format selection LibVLC applications can now select their video memory format when the video output is created. In particular, this allows preservation of the original pixel dimensions. While untested, this should also enable planar YCbCr rendering. Until this, vmem assumed that all planes had equal pitches, so that subsampled planes would not really work. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55d09264802ef94593806a206e36fb8b4b8a6977 --- include/vlc/libvlc_media_player.h | 68 ++-- src/control/media_player.c| 10 + 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h index 205ffaf..8ac784a 100644 --- a/include/vlc/libvlc_media_player.h +++ b/include/vlc/libvlc_media_player.h @@ -260,8 +260,50 @@ typedef void (*libvlc_video_unlock_cb)(void *opaque, void *picture, typedef void (*libvlc_video_display_cb)(void *opaque, void *picture); /** + * Callback prototype to configure picture buffers format. + * This callback gets the format of the video as output by the video decoder + * and the chain of video filters (if any). It can opt to change any parameter + * as it needs. In that case, LibVLC will attempt to convert the video format + * (rescaling and chroma conversion) but these operations can be CPU intensive. + * + * \param opaque pointer to the private pointer passed to + * libvlc_video_set_callbacks() [IN/OUT] + * \param chroma pointer to the 4 bytes video format identifier [IN/OUT] + * \param width pointer to the pixel width [IN/OUT] + * \param height pointer to the pixel height [IN/OUT] + * \param pitches table of scanline pitches in bytes for each pixel plane + *(the table is allocated by LibVLC) [OUT] + * \param lines table of scanlines count for each plane [OUT] + * \return the number of picture buffers allocated, 0 indicates failure + * + * \note + * For each pixels plane, the scanline pitch must be bigger than or equal to + * the number of bytes per pixel multiplied by the pixel width. + * Similarly, the number of scanlines must be bigger than of equal to + * the pixel height. + * Furthermore, we recommend that pitches and lines be multiple of 32 + * to not break assumption that might be made by various optimizations + * in the video decoders, video filters and/or video converters. + */ +typedef unsigned (*libvlc_video_format_cb)(void **opaque, char *chroma, + unsigned *width, unsigned *height, + unsigned *pitches, + unsigned *lines); + +/** + * Callback prototype to configure picture buffers format. + * + * \param opaque private pointer as passed to libvlc_video_set_callbacks() + * (and possibly modified by @ref libvlc_video_format_cb) [IN] + */ +typedef void (*libvlc_video_cleanup_cb)(void *opaque); + + +/** * Set callbacks and private data to render decoded video to a custom area - * in memory. Use libvlc_video_set_format() to configure the decoded format. + * in memory. + * Use libvlc_video_set_format() or libvlc_video_set_format_callbacks() + * to configure the decoded format. * * \param mp the media player * \param lock callback to lock video memory (must not be NULL) @@ -278,16 +320,20 @@ void libvlc_video_set_callbacks( libvlc_media_player_t *mp, void *opaque ); /** - * Set decoded video chroma and dimensions. This only works in combination with - * libvlc_video_set_callbacks(). + * Set decoded video chroma and dimensions. + * This only works in combination with libvlc_video_set_callbacks(), + * and is mutually exclusive with libvlc_video_set_format_callbacks(). * * \param mp the media player * \param chroma a four-characters string identifying the chroma - * (e.g. RV32 or I420) + * (e.g. RV32 or YUYV) * \param width pixel width * \param height pixel height * \param pitch line pitch (in bytes) * \version LibVLC 1.1.1 or later + * \bug All pixel planes are expected to have the same pitch. + * To use the YCbCr color space with chrominance subsampling, + * consider using libvlc_video_set_format_callback() instead. */ VLC_PUBLIC_API void libvlc_video_set_format( libvlc_media_player_t *mp, const char *chroma, @@ -295,6 +341,20 @@ void libvlc_video_set_format( libvlc_media_player_t *mp, const char *chroma, unsigned pitch ); /** + * Set decoded video chroma and dimensions. This only works in combination with + * libvlc_video_set_callbacks(). + * + * \param mp the media player + * \param setup callback to select the video format (cannot
[vlc-commits] commit: Eliminate dead code (Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 21 18:06:58 2010 +0200| [ebb7f49b030c1734de79047da741c8ee28b929d9] | committer: Rémi Denis-Courmont Eliminate dead code http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ebb7f49b030c1734de79047da741c8ee28b929d9 --- modules/gui/qt4/util/qvlcapp.hpp |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/modules/gui/qt4/util/qvlcapp.hpp b/modules/gui/qt4/util/qvlcapp.hpp index bfd8a90..ac2aae4 100644 --- a/modules/gui/qt4/util/qvlcapp.hpp +++ b/modules/gui/qt4/util/qvlcapp.hpp @@ -53,17 +53,8 @@ public: emit app-quitSignal(); } -#if defined (Q_WS_X11) - QVLCApp( Display *dp, int argc, char ** argv ) - : QApplication( dp, argc, argv ) - { -connect( this, SIGNAL(quitSignal()), this, SLOT(quit()) ); - } -#endif - signals: void quitSignal(); }; - #endif ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt4: cosmetic fixes (Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 21 18:00:38 2010 +0200| [9a0e0822d0c8739e4a984ea5df6b6eb6338d65b6] | committer: Rémi Denis-Courmont Qt4: cosmetic fixes http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a0e0822d0c8739e4a984ea5df6b6eb6338d65b6 --- modules/gui/qt4/util/qvlcapp.hpp |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/gui/qt4/util/qvlcapp.hpp b/modules/gui/qt4/util/qvlcapp.hpp index ac2aae4..c9de99a 100644 --- a/modules/gui/qt4/util/qvlcapp.hpp +++ b/modules/gui/qt4/util/qvlcapp.hpp @@ -48,9 +48,9 @@ public: static void triggerQuit() { - QVLCApp *app = qobject_castQVLCApp*( instance() ); - if ( app ) - emit app-quitSignal(); +QVLCApp *app = qobject_castQVLCApp*( instance() ); +if( app ) +emit app-quitSignal(); } signals: ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Qt4: fix crash regression in 1.1.5 closeAllWindows() not thread-safe (Rémi Denis-Courmont )
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 21 18:08:06 2010 +0200| [1c9669ac53e83beadcd112f909b239a9645b031c] | committer: Rémi Denis-Courmont Qt4: fix crash regression in 1.1.5 closeAllWindows() not thread-safe All UI related operations in Qt4 must be done on the UI thread, as QtGui is not thread-safe internally. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c9669ac53e83beadcd112f909b239a9645b031c --- modules/gui/qt4/qt4.cpp |8 ++-- modules/gui/qt4/util/qvlcapp.hpp |9 - 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 136995c..3f3beec 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -392,14 +392,10 @@ static void Close( vlc_object_t *p_this ) } /* And quit */ -msg_Dbg( p_intf, Please die, die, die... ); -QApplication::closeAllWindows(); - -//QApplication::quit(); - +msg_Dbg( p_this, requesting exit... ); QVLCApp::triggerQuit(); -msg_Dbg( p_intf, Please die, die, die 2... ); +msg_Dbg( p_this, waiting for UI thread... ); #ifndef Q_WS_MAC vlc_join (p_sys-thread, NULL); #endif diff --git a/modules/gui/qt4/util/qvlcapp.hpp b/modules/gui/qt4/util/qvlcapp.hpp index c9de99a..66fa024 100644 --- a/modules/gui/qt4/util/qvlcapp.hpp +++ b/modules/gui/qt4/util/qvlcapp.hpp @@ -40,10 +40,17 @@ class QVLCApp : public QApplication { Q_OBJECT +private slots: +void doQuit() +{ +closeAllWindows(); +quit(); +} + public: QVLCApp( int argc, char ** argv ) : QApplication( argc, argv, true ) { -connect( this, SIGNAL(quitSignal()), this, SLOT(quit()) ); +connect( this, SIGNAL(quitSignal()), this, SLOT(doQuit()) ); } static void triggerQuit() ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Disable screensaver preemption before destroying the module ( Rémi Denis-Courmont )
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont r...@remlab.net | Sun Nov 21 19:12:32 2010 +0200| [577e2a2b2df314ad60957773ef3a36530d0de30e] | committer: Rémi Denis-Courmont Disable screensaver preemption before destroying the module (cherry picked from commit 79bb2f751a8a4a90d56d728828a82a462298bce7) http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=577e2a2b2df314ad60957773ef3a36530d0de30e --- src/video_output/window.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/video_output/window.c b/src/video_output/window.c index a8ef797..0350caf 100644 --- a/src/video_output/window.c +++ b/src/video_output/window.c @@ -99,7 +99,10 @@ void vout_window_Delete(vout_window_t *window) window_t *w = (window_t *)window; if (w-inhibit) +{ +vlc_inhibit_Set (w-inhibit, false); vlc_inhibit_Destroy (w-inhibit); +} module_unneed(window, w-module); ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] commit: Contribs: Win32 targets reordering, based on types ( Jean-Baptiste Kempf )
vlc | branch: master | Jean-Baptiste Kempf j...@videolan.org | Sun Nov 21 17:01:42 2010 +0100| [8178340c39a53d7737f25f14ad9f965010142ead] | committer: Jean-Baptiste Kempf Contribs: Win32 targets reordering, based on types http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8178340c39a53d7737f25f14ad9f965010142ead --- extras/contrib/src/Distributions/win32.mak | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extras/contrib/src/Distributions/win32.mak b/extras/contrib/src/Distributions/win32.mak index cea543d..08ab5c8 100644 --- a/extras/contrib/src/Distributions/win32.mak +++ b/extras/contrib/src/Distributions/win32.mak @@ -1,12 +1,12 @@ # WIN32 rules all: .iconv .intl .freetype .fribidi .zlib \ +.gpg-error .gcrypt .gnutls .pthreads .xml .fontconfig \ .a52 .mpeg2 .mad .ogg .vorbis .shout .vorbisenc .theora \ -.flac .speex .faad .lame .ebml .matroska .ffmpeg .dvdcss \ -.live .pthreads .goom2k4 .caca .mod .x264 .xml .twolame \ -.png .gpg-error .gcrypt .gnutls .mpcdec .dirac .schroedinger \ -.dvdnav .dvbpsi .qt4_win32 .schroedinger .SDL_image \ -.libbluray .libupnp \ -.dx_headers .dshow_headers .gecko .dca \ -.lua .tag .fontconfig .portaudio .kate .libass .zvbi \ -.fluid .peflags .cddb .sqlite3 .libprojectM +.flac .speex .faad .lame .ebml .matroska .ffmpeg \ +.live .goom2k4 .caca .mod .x264 .twolame \ +.png .mpcdec .dirac .schroedinger .dvbpsi \ +.dca .kate .libass .zvbi .fluid .SDL_image \ +.libbluray .dvdcss .libupnp .dvdnav .qt4_win32 \ +.dx_headers .dshow_headers .portaudio .gecko \ +.lua .tag .peflags .cddb .sqlite3 .libprojectM # .daap .cdio .vcdimager ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits