[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