Commit 1b8f3561 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

backport:...

backport: [15701],[15702],[15704],[15705],[15707]-[15711],[15733],[15734],[15736],[15741],[15744],[15745],[15753]-[15757],[15762],[15763],[15767],[15774]-[15778],[15781]-[15783],[15785]-[15787],[15790],[15791]

skipped: RTE code and BeOS fixes (if someone could look at [15735] and commit that which does not concern the new playlist, i would be thankful.) 
parent bdae28b6
......@@ -132,7 +132,7 @@ along those lines:
--with-wx-config-path=/usr/win32/bin \
--with-freetype-config-path=/usr/win32/bin \
--with-fribidi-config-path=/usr/win32/bin \
--enable-livedotcom --with-livedotcom-tree=/usr/win32/live.com \
--enable-live555 --with-live555-tree=/usr/win32/live.com \
--enable-caca --with-caca-config-path=/usr/win32/bin \
--with-xml2-config-path=/usr/win32/bin \
--with-dvdnav-config-path=/usr/win32/bin \
......@@ -158,7 +158,7 @@ emulation layer, use something like this:
--with-wx-config-path=/usr/win32/bin \
--with-freetype-config-path=/usr/win32/bin \
--with-fribidi-config-path=/usr/win32/bin \
--enable-livedotcom --with-livedotcom-tree=/usr/win32/live.com \
--enable-live555 --with-live555-tree=/usr/win32/live.com \
--enable-caca --with-caca-config-path=/usr/win32/bin \
--with-xml2-config-path=/usr/win32/bin \
--with-dvdnav-config-path=/usr/win32/bin \
......@@ -200,7 +200,7 @@ the CFLAGS, LDFLAGS and --with-foo-config-path=.
--enable-ffmpeg --enable-faad --enable-flac --enable-theora \
--disable-cddax --disable-vcdx --enable-goom \
--enable-twolame --enable-dvdread \
--enable-mkv --enable-caca \
--enable-mkv --enable-caca --enable-live555\
--enable-debug
......
......@@ -345,6 +345,8 @@ VLC-release.app: vlc
mkdir -p $(top_builddir)/tmp/modules/audio_output
mkdir -p $(top_builddir)/tmp/modules/gui/macosx
for i in \
AppleRemote.h \
AppleRemote.m \
about.h \
about.m \
applescript.h \
......@@ -481,6 +483,8 @@ VLC.app: vlc
mkdir -p $(top_builddir)/tmp/modules/audio_output
mkdir -p $(top_builddir)/tmp/modules/gui/macosx
for i in \
AppleRemote.h \
AppleRemote.m \
about.h \
about.m \
applescript.h \
......
......@@ -48,6 +48,7 @@ Daniel Nylander <info@danielnylander at se> - Swedish translation
David Weber <david_weber at gmx.de> - Mac OS X interface design & graphics (v0.5.0)
Davor Orel <syntheticamac at yahoo.it> - Mac OS X icons
Dennis van Amerongen <Dennis dot vanAmerongen at nob dot nl> - x264 options unification
Diego Petteno <flameeyes at gentoo dot org> - remove usage of internal ffmpeg symbols
DirektX <direktx at freemail.hu> - Hungarian translation
Emmanuel Blindauer <manu at agat.net> - aRts audio output
Enrico Gueli <e_gueli at yahoo.it> - Brightness threshold in adjust video filter
......@@ -131,6 +132,7 @@ Valek Filippov <frob at df.ru> - Russian translation
Vicente Jimenez Aguilar <vice at v1ce.net> - Spanish translation
Vincent van den Heuvel <heuvel@mac.com> - OSX about window artwork (v0.8.4)
Vitalijus Slavinskas <Vitalijus.Slavinskas at stud.ktu dot lt> - nsv patches
Vitaly V. Bursov <vitalyvb at ukr dot net>
Vladimir Chernyshov - MMX motion optimizations
Wade Majors <guru at startrek.com> - BeOS icon integration, debugging and fixes
Wallace Wadge <wwadge at gmail.com> - multiple programs TS mux
......
......@@ -51,41 +51,34 @@ if test -d extras/contrib/bin; then
fi
# Check for automake
amvers="none"
if automake-1.9 --version >/dev/null 2>&1; then
amvers="-1.9"
elif automake-1.8 --version >/dev/null 2>&1; then
amvers="-1.8"
elif automake-1.7 --version >/dev/null 2>&1; then
amvers="-1.7"
elif automake-1.6 --version >/dev/null 2>&1; then
amvers="-1.6"
if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" "<=" "1.6.1" > /dev/null 2>&1; then
AUTOMAKESUCKS=yes
amvers="no"
for v in "-1.9" "19" "-1.8" "18" "-1.7" "17" "-1.6" "16" "-1.5" "15"; do
if automake${v} --version >/dev/null 2>&1; then
amsuff="${v}"
amvers="${v}"
break
fi
elif automake-1.5 --version >/dev/null 2>&1; then
INSTALLSUCKS=yes
amvers="-1.5"
elif automake --version > /dev/null 2>&1; then
amvers=""
case "`automake --version | sed -e '1s/[^0-9]*//' -e q`" in
0|0.*|1|1.[01234]|1.[01234][-.]*)
amvers="none" ;;
1.5|1.5.*)
INSTALLSUCKS=yes ;;
1.6|1.6.0|1.6.1)
AUTOMAKESUCKS=yes ;;
1.9|1.9.2)
;;
esac
fi
done
if test "${amvers}" = "none"; then
set +x
echo "$0: you need automake version 1.5 or later"
exit 1
if test "${amvers}" = "no" && automake --version > /dev/null 2>&1; then
amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
amsuff=""
fi
case "${amvers}" in
-1.6|16|1.6|1.6.0*|1.6.1*)
AUTOMAKESUCKS=yes
;;
-1.5|15|1.5|1.5.*)
INSTALLSUCKS=yes
;;
no|1.[01234]|1.[01234].*|1[01234])
set +x
echo "$0: you need automake version 1.5 or later"
exit 1
;;
esac
# Check for libtool
libtoolize="no"
if glibtoolize --version >/dev/null 2>&1; then
......
......@@ -121,8 +121,8 @@ dnl kludge because only the debian package provides a ffmpeg-config
if test -z $with_ffmpeg_config_path; then
with_ffmpeg_config_path=${topdir}/extras/contrib/bin;
fi
if test -z $with_livedotcom_tree; then
with_livedotcom_tree=${topdir}/extras/contrib/src/live
if test -z $with_live555_tree; then
with_live555_tree=${topdir}/extras/contrib/src/live
fi
if test -z $with_goom_tree; then
with_goom_tree=${topdir}/extras/contrib/src/goom
......@@ -1476,79 +1476,94 @@ dnl
AC_ARG_WITH(,[Input plugins:])
dnl live.com input
dnl live555 input
dnl
AC_ARG_ENABLE(livedotcom,
[ --enable-livedotcom live.com RTSP input plugin (default disabled)])
if test "${enable_livedotcom}" = "yes"; then
AC_ARG_WITH(livedotcom-tree,
[ --with-livedotcom-tree=PATH live.com tree for static linking])
if test "${enable_livedotcom}"
then
AC_MSG_WARN(--{en|dis}able-livedotcom is deprecated. Use --{en|dis}able-live555 instead.)
fi
if test "${enable_livedotcom}" = "yes"
then
enable_live555="yes"
fi
AC_ARG_ENABLE(live555,
[ --enable-live555 live555 RTSP input plugin (default disabled)])
if test "${enable_live555}" = "yes"; then
AC_ARG_WITH(live555-tree,
[ --with-live555-tree=PATH live.com tree for static linking])
dnl
dnl test for --with-livedotcom-tree
dnl test for --with-live555-tree
dnl
if test -z "${with_livedotcom_tree}" -a "${CXX}" != ""; then
if test "${with_livedotcom_tree}"
then
AC_MSG_WARN(--with-livedotcom-tree is deprecated. Use --with-live555-tree instead.)
with_live555_tree="${with_livedotcom_tree}"
fi
if test -z "${with_live555_tree}" -a "${CXX}" != ""; then
AC_LANG_PUSH(C++)
CPPFLAGS_save="${CPPFLAGS}"
CPPFLAGS_livedotcom="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
if test "${SYS}" = "solaris"; then
CPPFLAGS_livedotcom="${CPPFLAGS_livedotcom} -DSOLARIS"
CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
fi
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_livedotcom}"
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
AC_CHECK_HEADERS(liveMedia.hh, [
VLC_ADD_CXXFLAGS([livedotcom], [${CPPFLAGS_livedotcom}])
VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
AC_CHECK_LIB(liveMedia_pic, main, [
# We have -lliveMedia_pic, build plugins
VLC_ADD_PLUGINS([livedotcom])
VLC_ADD_LDFLAGS([livedotcom], [-lliveMedia_pic -lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic])
VLC_ADD_PLUGINS([live555])
VLC_ADD_LDFLAGS([live555], [-lliveMedia_pic -lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic])
], [
AC_CHECK_LIB(liveMedia, main, [
# We only have -lliveMedia, do builtins
VLC_ADD_BUILTINS([livedotcom])
VLC_ADD_LDFLAGS([livedotcom], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
VLC_ADD_BUILTINS([live555])
VLC_ADD_LDFLAGS([live555], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
])
])
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
VLC_ADD_LDFLAGS([livedotcom],[-lws2_32])
VLC_ADD_LDFLAGS([live555],[-lws2_32])
fi
])
CPPFLAGS="${CPPFLAGS_save}"
AC_LANG_POP(C++)
else
AC_MSG_CHECKING(for liveMedia/libliveMedia.a in ${with_livedotcom_tree})
real_livedotcom_tree="`cd ${with_livedotcom_tree} 2>/dev/null && pwd`"
if test -z "${real_livedotcom_tree}"; then
AC_MSG_CHECKING(for liveMedia/libliveMedia.a in ${with_live555_tree})
real_live555_tree="`cd ${with_live555_tree} 2>/dev/null && pwd`"
if test -z "${real_live555_tree}"; then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_livedotcom_tree}])
AC_MSG_ERROR([cannot cd to ${with_live555_tree}])
fi
if test -f "${real_livedotcom_tree}/liveMedia/libliveMedia.a"; then
AC_MSG_RESULT(${real_livedotcom_tree}/liveMedia/libliveMedia.a)
if test -f "${real_live555_tree}/liveMedia/libliveMedia.a"; then
AC_MSG_RESULT(${real_live555_tree}/liveMedia/libliveMedia.a)
VLC_ADD_BUILTINS([livedotcom])
VLC_ADD_BUILTINS([live555])
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
VLC_ADD_LDFLAGS([livedotcom],[-lws2_32])
VLC_ADD_LDFLAGS([live555],[-lws2_32])
fi
VLC_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/liveMedia -lliveMedia])
VLC_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/BasicUsageEnvironment -lBasicUsageEnvironment])
VLC_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/groupsock -lgroupsock])
VLC_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/UsageEnvironment -lUsageEnvironment])
VLC_ADD_LDFLAGS([live555],[-L${real_live555_tree}/liveMedia -lliveMedia])
VLC_ADD_LDFLAGS([live555],[-L${real_live555_tree}/BasicUsageEnvironment -lBasicUsageEnvironment])
VLC_ADD_LDFLAGS([live555],[-L${real_live555_tree}/groupsock -lgroupsock])
VLC_ADD_LDFLAGS([live555],[-L${real_live555_tree}/UsageEnvironment -lUsageEnvironment])
VLC_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/BasicUsageEnvironment/include])
VLC_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/groupsock/include])
VLC_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/liveMedia/include])
VLC_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/UsageEnvironment/include ])
VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/BasicUsageEnvironment/include])
VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/groupsock/include])
VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/liveMedia/include])
VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/UsageEnvironment/include ])
if test "${SYS}" = "solaris"; then
VLC_ADD_CXXFLAGS([livedotcom],[-DSOLARIS])
VLC_ADD_CXXFLAGS([live555],[-DSOLARIS])
fi
else
dnl The given live.com wasn't built
dnl The given live555 wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_livedotcom_tree}/liveMedia/libliveMedia.a, make sure you compiled live.com in ${with_livedotcom_tree}])
AC_MSG_ERROR([cannot find ${real_live555_tree}/liveMedia/libliveMedia.a, make sure you compiled live555 in ${with_live555_tree}])
fi
fi
fi
......@@ -2630,7 +2645,7 @@ dnl Trying with pkg-config
if test "${enable_sout}" != "no"; then
VLC_ADD_BUILTINS([stream_out_switcher])
fi],
[ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (cvs version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ], [$LDAVUTIL])
[ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (svn version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ], [$LDAVUTIL])
AC_CHECK_LIB(avformat, av_open_input_stream, [
......@@ -3398,12 +3413,11 @@ if test "${enable_glx}" != "no" &&
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_glx}" = "yes"); then
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
AC_CHECK_HEADERS(X11/Xlib.h, [
AC_CHECK_HEADERS(GL/glx.h, [
AC_CHECK_HEADERS(X11/Xlib.h GL/glu.h GL/glx.h, [
VLC_ADD_PLUGINS([glx])
VLC_ADD_LDFLAGS([glx],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lGL -lGLU])
VLC_ADD_CPPFLAGS([glx],[${X_CFLAGS}])
]) ])
])
CPPFLAGS="${CPPFLAGS_save}"
fi
......@@ -4643,11 +4657,11 @@ AC_ARG_ENABLE(macosx,
[if test "${enable_macosx}" = "yes"
then
VLC_ADD_BUILTINS([macosx])
VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL])
VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL])
fi],
[AC_CHECK_HEADERS(Cocoa/Cocoa.h,
VLC_ADD_BUILTINS([macosx])
VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL])
VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL])
)])
CFLAGS=$ORIGCFLAGS
......@@ -4713,7 +4727,7 @@ AC_ARG_ENABLE(galaktos,
[ --enable-galaktos OpenGL visualisation plugin (default disabled)])
if test "${enable_galaktos}" = "yes"
then
AC_CHECK_HEADERS(GL/gl.h, [
AC_CHECK_HEADERS(GL/gl.h GL/glu.h, [
VLC_ADD_PLUGINS([galaktos])
if test "${SYS}" != "mingw32"; then
VLC_ADD_LDFLAGS([galaktos],[${X_LIBS} -lGL -lGLU])
......@@ -5093,7 +5107,7 @@ then
CPPFLAGS="${CPPFLAGS_save}"
fi
if test "${mozilla}" != "false"
if test "${enable_mozilla}" != "false"
then
build_pic=yes
AC_PATH_PROG(XPIDL, xpidl, no, ${xpidl_path}:/usr/lib/mozilla:/usr/lib64/mozilla:/usr/lib/xulrunner:/usr/lib64/xulrunner)
......
......@@ -268,6 +268,8 @@ void libvlc_input_free( libvlc_input_t * );
vlc_int64_t libvlc_input_get_length( libvlc_input_t *, libvlc_exception_t *);
vlc_int64_t libvlc_input_get_time( libvlc_input_t *, libvlc_exception_t *);
float libvlc_input_get_position( libvlc_input_t *, libvlc_exception_t *);
vlc_bool_t libvlc_input_will_play( libvlc_input_t *, libvlc_exception_t *);
/** @} */
......@@ -301,6 +303,10 @@ void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * );
*/
int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * );
void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * );
/** @} */
/**
......
......@@ -176,3 +176,14 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
/* Useful text messages shared by interfaces */
#define INTF_ABOUT_MSG LICENSE_MSG
#define EXTENSIONS_AUDIO "*.a52;*.aac;*.ac3;*.dts;*.flac;*.m4a;*.m4p;*.mka;" \
"*.mod;*.mp1;*.mp2;*.mp3;*.ogg;*.spx;*.wav;*.wma;*.xm"
#define EXTENSIONS_VIDEO "*.asf;*.avi;*.divx;*.dv;*.m1v;*.m2v;*.m4v;*.mkv;" \
"*.mov;*.mp2;*.mp4;*.mpeg;*.mpeg1;*.mpeg2;*.mpeg4;" \
"*.mpg;*.ogg;*.ogm;*.ps;*.ts;*.vob;*.wmv"
#define EXTENSIONS_PLAYLIST "*.asx;*.b4s;*.m3u;*.pls;*.vlc;*.xspf"
#define EXTENSIONS_SUBTITLE "*.idx;*.srt;*.sub;*.utf"
......@@ -60,6 +60,24 @@
#define KEY_MOUSEWHEELUP 0x001D0000
#define KEY_MOUSEWHEELDOWN 0x001E0000
/* TODO:
* The media keys are only used in win32. Support for other OSes needs to
* be added */
#define KEY_BROWSER_BACK 0x001F0000
#define KEY_BROWSER_FORWARD 0x00200000
#define KEY_BROWSER_REFRESH 0x00210000
#define KEY_BROWSER_STOP 0x00220000
#define KEY_BROWSER_SEARCH 0x00230000
#define KEY_BROWSER_FAVORITES 0x00240000
#define KEY_BROWSER_HOME 0x00250000
#define KEY_VOLUME_MUTE 0x00260000
#define KEY_VOLUME_DOWN 0x00270000
#define KEY_VOLUME_UP 0x00280000
#define KEY_MEDIA_NEXT_TRACK 0x00290000
#define KEY_MEDIA_PREV_TRACK 0x002a0000
#define KEY_MEDIA_STOP 0x002b0000
#define KEY_MEDIA_PLAY_PAUSE 0x002c0000
#define KEY_ASCII 0x0000007F
#define KEY_UNSET 0
......@@ -153,7 +171,21 @@ static const struct key_descriptor_s vlc_keys[] =
{ "\\", '\\' },
{ "[", '[' },
{ "]", ']' },
{ "*", '*' }
{ "*", '*' },
{ "Browser Back", KEY_BROWSER_BACK },
{ "Browser Forward", KEY_BROWSER_FORWARD },
{ "Browser Refresh", KEY_BROWSER_REFRESH },
{ "Browser Stop", KEY_BROWSER_STOP },
{ "Browser Search", KEY_BROWSER_SEARCH },
{ "Browser Favorites", KEY_BROWSER_FAVORITES },
{ "Browser Home", KEY_BROWSER_HOME },
{ "Volume Mute", KEY_VOLUME_MUTE },
{ "Volume Down", KEY_VOLUME_DOWN },
{ "Volume Up", KEY_VOLUME_UP },
{ "Media Next Track", KEY_MEDIA_NEXT_TRACK },
{ "Media Prev Track", KEY_MEDIA_PREV_TRACK },
{ "Media Stop", KEY_MEDIA_STOP },
{ "Media Play Pause", KEY_MEDIA_PLAY_PAUSE }
};
static inline char *KeyToString( int i_key )
......
......@@ -640,7 +640,8 @@ static int ReadICYMeta( access_t *p_access )
p += strlen( "StreamTitle=" );
if( *p == '\'' || *p == '"' )
{
char *psz = strchr( &p[1], p[0] );
char closing[] = { p[0], ';', '\0' };
char *psz = strstr( &p[1], closing );
if( !psz )
psz = strchr( &p[1], ';' );
......
......@@ -133,6 +133,8 @@ struct decoder_sys_t
#endif
};
static const GUID guid_wvc1 = { 0xc9bfbccf, 0xe60e, 0x4588, { 0xa3, 0xdf, 0x5a, 0x03, 0xb1, 0xfd, 0x95, 0x85 } };
static const GUID guid_wmv9 = { 0x724bb6a4, 0xe526, 0x450f, { 0xaf, 0xfa, 0xab, 0x9b, 0x45, 0x12, 0x91, 0x11 } };
static const GUID guid_wma9 = { 0x27ca0808, 0x01f5, 0x4e7a, { 0x8b, 0x05, 0x87, 0xf8, 0x07, 0xa2, 0x33, 0xd1 } };
......@@ -152,7 +154,10 @@ typedef struct
static const codec_dll decoders_table[] =
{
/* WM3 */
/* WVC1 */
{ VLC_FOURCC('W','V','C','1'), "wvc1dmod.dll", &guid_wvc1 },
{ VLC_FOURCC('w','v','c','1'), "wvc1dmod.dll", &guid_wvc1 },
/* WMV3 */
{ VLC_FOURCC('W','M','V','3'), "wmv9dmod.dll", &guid_wmv9 },
{ VLC_FOURCC('w','m','v','3'), "wmv9dmod.dll", &guid_wmv9 },
/* WMV2 */
......
......@@ -7,6 +7,8 @@
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@videolan.org>
* Christophe Massiot <massiot@via.ecp.fr>
* Part of the file Copyright (C) FFMPEG Project Developers
* (mpeg4_default matrixes)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -166,11 +168,32 @@ static const uint16_t mpa_bitrate_tab[2][15] =
static const uint16_t mpa_freq_tab[6] =
{ 44100, 48000, 32000, 22050, 24000, 16000 };
static const int16_t mpeg4_default_intra_matrix[64] = {
8, 17, 18, 19, 21, 23, 25, 27,
17, 18, 19, 21, 23, 25, 27, 28,
20, 21, 22, 23, 24, 26, 28, 30,
21, 22, 23, 24, 26, 28, 30, 32,
22, 23, 24, 26, 28, 30, 32, 35,
23, 24, 26, 28, 30, 32, 35, 38,
25, 26, 28, 30, 32, 35, 38, 41,
27, 28, 30, 32, 35, 38, 41, 45,
};
static const int16_t mpeg4_default_non_intra_matrix[64] = {
16, 17, 18, 19, 20, 21, 22, 23,
17, 18, 19, 20, 21, 22, 23, 24,
18, 19, 20, 21, 22, 23, 24, 25,
19, 20, 21, 22, 23, 24, 26, 27,
20, 21, 22, 23, 25, 26, 27, 28,
21, 22, 23, 24, 26, 27, 28, 30,
22, 23, 24, 26, 27, 28, 30, 31,
23, 24, 25, 27, 28, 30, 31, 33,
};
/*****************************************************************************
* OpenEncoder: probe the encoder
*****************************************************************************/
extern int16_t IMPORT_SYMBOL ff_mpeg4_default_intra_matrix[];
extern int16_t IMPORT_SYMBOL ff_mpeg4_default_non_intra_matrix[];
int E_(OpenEncoder)( vlc_object_t *p_this )
{
......@@ -444,8 +467,8 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
if ( p_sys->b_mpeg4_matrix )
{
p_context->intra_matrix = ff_mpeg4_default_intra_matrix;
p_context->inter_matrix = ff_mpeg4_default_non_intra_matrix;
p_context->intra_matrix = mpeg4_default_intra_matrix;
p_context->inter_matrix = mpeg4_default_non_intra_matrix;
}
if ( p_sys->b_pre_me )
......
......@@ -107,20 +107,20 @@ struct decoder_sys_t
#endif
void *win32_dll;
unsigned long WINAPI (*wraCloseCodec)(void*);
unsigned long WINAPI (*wraDecode)(void*, char*, unsigned long, char*,
unsigned long (WINAPI *wraCloseCodec)(void*);
unsigned long (WINAPI *wraDecode)(void*, char*, unsigned long, char*,
unsigned int*, long);
unsigned long WINAPI (*wraFlush)(unsigned long, unsigned long,
unsigned long (WINAPI *wraFlush)(unsigned long, unsigned long,
unsigned long);
unsigned long WINAPI (*wraFreeDecoder)(void*);
void* WINAPI (*wraGetFlavorProperty)(void*, unsigned long,
unsigned long (WINAPI *wraFreeDecoder)(void*);
void* (WINAPI *wraGetFlavorProperty)(void*, unsigned long,
unsigned long, int*);
unsigned long WINAPI (*wraInitDecoder)(void*, void*);
unsigned long WINAPI (*wraOpenCodec)(void*);
unsigned long WINAPI (*wraOpenCodec2)(void*, void*);
unsigned long WINAPI (*wraSetFlavor)(void*, unsigned long);
void WINAPI (*wraSetDLLAccessPath)(char*);
void WINAPI (*wraSetPwd)(char*, char*);
unsigned long (WINAPI *wraInitDecoder)(void*, void*);
unsigned long (WINAPI *wraOpenCodec)(void*);
unsigned long (WINAPI *wraOpenCodec2)(void*, void*);
unsigned long (WINAPI *wraSetFlavor)(void*, unsigned long);
void (WINAPI *wraSetDLLAccessPath)(char*);
void (WINAPI *wraSetPwd)(char*, char*);
};
/* linux dlls doesn't need packing */
......
......@@ -434,11 +434,7 @@ vlc_module_begin();
add_integer( SOUT_CFG_PREFIX "subme", 5, NULL, SUBME_TEXT,
SUBME_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "subpel", VLC_FALSE ); /* Deprecated since 0.8.5 */
#if X264_BUILD >= 30 /* r262 */
change_integer_range( 1, 6 );
#else
change_integer_range( 1, 5 );
#endif
change_integer_range( 1, SUBME_MAX );
#if X264_BUILD >= 41 /* r368 */
add_bool( SOUT_CFG_PREFIX "b-rdo", 0, NULL, B_RDO_TEXT,
......
......@@ -339,15 +339,22 @@ static void Run( intf_thread_t *p_intf )
{
val.i_int = PLAYING_S;
if( p_input )
{
var_Get( p_input, "state", &val );
}
if( p_input && val.i_int != PAUSE_S )
{
ClearChannels( p_intf, p_vout );
vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN,
OSD_PAUSE_ICON );
val.i_int = PAUSE_S;
var_Get( p_input, "state", &val );
if( val.i_int != PAUSE_S )
{
vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN,
OSD_PAUSE_ICON );
val.i_int = PAUSE_S;
}
else
{
vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN,
OSD_PLAY_ICON );
val.i_int = PLAYING_S;
}
var_Set( p_input, "state", val );
}
else
......@@ -356,9 +363,6 @@ static void Run( intf_thread_t *p_intf )
FIND_ANYWHERE );
if( p_playlist )
{
ClearChannels( p_intf, p_vout );
vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN,
OSD_PLAY_ICON );
playlist_Play( p_playlist );
vlc_object_release( p_playlist );
}
......
......@@ -8,7 +8,7 @@ SOURCES_rawdv = rawdv.c
SOURCES_au = au.c
SOURCES_wav = wav.c
SOURCES_mkv = mkv.cpp mp4/libmp4.c mp4/drms.c
SOURCES_livedotcom = livedotcom.cpp ../access/mms/asf.c ../access/mms/buffer.c
SOURCES_live555 = live555.cpp ../access/mms/asf.c ../access/mms/buffer.c
SOURCES_nsv = nsv.c
SOURCES_real = real.c
SOURCES_ts = ts.c ../mux/mpeg/csa.c
......
This diff is collapsed.
/*****************************************************************************
* livedotcom.cpp : LIVE555 Streaming Media support.
* live555.cpp : LIVE555 Streaming Media support.
*****************************************************************************
* Copyright (C) 2003-2006 the VideoLAN team
* $Id$
......@@ -76,12 +76,12 @@ static void Close( vlc_object_t * );
"used for the connection.")
vlc_module_begin();
/// \bug [String] s,live555.com,live555
set_description( _("RTP/RTSP/SDP demuxer (using Live555.com)" ) );
set_description( _("RTP/RTSP/SDP demuxer (using Live555)" ) );
set_capability( "demux2", 50 );
set_shortname( "RTP/RTSP");
set_callbacks( Open, Close );
add_shortcut( "live" );
add_shortcut( "livedotcom" );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
......@@ -103,8 +103,8 @@ vlc_module_begin();
N_("Tunnel RTSP and RTP over HTTP"), VLC_TRUE );
add_integer( "rtsp-http-port", 80, NULL,
N_("HTTP tunnel port"),
/// \bug [String] Missing .
N_("Port to use for tunneling the RTSP/RTP over HTTP"), VLC_TRUE );
N_("Port to use for tunneling the RTSP/RTP over HTTP."),
VLC_TRUE );
#endif
add_integer( "rtsp-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
......
......@@ -82,29 +82,25 @@ int xspf_import_Demux( demux_t *p_demux )
i_ret = VLC_EGENERIC;
}
/* start with parsing the root node */
if ( i_ret == VLC_SUCCESS )
/* locating the root node */
while ( i_ret == VLC_SUCCESS &&
xml_ReaderNodeType(p_xml_reader)!=XML_READER_STARTELEM )
if ( xml_ReaderRead( p_xml_reader ) != 1 )
{
msg_Err( p_demux, "can't read xml stream" );
i_ret = VLC_EGENERIC;
}
/* checking root nody type */
/* checking root node name */
if ( i_ret == VLC_SUCCESS )
if( xml_ReaderNodeType( p_xml_reader ) != XML_READER_STARTELEM )
{
psz_name = xml_ReaderName( p_xml_reader );
if ( !psz_name || strcmp( psz_name, "playlist" ) )
{
msg_Err( p_demux, "invalid root node type: %i", xml_ReaderNodeType( p_xml_reader ) );
msg_Err( p_demux, "invalid root node name: %s", psz_name );
i_ret = VLC_EGENERIC;
}
/* checking root node name */
if ( i_ret == VLC_SUCCESS )
psz_name = xml_ReaderName( p_xml_reader );
if ( !psz_name || strcmp( psz_name, "playlist" ) )
{
msg_Err( p_demux, "invalid root node name: %s", psz_name );
i_ret = VLC_EGENERIC;
FREE_NAME();
}
FREE_NAME();
/* get the playlist ... */
if ( i_ret == VLC_SUCCESS )
......@@ -156,7 +152,8 @@ int xspf_import_Control( demux_t *p_demux, int i_query, va_list args )
* \brief parse the root node of a XSPF playlist
* \param p_demux demuxer instance
* \param p_playlist playlist instance
* \param p_item current playlist node
* \param p_item current playlist item
* \param p_input current input item
* \param p_xml_reader xml reader instance
* \param psz_element name of element to parse
*/
......
//
// AppleRemote.h
// AppleRemote
//
// Created by Martin Kahr on 11.03.06.
// Copyright 2006 martinkahr.com. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <mach/mach.h>
#import <mach/mach_error.h>
#import <IOKit/IOKitLib.h>
#import <IOKit/IOCFPlugIn.h>
#import <IOKit/hid/IOHIDLib.h>
#import <IOKit/hid/IOHIDKeys.h>
enum AppleRemoteEventIdentifier
{
kRemoteButtonVolume_Plus=0,
kRemoteButtonVolume_Minus,
kRemoteButtonMenu,
kRemoteButtonPlay,
kRemoteButtonRight,
kRemoteButtonLeft,
kRemoteButtonRight_Hold,
kRemoteButtonLeft_Hold,
kRemoteButtonMenu_Hold,
kRemoteButtonPlay_Sleep,
kRemoteControl_Switched
};
typedef enum AppleRemoteEventIdentifier AppleRemoteEventIdentifier;
/* Encapsulates usage of the apple remote control
This class is implemented as a singleton as there is exactly one remote per machine (until now)
The class is not thread safe
*/
@interface AppleRemote : NSObject {
IOHIDDeviceInterface** hidDeviceInterface;
IOHIDQueueInterface** queue;
NSMutableArray* allCookies;
NSMutableDictionary* cookieToButtonMapping;
BOOL openInExclusiveMode;
int remoteId;
IBOutlet id delegate;
}
- (void) setRemoteId: (int) aValue;
- (int) remoteId;
- (BOOL) isRemoteAvailable;
- (BOOL) isListeningToRemote;
- (void) setListeningToRemote: (BOOL) value;
- (BOOL) isOpenInExclusiveMode;
- (void) setOpenInExclusiveMode: (BOOL) value;
- (void) setDelegate: (id) delegate;
- (id) delegate;
- (IBAction) startListening: (id) sender;
- (IBAction) stopListening: (id) sender;
@end
@interface AppleRemote (Singleton)
+ (AppleRemote*) sharedRemote;
@end
/* Method definitions for the delegate of the AppleRemote class
*/
@interface NSObject(NSAppleRemoteDelegate)
- (void) appleRemoteButton: (AppleRemoteEventIdentifier)buttonIdentifier pressedDown: (BOOL) pressedDown;
@end
@interface AppleRemote (PrivateMethods)
- (NSDictionary*) cookieToButtonMapping;
- (IOHIDQueueInterface**) queue;
- (IOHIDDeviceInterface**) hidDeviceInterface;
- (void) handleEventWithCookieString: (NSString*) cookieString sumOfValues: (SInt32) sumOfValues;
@end
@interface AppleRemote (IOKitMethods)
- (io_object_t) findAppleRemoteDevice;
- (IOHIDDeviceInterface**) createInterfaceForDevice: (io_object_t) hidDevice;
- (BOOL) initializeCookies;
- (BOOL) openDevice;
@end
\ No newline at end of file
This diff is collapsed.
SOURCES_macosx = \
AppleRemote.h \
AppleRemote.m \
about.h \
about.m \
applescript.h \
......
......@@ -86,6 +86,7 @@ struct intf_sys_t
/*****************************************************************************
* VLCMain interface
*****************************************************************************/
@class AppleRemote;
@interface VLCMain : NSObject
{
intf_thread_t *p_intf; /* The main intf object */
......@@ -273,6 +274,8 @@ struct intf_sys_t
NSSize o_size_with_playlist;
int i_lastShownVolume;
AppleRemote * o_remote;
}
+ (VLCMain *)sharedInstance;
......
......@@ -44,6 +44,7 @@
#include "interaction.h"
#include "embeddedwindow.h"
#include "update.h"
#include "AppleRemote.h"
/*****************************************************************************
* Local prototypes.
......@@ -341,6 +342,10 @@ static VLCMain *_o_sharedMainInstance = nil;
o_update = [[VLCUpdate alloc] init];
i_lastShownVolume = -1;
o_remote = [[AppleRemote alloc] init];
[o_remote setDelegate: _o_sharedMainInstance];
return _o_sharedMainInstance;
}
......@@ -682,6 +687,39 @@ static VLCMain *_o_sharedMainInstance = nil;
return( o_str );
}
/* Listen to the remote in exclusive mode, only when VLC is the active
application */
- (void)applicationDidBecomeActive:(NSNotification *)aNotification
{
[o_remote startListening: self];
}
- (void)applicationDidResignActive:(NSNotification *)aNotification
{
[o_remote stopListening: self];
}
/* Apple Remote callback */
- (void)appleRemoteButton:(AppleRemoteEventIdentifier)buttonIdentifier
pressedDown:(BOOL)pressedDown
{
switch( buttonIdentifier )
{
case kRemoteButtonPlay:
[o_controls play: self];
break;
case kRemoteButtonVolume_Plus:
[o_controls volumeUp: self];
break;
case kRemoteButtonVolume_Minus:
[o_controls volumeDown: self];
break;
default:
/* Add here whatever you want other buttons to do */
break;
}
}
- (char *)delocalizeString:(NSString *)id
{
NSData * o_data = [id dataUsingEncoding: NSUTF8StringEncoding
......
......@@ -302,6 +302,7 @@
vlc_object_release( p_playlist );
return( @"error");
}
//NSLog( @"values for %p", p_item );
if( [[o_tc identifier] isEqualToString:@"1"] )
{
......
This diff is collapsed.
......@@ -72,6 +72,20 @@ Win32Loop::Win32Loop( intf_thread_t *pIntf ): OSLoop( pIntf )
virtKeyToVlcKey[VK_END] = KEY_END;
virtKeyToVlcKey[VK_PRIOR] = KEY_PAGEUP;
virtKeyToVlcKey[VK_NEXT] = KEY_PAGEDOWN;
virtKeyToVlcKey[VK_BROWSER_BACK] = KEY_BROWSER_BACK;
virtKeyToVlcKey[VK_BROWSER_FORWARD] = KEY_BROWSER_FORWARD;
virtKeyToVlcKey[VK_BROWSER_REFRESH] = KEY_BROWSER_REFRESH;
virtKeyToVlcKey[VK_BROWSER_STOP] = KEY_BROWSER_STOP;
virtKeyToVlcKey[VK_BROWSER_SEARCH] = KEY_BROWSER_SEARCH;
virtKeyToVlcKey[VK_BROWSER_FAVORITES] = KEY_BROWSER_FAVORITES;
virtKeyToVlcKey[VK_BROWSER_HOME] = KEY_BROWSER_HOME;
virtKeyToVlcKey[VK_VOLUME_MUTE] = KEY_VOLUME_MUTE;
virtKeyToVlcKey[VK_VOLUME_DOWN] = KEY_VOLUME_DOWN;
virtKeyToVlcKey[VK_VOLUME_UP] = KEY_VOLUME_UP;
virtKeyToVlcKey[VK_MEDIA_NEXT_TRACK] = KEY_MEDIA_NEXT_TRACK;
virtKeyToVlcKey[VK_MEDIA_PREV_TRACK] = KEY_MEDIA_PREV_TRACK;
virtKeyToVlcKey[VK_MEDIA_STOP] = KEY_MEDIA_STOP;
virtKeyToVlcKey[VK_MEDIA_PLAY_PAUSE] = KEY_MEDIA_PLAY_PAUSE;
}
......
......@@ -430,6 +430,12 @@ void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event )
p_file_dialog = new wxFileDialog( NULL, wxU(_("Open File")),
wxT(""), wxT(""), wxT("*"), wxOPEN | wxMULTIPLE );
p_file_dialog->SetWildcard(wxU(_("All Files (*.*)|*"
"|Sound Files (*.mp3, *.ogg, etc.)|" EXTENSIONS_AUDIO
"|Video Files (*.avi, *.mpg, etc.)|" EXTENSIONS_VIDEO
"|Playlist Files (*.m3u, *.pls, etc.)|" EXTENSIONS_PLAYLIST
"|Subtitle Files (*.srt, *.sub, etc.)|" EXTENSIONS_SUBTITLE)));
if( p_file_dialog && p_file_dialog->ShowModal() == wxID_OK )
{
wxArrayString paths;
......
......@@ -1264,6 +1264,12 @@ void OpenDialog::OnFileBrowse( wxCommandEvent& WXUNUSED(event) )
file_dialog = new wxFileDialog( this, wxU(_("Open File")),
wxT(""), wxT(""), wxT("*"), wxOPEN | wxMULTIPLE );
file_dialog->SetWildcard(wxU(_("All Files (*.*)|*"
"|Sound Files (*.mp3, *.ogg, etc.)|" EXTENSIONS_AUDIO
"|Video Files (*.avi, *.mpg, etc.)|" EXTENSIONS_VIDEO
"|Playlist Files (*.m3u, *.pls, etc.)|" EXTENSIONS_PLAYLIST
"|Subtitle Files (*.srt, *.sub, etc.)|" EXTENSIONS_SUBTITLE)));
if( file_dialog && file_dialog->ShowModal() == wxID_OK )
{
wxArrayString paths;
......
......@@ -947,7 +947,7 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
void Playlist::OnOpen( wxCommandEvent& WXUNUSED(event) )
{
wxFileDialog dialog( this, wxU(_("Open playlist")), wxT(""), wxT(""),
wxT("All playlists|*.pls;*.m3u;*.asx;*.b4s;*.xspf|XSPF playlist|*.xspf|M3U files|*.m3u"), wxOPEN );
wxT("All playlists|" EXTENSIONS_PLAYLIST "|XSPF playlist|*.xspf|M3U files|*.m3u"), wxOPEN );
if( dialog.ShowModal() == wxID_OK )
{
......
......@@ -352,10 +352,8 @@ int VideoWindow::ControlWindow( void *p_window, int i_query, va_list args )
unsigned int i_width = va_arg( args, unsigned int );
unsigned int i_height = va_arg( args, unsigned int );
vlc_mutex_lock( &lock );
if( !i_width && p_vout ) i_width = p_vout->i_window_width;
if( !i_height && p_vout ) i_height = p_vout->i_window_height;
vlc_mutex_unlock( &lock );
/* Update dimensions */
wxSizeEvent event( wxSize( i_width, i_height ), UpdateSize_Event );
......
......@@ -435,6 +435,11 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
p_es->i_payload_type = p_media->i_payload_type++;
p_es->psz_rtpmap = strdup( "H263-1998/90000" );
break;
case VLC_FOURCC( 'h', '2', '6', '4' ):
p_es->i_payload_type = p_media->i_payload_type++;
p_es->psz_rtpmap = strdup( "H264/90000" );
p_es->psz_fmtp = strdup( "packetization-mode=1" );
break;
case VLC_FOURCC( 'm', 'p', '4', 'v' ):
p_es->i_payload_type = p_media->i_payload_type++;
p_es->psz_rtpmap = strdup( "MP4V-ES/90000" );
......
......@@ -354,6 +354,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
tk->psz_name = "A/52";
i_bitspersample = 0;
break;
case VLC_FOURCC( 'm', 'p', '4', 'a' ):
tk->i_tag = WAVE_FORMAT_AAC;
tk->psz_name = "MPEG-4 Audio";
i_bitspersample = 0;
break;
case VLC_FOURCC( 'm', 'p', 'g', 'a' ):
#if 1
tk->psz_name = "MPEG Audio Layer 3";
......
......@@ -902,6 +902,7 @@ static int rtp_packetize_split( sout_stream_t *, sout_stream_id_t *, block_t * )
static int rtp_packetize_mp4a ( sout_stream_t *, sout_stream_id_t *, block_t * );
static int rtp_packetize_mp4a_latm ( sout_stream_t *, sout_stream_id_t *, block_t * );
static int rtp_packetize_h263 ( sout_stream_t *, sout_stream_id_t *, block_t * );
static int rtp_packetize_h264 ( sout_stream_t *, sout_stream_id_t *, block_t * );
static int rtp_packetize_amr ( sout_stream_t *, sout_stream_id_t *, block_t * );
static void sprintf_hexa( char *s, uint8_t *p_data, int i_data )
......@@ -1067,6 +1068,13 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
id->psz_rtpmap = strdup( "H263-1998/90000" );
id->pf_packetize = rtp_packetize_h263;
break;
case VLC_FOURCC( 'h', '2', '6', '4' ):
id->i_payload_type = p_sys->i_payload_type++;
id->i_clock_rate = 90000;
id->psz_rtpmap = strdup( "H264/90000" );
id->pf_packetize = rtp_packetize_h264;
id->psz_fmtp = strdup( "packetization-mode=1" );
break;
case VLC_FOURCC( 'm', 'p', '4', 'v' ):
{
......@@ -2334,6 +2342,126 @@ static int rtp_packetize_h263( sout_stream_t *p_stream, sout_stream_id_t *id,
return VLC_SUCCESS;
}
/* rfc3984 */
static int rtp_packetize_h264( sout_stream_t *p_stream, sout_stream_id_t *id,
block_t *in )
{
int i_max = id->i_mtu - 12; /* payload max in one packet */
int i_count = ( in->i_buffer + i_max - 1 ) / i_max;
uint8_t *p_data = in->p_buffer;
int i_data = in->i_buffer;
int i;
if( i_data <= i_max )
{
/* NAL */
int i_payload;
block_t *out;
uint8_t *p = p_data;
int i_rest = in->i_buffer;
while( i_rest > 4 &&
( p[0] != 0x00 || p[1] != 0x00 || p[2] != 0x01 ) )
{
p++;
i_rest--;
}
if (i_rest < 4)
return VLC_SUCCESS;
p+=3;
i_rest-=3;
i_payload = __MIN( i_max, i_rest );
out = block_New( p_stream, 12 + i_payload );
/* rtp common header */
rtp_packetize_common( id, out, 1,
in->i_pts > 0 ? in->i_pts : in->i_dts );
memcpy( &out->p_buffer[12], p, i_payload );
out->i_buffer = 12 + i_payload;
out->i_dts = in->i_dts;
out->i_length = in->i_length;
rtp_packetize_send( id, out );
/*msg_Dbg( p_stream, "nal-out plain %d %02x", i_payload, out->p_buffer[16] );*/
}
else
{
/* FU-A */
int i_payload;
block_t *out;
uint8_t *p = p_data;
int i_rest = in->i_buffer;
int start=1, end=0, first=0, nalh=-1;
while( i_rest > 4 &&
( p[0] != 0x00 || p[1] != 0x00 || p[2] != 0x01 ) )
{
p++;
i_rest--;
}
if (i_rest < 4)
return VLC_SUCCESS;
p+=3;
i_rest-=3;
nalh = *p;
p++;
i_rest--;
i_max = id->i_mtu - 14;
i_count = ( i_rest + i_max - 1 ) / i_max;
/*msg_Dbg( p_stream, "nal-out fragmented %02x %d", nalh, i_rest);*/
i=0;
while (end==0){
i_payload = __MIN( i_max, i_rest );
out = block_New( p_stream, 14 + i_payload );
if (i_rest==i_payload)
end = 1;
/* rtp common header */
rtp_packetize_common( id, out, (end)?1:0,
in->i_pts > 0 ? in->i_pts : in->i_dts );
/* FU indicator */
out->p_buffer[12] = (nalh&0x60)|28;
/* FU header */
out->p_buffer[13] = (start<<7)|(end<<6)|(nalh&0x1f);
memcpy( &out->p_buffer[14], p+first, i_payload );
out->i_buffer = 14 + i_payload;
// not sure what of these should be used and what it does :)
out->i_dts = in->i_dts + i * in->i_length / i_count;
out->i_length = in->i_length / i_count;
//out->i_dts = in->i_dts;
//out->i_length = in->i_length;
rtp_packetize_send( id, out );
/*msg_Dbg( p_stream, "nal-out fragmented: frag %d %d %02x %02x %d", start,end,
out->p_buffer[12], out->p_buffer[13], i_payload );*/
i_rest -= i_payload;
first += i_payload;
i++;
start=0;
}
}
return VLC_SUCCESS;
}
static int rtp_packetize_amr( sout_stream_t *p_stream, sout_stream_id_t *id,
block_t *in )
{
......
......@@ -30,6 +30,29 @@
#include <caca.h>
#ifndef CACA_API_VERSION_1
/* Upward compatibility macros */
typedef char cucul_canvas_t;
typedef struct caca_bitmap cucul_dither_t;
typedef char caca_display_t;
# define CUCUL_COLOR_DEFAULT CACA_COLOR_LIGHTGRAY
# define CUCUL_COLOR_BLACK CACA_COLOR_BLACK
# define cucul_clear_canvas(x) caca_clear()
# define cucul_create_canvas(x,y) "" /* kinda hacky */
# define cucul_create_dither caca_create_bitmap
# define cucul_dither_bitmap(x,y,z,t,u,v,w) caca_draw_bitmap(y,z,t,u,v,w)
# define cucul_free_dither caca_free_bitmap
# define cucul_free_canvas(x)
# define cucul_get_canvas_width(x) caca_get_width()
# define cucul_get_canvas_height(x) caca_get_height()
# define cucul_set_color(x,y,z) caca_set_color(y,z)
# define caca_create_display(x) (caca_init() ? NULL : "") /* hacky, too */
# define caca_free_display(x) caca_end()
# define caca_get_event(x,y,z,t) *(z) = caca_get_event(y)
# define caca_refresh_display(x) caca_refresh()
# define caca_set_display_title(x,y) caca_set_window_title(y)
#endif
#include <vlc/vlc.h>
#include <vlc/vout.h>
#include <vlc/intf.h>
......@@ -67,13 +90,9 @@ vlc_module_end();
*****************************************************************************/
struct vout_sys_t
{
#ifdef CACA_API_VERSION_1
cucul_canvas_t *p_cv;
caca_display_t *p_dp;
cucul_dither_t *p_dither;
#else
struct caca_bitmap *p_bitmap;
#endif
};
/*****************************************************************************
......@@ -86,58 +105,56 @@ static int Create( vlc_object_t *p_this )
vout_thread_t *p_vout = (vout_thread_t *)p_this;
#if defined( WIN32 ) && !defined( UNDER_CE )
if( AllocConsole() )
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
SMALL_RECT rect;
COORD coord;
HANDLE hstdout;
if( !AllocConsole() )
{
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
SMALL_RECT rect;
COORD coord;
HANDLE hstdout =
CreateConsoleScreenBuffer( GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, CONSOLE_TEXTMODE_BUFFER, NULL );
if( !hstdout || hstdout == INVALID_HANDLE_VALUE )
{
msg_Err( p_vout, "cannot create screen buffer" );
FreeConsole();
return VLC_EGENERIC;
}
msg_Err( p_vout, "cannot create console" );
return VLC_EGENERIC;
}
if( !SetConsoleActiveScreenBuffer( hstdout) )
{
msg_Err( p_vout, "cannot set active screen buffer" );
FreeConsole();
return VLC_EGENERIC;
}
hstdout =
CreateConsoleScreenBuffer( GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, CONSOLE_TEXTMODE_BUFFER, NULL );
if( !hstdout || hstdout == INVALID_HANDLE_VALUE )
{
msg_Err( p_vout, "cannot create screen buffer" );
FreeConsole();
return VLC_EGENERIC;
}
coord = GetLargestConsoleWindowSize( hstdout );
msg_Dbg( p_vout, "SetConsoleWindowInfo: %ix%i", coord.X, coord.Y );
if( !SetConsoleActiveScreenBuffer( hstdout) )
{
msg_Err( p_vout, "cannot set active screen buffer" );
FreeConsole();
return VLC_EGENERIC;
}
/* Force size for now */
coord.X = 100;
coord.Y = 40;
coord = GetLargestConsoleWindowSize( hstdout );
msg_Dbg( p_vout, "SetConsoleWindowInfo: %ix%i", coord.X, coord.Y );
if( !SetConsoleScreenBufferSize( hstdout, coord ) )
msg_Warn( p_vout, "SetConsoleScreenBufferSize %i %i",
coord.X, coord.Y );
/* Force size for now */
coord.X = 100;
coord.Y = 40;
/* Get the current screen buffer size and window position. */
if( GetConsoleScreenBufferInfo( hstdout, &csbiInfo ) )
{
rect.Top = 0; rect.Left = 0;
rect.Right = csbiInfo.dwMaximumWindowSize.X - 1;
rect.Bottom = csbiInfo.dwMaximumWindowSize.Y - 1;
if( !SetConsoleWindowInfo( hstdout, TRUE, &rect ) )
msg_Dbg( p_vout, "SetConsoleWindowInfo failed: %ix%i",
rect.Right, rect.Bottom );
}
}
else
if( !SetConsoleScreenBufferSize( hstdout, coord ) )
msg_Warn( p_vout, "SetConsoleScreenBufferSize %i %i",
coord.X, coord.Y );
/* Get the current screen buffer size and window position. */
if( GetConsoleScreenBufferInfo( hstdout, &csbiInfo ) )
{
msg_Err( p_vout, "cannot create console" );
return VLC_EGENERIC;
rect.Top = 0; rect.Left = 0;
rect.Right = csbiInfo.dwMaximumWindowSize.X - 1;
rect.Bottom = csbiInfo.dwMaximumWindowSize.Y - 1;
if( !SetConsoleWindowInfo( hstdout, TRUE, &rect ) )
msg_Dbg( p_vout, "SetConsoleWindowInfo failed: %ix%i",
rect.Right, rect.Bottom );
}
#endif
/* Allocate structure */
......@@ -148,7 +165,6 @@ static int Create( vlc_object_t *p_this )
return VLC_ENOMEM;
}
#ifdef CACA_API_VERSION_1
p_vout->p_sys->p_cv = cucul_create_canvas(0, 0);
if( !p_vout->p_sys->p_cv )
{
......@@ -168,16 +184,6 @@ static int Create( vlc_object_t *p_this )
caca_set_display_title( p_vout->p_sys->p_dp,
VOUT_TITLE " - Colour AsCii Art (caca)" );
#else
if( caca_init() )
{
msg_Err( p_vout, "cannot initialize libcaca" );
free( p_vout->p_sys );
return VLC_EGENERIC;
}
caca_set_window_title( VOUT_TITLE " - Colour AsCii Art (caca)" );
#endif
p_vout->pf_init = Init;
p_vout->pf_end = End;
......@@ -207,26 +213,16 @@ static int Init( vout_thread_t *p_vout )
p_vout->output.i_gmask = 0x0000ff00;
p_vout->output.i_bmask = 0x000000ff;
/* Create the libcaca bitmap */
#ifdef CACA_API_VERSION_1
p_vout->p_sys->p_dither =
cucul_create_dither
#else
p_vout->p_sys->p_bitmap =
caca_create_bitmap
#endif
/* Create the libcaca dither object */
p_vout->p_sys->p_dither = cucul_create_dither
( 32, p_vout->output.i_width, p_vout->output.i_height,
4 * ((p_vout->output.i_width + 15) & ~15),
p_vout->output.i_rmask, p_vout->output.i_gmask,
p_vout->output.i_bmask, 0x00000000 );
#ifdef CACA_API_VERSION_1
if( !p_vout->p_sys->p_dither )
#else
if( !p_vout->p_sys->p_bitmap )
#endif
{
msg_Err( p_vout, "could not create libcaca bitmap" );
msg_Err( p_vout, "could not create libcaca dither object" );
return VLC_EGENERIC;
}
......@@ -268,11 +264,7 @@ static int Init( vout_thread_t *p_vout )
*****************************************************************************/
static void End( vout_thread_t *p_vout )
{
#ifdef CACA_API_VERSION_1
cucul_free_dither( p_vout->p_sys->p_dither );
#else
caca_free_bitmap( p_vout->p_sys->p_bitmap );
#endif
}
/*****************************************************************************
......@@ -284,12 +276,8 @@ static void Destroy( vlc_object_t *p_this )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
#ifdef CACA_API_VERSION_1
caca_free_display( p_vout->p_sys->p_dp );
cucul_free_canvas( p_vout->p_sys->p_cv );
#else
caca_end();
#endif
#if defined( WIN32 ) && !defined( UNDER_CE )
FreeConsole();
......@@ -309,36 +297,28 @@ static int Manage( vout_thread_t *p_vout )
#ifdef CACA_API_VERSION_1
struct caca_event ev;
#else
int event;
int ev;
#endif
vlc_value_t val;
#ifdef CACA_API_VERSION_1
while(( caca_get_event(p_vout->p_sys->p_dp,
CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE, &ev, 0) ))
#else
while(( event = caca_get_event(CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE) ))
#endif
while( caca_get_event(p_vout->p_sys->p_dp,
CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE, &ev, 0) )
{
/* Acknowledge the resize */
#ifdef CACA_API_VERSION_1
if( ev.type == CACA_EVENT_RESIZE )
{
caca_refresh_display( p_vout->p_sys->p_dp );
continue;
}
#else
if( event == CACA_EVENT_RESIZE )
if( ev == CACA_EVENT_RESIZE )
#endif
{
caca_refresh();
caca_refresh_display( p_vout->p_sys->p_dp );
continue;
}
#endif
#ifdef CACA_API_VERSION_1
switch( ev.data.key.ch )
#else
switch( event & 0x00ffffff )
switch( ev & 0x00ffffff )
#endif
{
case 'q':
......@@ -362,7 +342,6 @@ static int Manage( vout_thread_t *p_vout )
*****************************************************************************/
static void Render( vout_thread_t *p_vout, picture_t *p_pic )
{
#ifdef CACA_API_VERSION_1
cucul_set_color( p_vout->p_sys->p_cv,
CUCUL_COLOR_DEFAULT, CUCUL_COLOR_BLACK );
cucul_clear_canvas( p_vout->p_sys->p_cv );
......@@ -370,11 +349,6 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
cucul_get_canvas_width( p_vout->p_sys->p_cv ) - 1,
cucul_get_canvas_height( p_vout->p_sys->p_cv ) - 1,
p_vout->p_sys->p_dither, p_pic->p->p_pixels );
#else
caca_clear();
caca_draw_bitmap( 0, 0, caca_get_width() - 1, caca_get_height() - 1,
p_vout->p_sys->p_bitmap, p_pic->p->p_pixels );
#endif
}
/*****************************************************************************
......@@ -382,10 +356,6 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
*****************************************************************************/
static void Display( vout_thread_t *p_vout, picture_t *p_pic )
{
#ifdef CACA_API_VERSION_1
caca_refresh_display( p_vout->p_sys->p_dp );
#else
caca_refresh();
#endif
}
......@@ -32,7 +32,7 @@
#include <string.h> /* strerror() */
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
# define _WIN32_WINNT 0x0500
#endif
#include <vlc/vlc.h>
......@@ -875,6 +875,21 @@ static struct
{ VK_SHIFT, 0 },
{ VK_MENU, 0 },
{ VK_BROWSER_BACK, KEY_BROWSER_BACK },
{ VK_BROWSER_FORWARD, KEY_BROWSER_FORWARD },
{ VK_BROWSER_REFRESH, KEY_BROWSER_REFRESH },
{ VK_BROWSER_STOP, KEY_BROWSER_STOP },
{ VK_BROWSER_SEARCH, KEY_BROWSER_SEARCH },
{ VK_BROWSER_FAVORITES, KEY_BROWSER_FAVORITES },
{ VK_BROWSER_HOME, KEY_BROWSER_HOME },
{ VK_VOLUME_MUTE, KEY_VOLUME_MUTE },
{ VK_VOLUME_DOWN, KEY_VOLUME_DOWN },
{ VK_VOLUME_UP, KEY_VOLUME_UP },
{ VK_MEDIA_NEXT_TRACK, KEY_MEDIA_NEXT_TRACK },
{ VK_MEDIA_PREV_TRACK, KEY_MEDIA_PREV_TRACK },
{ VK_MEDIA_STOP, KEY_MEDIA_STOP },
{ VK_MEDIA_PLAY_PAUSE, KEY_MEDIA_PLAY_PAUSE },
{ 0, 0 }
};
......
......@@ -109,10 +109,10 @@ static void SwitchContext( vout_thread_t * );
"set it to 0 for first screen, 1 for the second.")
vlc_module_begin();
set_shortname( "OpenGL" );
set_shortname( "OpenGL(GLX)" );
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VOUT );
set_description( _("OpenGL video output") );
set_description( _("OpenGL(GLX) provider") );
set_capability( "opengl provider", 50 );
set_callbacks( CreateOpenGL, DestroyOpenGL );
......
......@@ -13,7 +13,7 @@ data 'carb' (0)
resource 'STR#' (126)
{
{
"Version 0.8.5, Copyright 2006, The VideoLAN Team"
"Version 0.8.6, Copyright 2006, The VideoLAN Team"
"<BR><A HREF='http://www.videolan.org'>http://www.videolan.org</A>",
"VLC Multimedia Plugin"
};
......@@ -34,7 +34,7 @@ resource 'STR#' (127)
"MPEG-4 video",
"MPEG-4 video",
"AVI video",
"QuickTime video",
/* "QuickTime video", */
"Ogg stream",
"Ogg stream",
"VLC plugin",
......@@ -63,7 +63,7 @@ resource 'STR#' (128,"MIME Type")
"application/mpeg4-iod", "mp4,mpg4",
"application/mpeg4-muxcodetable", "mp4,mpg4",
"video/x-msvideo", "avi",
"video/quicktime", "mov, qt",
/* "video/quicktime", "mov, qt", */
"application/ogg", "ogg",
"application/x-ogg", "ogg",
"application/x-vlc-plugin", "vlc",
......
......@@ -82,7 +82,7 @@ static void Resize( Widget w, XtPointer closure, XEvent *event );
* MacOS-only declarations
******************************************************************************/
#ifdef XP_MACOSX
# define VOUT_PLUGINS "macosx,dummy"
# define VOUT_PLUGINS "opengl,macosx,dummy"
# define AOUT_PLUGINS "auhal,macosx,dummy"
#endif
......@@ -204,17 +204,13 @@ int16 NPP_HandleEvent( NPP instance, void * event )
case updateEvt:
{
NPWindow *npwindow = p_plugin->window;
NP_Port *npport = (NP_Port *)(npwindow->window);
SetPort( npport->port );
//SetOrigin( npport->portx , npport->porty);
/* draw the beautiful "No Picture" */
ForeColor(blackColor);
PenMode( patCopy );
Rect rect;
Rect rect;
rect.left = 0;
rect.top = 0;
rect.right = npwindow->width;
......@@ -236,8 +232,12 @@ int16 NPP_HandleEvent( NPP instance, void * event )
return true;
case NPEventType_AdjustCursorEvent:
return false;
case NPEventType_ScrollingBeginsEvent:
case NPEventType_ScrollingEndsEvent:
case NPEventType_MenuCommandEvent:
return false;
case NPEventType_ClippingChangedEvent:
return false;
case NPEventType_ScrollingBeginsEvent:
case NPEventType_ScrollingEndsEvent:
return true;
default:
;
......
......@@ -112,3 +112,32 @@ float libvlc_input_get_position( libvlc_input_t *p_input,
return val.f_float;
}
vlc_bool_t libvlc_input_will_play( libvlc_input_t *p_input,
libvlc_exception_t *p_exception)
{
input_thread_t *p_input_thread;
vlc_value_t val;
if( !p_input )
{
libvlc_exception_raise( p_exception, "Input is NULL" );
return VLC_FALSE;
}
p_input_thread = (input_thread_t*)vlc_object_get(
p_input->p_instance->p_vlc,
p_input->i_input_id );
if( !p_input_thread )
{
libvlc_exception_raise( p_exception, "Input does not exist" );
return VLC_FALSE;
}
if ( !p_input_thread->b_die && !p_input_thread->b_dead )
return VLC_TRUE;
return VLC_FALSE;
}
......@@ -123,3 +123,38 @@ void libvlc_toggle_fullscreen( libvlc_input_t *p_input,
libvlc_exception_raise( p_e,
"Unexpected error while setting fullscreen value" );
}
void
libvlc_video_take_snapshot( libvlc_input_t *p_input, char *filepath,
libvlc_exception_t *p_e )
{
vout_thread_t *p_vout = GetVout( p_input, p_e );
input_thread_t *p_input_thread;
char path[256];
/* GetVout will raise the exception for us */
if( !p_vout )
{
return;
}
p_input_thread = (input_thread_t*)vlc_object_get(
p_input->p_instance->p_vlc,
p_input->i_input_id );
if( !p_input_thread )
{
libvlc_exception_raise( p_e, "Input does not exist" );
return NULL;
}
snprintf( path, 255, "%s", filepath );
var_SetString( p_vout, "snapshot-path", path );
var_SetString( p_vout, "snapshot-format", "png" );
vout_Control( p_vout, VOUT_SNAPSHOT );
vlc_object_release( p_vout );
return;
}
......@@ -851,9 +851,9 @@ static char *ppsz_clock_descriptions[] =
"Tell VLC that it is being launched due to a file association in the OS" )
#define ONEINSTANCEWHENSTARTEDFROMFILE_TEXT N_( \
"Allow only on running instance when started from file")
"One instance when started from file")
#define ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT N_( \
"Allow only on running instance when started from file")
"Allow only one running instance when started from file.")
#define HPRIORITY_TEXT N_("Increase the priority of the process")
#define HPRIORITY_LONGTEXT N_( \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment