Merge svn changes up to r31133

This commit is contained in:
Uoti Urpala 2010-05-07 21:19:53 +03:00
commit eee666c3b5
19 changed files with 169 additions and 111 deletions

View File

@ -57,7 +57,6 @@ clean:
releaseclean:
-rm -f $(CONFIGURE_GENERATED)
-rm -f $(MAIN_XML_ALL)
-rm -f $$(find . -name *.xml -type l)
distclean: clean releaseclean

View File

@ -13,24 +13,19 @@ all: html-chunked html-single
html-chunked: $(HTMLDIR)/index.html
html-single: $(HTMLDIR)/MPlayer.html
SYMLINKS_DEPS := $(filter-out $(wildcard *.xml),$(notdir $(wildcard ../en/*.xml)))
xmllint: main.xml $(SYMLINKS_DEPS)
xmllint: main.xml
../xmllint.sh $<
$(HTMLDIR)/default.css:
cp -f ../default.css $(@D)
$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(SYMLINKS_DEPS) xmllint $(HTMLDIR)/default.css
$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) xmllint $(HTMLDIR)/default.css
../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $<
$(HTMLDIR)/MPlayer.html: main.xml $(SINGLE_XSL_DEPS) $(SYMLINKS_DEPS) xmllint $(HTMLDIR)/default.css
$(HTMLDIR)/MPlayer.html: main.xml $(SINGLE_XSL_DEPS) xmllint $(HTMLDIR)/default.css
../xsltproc.sh $@ $(HTML_SINGLE_XSL) $<
../html-chunk.xsl ../html-single.xsl main.xml:
cd .. && sh configure
$(SYMLINKS_DEPS):
ln -s ../en/$@ $@
.PHONY: all html-chunked html-single xmllint

View File

@ -0,0 +1 @@
../en/encoding-guide.xml

1
DOCS/xml/es/radio.xml Symbolic link
View File

@ -0,0 +1 @@
../en/radio.xml

1
DOCS/xml/it/ports.xml Symbolic link
View File

@ -0,0 +1 @@
../en/ports.xml

1
DOCS/xml/it/skin.xml Symbolic link
View File

@ -0,0 +1 @@
../en/skin.xml

View File

@ -0,0 +1 @@
../en/encoding-guide.xml

1
DOCS/xml/zh_CN/faq.xml Symbolic link
View File

@ -0,0 +1 @@
../en/faq.xml

1
DOCS/xml/zh_CN/install.xml Symbolic link
View File

@ -0,0 +1 @@
../en/install.xml

1
DOCS/xml/zh_CN/ports.xml Symbolic link
View File

@ -0,0 +1 @@
../en/ports.xml

1
DOCS/xml/zh_CN/skin.xml Symbolic link
View File

@ -0,0 +1 @@
../en/skin.xml

1
DOCS/xml/zh_CN/tvinput.xml Symbolic link
View File

@ -0,0 +1 @@
../en/tvinput.xml

1
DOCS/xml/zh_CN/usage.xml Symbolic link
View File

@ -0,0 +1 @@
../en/usage.xml

1
DOCS/xml/zh_CN/video.xml Symbolic link
View File

@ -0,0 +1 @@
../en/video.xml

187
configure vendored
View File

@ -4796,83 +4796,6 @@ echores "$_corevideo"
fi #if darwin
# make sure this stays below CoreVideo to avoid issues due to namespace
# conflicts between -lGL and -framework OpenGL
echocheck "OpenGL"
#Note: this test is run even with --enable-gl since we autodetect linker flags
if (test "$_x11" = yes || win32) && test "$_gl" != no ; then
cat > $TMPC << EOF
#ifdef GL_WIN32
#include <windows.h>
#include <GL/gl.h>
#else
#include <GL/gl.h>
#include <X11/Xlib.h>
#include <GL/glx.h>
#endif
int main(void) {
#ifdef GL_WIN32
HDC dc;
wglCreateContext(dc);
#else
glXCreateContext(NULL, NULL, NULL, True);
#endif
glFinish();
return 0;
}
EOF
_gl=no
for _ld_tmp in -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
if cc_check $_ld_tmp $_ld_lm ; then
_gl=yes
_gl_x11=yes
libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl"
break
fi
done
if cc_check -DGL_WIN32 -lopengl32 ; then
_gl=yes
_gl_win32=yes
libs_mplayer="$libs_mplayer -lopengl32 -lgdi32"
fi
else
_gl=no
fi
if test "$_gl" = yes ; then
def_gl='#define CONFIG_GL 1'
_res_comment="backends:"
if test "$_gl_win32" = yes ; then
def_gl_win32='#define CONFIG_GL_WIN32 1'
_res_comment="$_res_comment win32"
fi
if test "$_gl_x11" = yes ; then
def_gl_x11='#define CONFIG_GL_X11 1'
_res_comment="$_res_comment x11"
fi
_vomodules="opengl $_vomodules"
else
def_gl='#undef CONFIG_GL'
def_gl_win32='#undef CONFIG_GL_WIN32'
def_gl_x11='#undef CONFIG_GL_X11'
_novomodules="opengl $_novomodules"
fi
echores "$_gl"
echocheck "MatrixView"
if test "$_gl" = no ; then
matrixview=no
fi
if test "$matrixview" = yes ; then
_vomodules="matrixview $_vomodules"
def_matrixview='#define CONFIG_MATRIXVIEW 1'
else
_novomodules="matrixview $_novomodules"
def_matrixview='#undef CONFIG_MATRIXVIEW'
fi
echores "$matrixview"
echocheck "PNG support"
if test "$_png" = auto ; then
_png=no
@ -5141,6 +5064,114 @@ fi
echores "$_sdl"
# make sure this stays below CoreVideo to avoid issues due to namespace
# conflicts between -lGL and -framework OpenGL
echocheck "OpenGL"
#Note: this test is run even with --enable-gl since we autodetect linker flags
if (test "$_x11" = yes || test "$_sdl" = yes || win32) && test "$_gl" != no ; then
cat > $TMPC << EOF
#ifdef GL_WIN32
#include <windows.h>
#include <GL/gl.h>
#elif defined(GL_SDL)
#include <GL/gl.h>
#ifdef CONFIG_SDL_SDL_H
#include <SDL/SDL.h>
#else
#include <SDL.h>
#endif
#ifndef __APPLE__
// we allow SDL hacking our main() only on OSX
#undef main
#endif
#else
#include <GL/gl.h>
#include <X11/Xlib.h>
#include <GL/glx.h>
#endif
int main(void) {
#ifdef GL_WIN32
HDC dc;
wglCreateContext(dc);
#elif defined(GL_SDL)
SDL_GL_SwapBuffers();
#else
glXCreateContext(NULL, NULL, NULL, True);
#endif
glFinish();
return 0;
}
EOF
_gl=no
for _ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
if cc_check $_ld_tmp $_ld_lm ; then
_gl=yes
_gl_x11=yes
libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl"
break
fi
done
if cc_check -DGL_WIN32 -lopengl32 ; then
_gl=yes
_gl_win32=yes
libs_mplayer="$libs_mplayer -lopengl32 -lgdi32"
fi
# last so it can reuse any linker etc. flags detected before
if test "$_sdl" = yes ; then
if cc_check -DGL_SDL ||
cc_check -DCONFIG_SDL_SDL_H -DGL_SDL ; then
_gl=yes
_gl_sdl=yes
elif cc_check -DGL_SDL -lGL ||
cc_check -DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
_gl=yes
_gl_sdl=yes
libs_mplayer="$libs_mplayer -lGL"
fi
fi
else
_gl=no
fi
if test "$_gl" = yes ; then
def_gl='#define CONFIG_GL 1'
_res_comment="backends:"
if test "$_gl_win32" = yes ; then
def_gl_win32='#define CONFIG_GL_WIN32 1'
_res_comment="$_res_comment win32"
fi
if test "$_gl_x11" = yes ; then
def_gl_x11='#define CONFIG_GL_X11 1'
_res_comment="$_res_comment x11"
fi
if test "$_gl_sdl" = yes ; then
def_gl_sdl='#define CONFIG_GL_SDL 1'
_res_comment="$_res_comment sdl"
fi
_vomodules="opengl $_vomodules"
else
def_gl='#undef CONFIG_GL'
def_gl_win32='#undef CONFIG_GL_WIN32'
def_gl_x11='#undef CONFIG_GL_X11'
def_gl_sdl='#undef CONFIG_GL_SDL'
_novomodules="opengl $_novomodules"
fi
echores "$_gl"
echocheck "MatrixView"
if test "$_gl" = no ; then
matrixview=no
fi
if test "$matrixview" = yes ; then
_vomodules="matrixview $_vomodules"
def_matrixview='#define CONFIG_MATRIXVIEW 1'
else
_novomodules="matrixview $_novomodules"
def_matrixview='#undef CONFIG_MATRIXVIEW'
fi
echores "$matrixview"
if os2 ; then
echocheck "KVA (SNAP/WarpOverlay!/DIVE)"
if test "$_kva" = auto; then
@ -7909,6 +7940,7 @@ GGI = $_ggi
GL = $_gl
GL_WIN32 = $_gl_win32
GL_X11 = $_gl_x11
GL_SDL = $_gl_sdl
MATRIXVIEW = $matrixview
HAVE_POSIX_SELECT = $_posix_select
HAVE_SYS_MMAN_H = $_mman
@ -8387,6 +8419,7 @@ $def_gif_tvt_hack
$def_gl
$def_gl_win32
$def_gl_x11
$def_gl_sdl
$def_matrixview
$def_ivtv
$def_jpeg

View File

@ -145,6 +145,7 @@ static int lavf_check_file(demuxer_t *demuxer){
lavf_priv_t *priv;
int probe_data_size = 0;
int read_size = INITIAL_PROBE_SIZE;
int score;
if(!demuxer->priv)
demuxer->priv=calloc(sizeof(lavf_priv_t),1);
@ -183,11 +184,13 @@ static int lavf_check_file(demuxer_t *demuxer){
avpd.filename += 9;
avpd.buf_size= probe_data_size;
priv->avif= av_probe_input_format(&avpd, probe_data_size > 0);
score = 0;
priv->avif= av_probe_input_format2(&avpd, probe_data_size > 0, &score);
read_size = FFMIN(2*read_size, PROBE_BUF_SIZE - probe_data_size);
} while ((demuxer->desc->type != DEMUXER_TYPE_LAVF_PREFERRED ||
probe_data_size < SMALL_MAX_PROBE_SIZE) &&
!priv->avif && read_size > 0 && probe_data_size < PROBE_BUF_SIZE);
score <= AVPROBE_SCORE_MAX / 4 &&
read_size > 0 && probe_data_size < PROBE_BUF_SIZE);
av_free(avpd.buf);
if(!priv->avif){
@ -250,7 +253,10 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
lavf_priv_t *priv= demuxer->priv;
AVStream *st= avfc->streams[i];
AVCodecContext *codec= st->codec;
char *stream_type = NULL;
int stream_id;
AVMetadataTag *lang = av_metadata_get(st->metadata, "language", NULL, 0);
AVMetadataTag *title= av_metadata_get(st->metadata, "title", NULL, 0);
int g, override_tag = mp_av_codec_get_tag(mp_codecid_override_taglists,
codec->codec_id);
// For some formats (like PCM) always trust CODEC_ID_* more than codec_tag
@ -261,12 +267,11 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
case CODEC_TYPE_AUDIO:{
WAVEFORMATEX *wf;
sh_audio_t* sh_audio;
sh_audio=new_sh_audio(demuxer, i);
mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "lavf", i);
sh_audio = new_sh_audio_aid(demuxer, i, priv->audio_streams);
if(!sh_audio)
break;
stream_type = "audio";
priv->astreams[priv->audio_streams] = i;
priv->audio_streams++;
wf= calloc(sizeof(WAVEFORMATEX) + codec->extradata_size, 1);
// mp4a tag is used for all mp4 files no matter what they actually contain
if(codec->codec_tag == MKTAG('m', 'p', '4', 'a'))
@ -318,9 +323,11 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
sh_audio->format = 0x7;
break;
}
if (title && title->value)
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_NAME=%s\n", priv->audio_streams, title->value);
if (lang && lang->value) {
sh_audio->lang = strdup(lang->value);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", i, sh_audio->lang);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", priv->audio_streams, sh_audio->lang);
}
if (st->disposition & AV_DISPOSITION_DEFAULT)
sh_audio->default_track = 1;
@ -331,16 +338,16 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
demuxer->audio->sh= demuxer->a_streams[i];
} else
st->discard= AVDISCARD_ALL;
stream_id = priv->audio_streams++;
break;
}
case CODEC_TYPE_VIDEO:{
sh_video_t* sh_video;
BITMAPINFOHEADER *bih;
sh_video=new_sh_video(demuxer, i);
mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "lavf", i);
sh_video=new_sh_video_vid(demuxer, i, priv->video_streams);
if(!sh_video) break;
stream_type = "video";
priv->vstreams[priv->video_streams] = i;
priv->video_streams++;
bih=calloc(sizeof(BITMAPINFOHEADER) + codec->extradata_size,1);
if(codec->codec_id == CODEC_ID_RAWVIDEO) {
@ -377,6 +384,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
sh_video->aspect=codec->width * codec->sample_aspect_ratio.num
/ (float)(codec->height * codec->sample_aspect_ratio.den);
sh_video->i_bps=codec->bit_rate/8;
if (title && title->value)
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_NAME=%s\n", priv->video_streams, title->value);
mp_msg(MSGT_DEMUX,MSGL_DBG2,"aspect= %d*%d/(%d*%d)\n",
codec->width, codec->sample_aspect_ratio.num,
codec->height, codec->sample_aspect_ratio.den);
@ -398,6 +407,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
demuxer->video->id = i;
demuxer->video->sh= demuxer->v_streams[i];
}
stream_id = priv->video_streams++;
break;
}
case CODEC_TYPE_SUBTITLE:{
@ -417,8 +427,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
else
break;
sh_sub = new_sh_sub_sid(demuxer, i, priv->sub_streams);
mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Subtitle stream found, -sid %d\n", "lavf", priv->sub_streams);
if(!sh_sub) break;
stream_type = "subtitles";
priv->sstreams[priv->sub_streams] = i;
sh_sub->type = type;
if (codec->extradata_size) {
@ -426,13 +436,15 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
memcpy(sh_sub->extradata, codec->extradata, codec->extradata_size);
sh_sub->extradata_len = codec->extradata_size;
}
if (title && title->value)
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_NAME=%s\n", priv->sub_streams, title->value);
if (lang && lang->value) {
sh_sub->lang = strdup(lang->value);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", priv->sub_streams, sh_sub->lang);
}
if (st->disposition & AV_DISPOSITION_DEFAULT)
sh_sub->default_track = 1;
priv->sub_streams++;
stream_id = priv->sub_streams++;
break;
}
case CODEC_TYPE_ATTACHMENT:{
@ -445,6 +457,15 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
default:
st->discard= AVDISCARD_ALL;
}
if (stream_type) {
AVCodec *avc = avcodec_find_decoder(codec->codec_id);
mp_msg(MSGT_DEMUX, MSGL_INFO, "[lavf] stream %d: %s (%s), -%cid %d", i, stream_type, avc ? avc->name : "unknown", *stream_type, stream_id);
if (lang && lang->value && *stream_type != 'v')
mp_msg(MSGT_DEMUX, MSGL_INFO, ", -%clang %s", *stream_type, lang->value);
if (title && title->value)
mp_msg(MSGT_DEMUX, MSGL_INFO, ", %s", title->value);
mp_msg(MSGT_DEMUX, MSGL_INFO, "\n");
}
}
static demuxer_t* demux_open_lavf(demuxer_t *demuxer){
@ -709,13 +730,9 @@ static int demux_lavf_control(demuxer_t *demuxer, int cmd, void *arg)
}
else // select track by id
{
for(i = 0; i < nstreams; i++)
{
if(pstreams[i] == id)
{
newid = id;
break;
}
if (id >= 0 && id < nstreams) {
i = id;
newid = pstreams[i];
}
}
if(i == curridx)

View File

@ -134,12 +134,17 @@ void rtpCodecInitialize_video(demuxer_t* demuxer,
unsigned char* configData
= parseH264ConfigStr(subsession->fmtp_spropparametersets(), configLen);
sh_video->bih = bih = insertVideoExtradata(bih, configData, configLen);
delete[] configData;
#ifdef CONFIG_LIBAVCODEC
int fooLen;
const uint8_t* fooData;
avcodec_register_all();
h264parserctx = av_parser_init(CODEC_ID_H264);
avcctx = avcodec_alloc_context();
// Pass the config to the parser
h264parserctx->parser->parser_parse(h264parserctx, avcctx,
&fooData, &fooLen, configData, configLen);
#endif
delete[] configData;
needVideoFrameRate(demuxer, subsession);
} else if (strcmp(subsession->codecName(), "H261") == 0) {
bih->biCompression = sh_video->format

View File

@ -30,20 +30,16 @@
#ifdef CONFIG_GL_WIN32
#include <windows.h>
#include <GL/gl.h>
#include "w32_common.h"
#endif
#ifdef CONFIG_GL_X11
#include <GL/gl.h>
#include <X11/Xlib.h>
#include <GL/glx.h>
#include "x11_common.h"
// This old-vo wrapper macro would conflict with the struct member
#undef update_xinerama_info
#endif
#ifdef CONFIG_GL_SDL
#include <GL/gl.h>
#endif
// workaround for some gl.h headers
#ifndef GLAPIENTRY

View File

@ -280,7 +280,7 @@ static void update_yuvconv(void) {
texture_width, texture_height);
}
if (custom_tex) {
FILE *f = fopen(custom_tex, "r");
FILE *f = fopen(custom_tex, "rb");
if (!f)
mp_msg(MSGT_VO, MSGL_WARN,
"[gl] Could not read customtex %s\n", custom_tex);
@ -493,9 +493,10 @@ static void autodetectGlExtensions(void) {
const char *extensions = mpglGetString(GL_EXTENSIONS);
const char *vendor = mpglGetString(GL_VENDOR);
const char *version = mpglGetString(GL_VERSION);
const char *renderer = mpglGetString(GL_RENDERER);
int is_ati = vendor && strstr(vendor, "ATI") != NULL;
int ati_broken_pbo = 0;
mp_msg(MSGT_VO, MSGL_V, "[gl] Running on OpenGL by '%s', versions '%s'\n", vendor, version);
mp_msg(MSGT_VO, MSGL_V, "[gl] Running on OpenGL '%s' by '%s', version '%s'\n", renderer, vendor, version);
if (is_ati && strncmp(version, "2.1.", 4) == 0) {
int ver = atoi(version + 4);
mp_msg(MSGT_VO, MSGL_V, "[gl] Detected ATI driver version: %i\n", ver);