diff options
41 files changed, 1389 insertions, 435 deletions
diff --git a/.gitignore b/.gitignore index 45b6ab2b9b..56bc6b1fa6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ /config.mak /config.log /mpv +/mpv.app /version.h /codecs.conf.h /input/input_conf.h @@ -278,7 +278,7 @@ COMMON_LIBS += $(COMMON_LIBS-yes) OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON))) OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER))) -OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o +OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mpv-rc.o OBJS_MPLAYER += $(OBJS_MPLAYER-yes) MPLAYER_DEPS = $(OBJS_MPLAYER) $(OBJS_COMMON) $(COMMON_LIBS) @@ -406,9 +406,9 @@ checkheaders: $(ALLHEADERS:.h=.ho) ###### dependency declarations / specific CFLAGS ###### -version.c osdep/mplayer-rc.o: version.h +version.c osdep/mpv-rc.o: version.h -osdep/mplayer-rc.o: osdep/mplayer.exe.manifest +osdep/mpv-rc.o: osdep/mpv.exe.manifest ###### installation / clean / generic rules ####### @@ -481,6 +481,9 @@ TAGS: tags: $(RM) $@; find . -name '*.[chS]' -o -name '*.asm' | xargs ctags -a +osxbundle: + @TOOLS/osxbundle.py mpv + -include $(DEP_FILES) .PHONY: all locales *install* diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py new file mode 100755 index 0000000000..9f2f29d88b --- /dev/null +++ b/TOOLS/osxbundle.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python + +import os +import re +import shutil +import sys + +def sh(command): + return os.popen(command).read() + +def dylib_lst(input_file): + return sh("otool -L %s | grep -e '\t' | awk '{ print $1 }'" % input_file) + +sys_re = re.compile("/System") +exe_re = re.compile("@executable_path") +binary_name = sys.argv[1] + +def is_user_lib(libname, input_file): + return not sys_re.match(libname) and \ + not exe_re.match(libname) and \ + not "libobjc" in libname and \ + not "libSystem" in libname and \ + not "libgcc" in libname and \ + not os.path.basename(input_file) in libname and \ + not libname == '' + +def user_dylib_lst(input_file): + return [lib for lib in dylib_lst(input_file).split("\n") if + is_user_lib(lib, input_file)] + +def bundle_name(): + return "%s.app" % binary_name + +def target_plist(): + return os.path.join(bundle_name(), 'Contents', 'Info.plist') + +def target_directory(): + return os.path.join(bundle_name(), 'Contents', 'MacOS') + +def target_binary(): + return os.path.join(target_directory(), binary_name) + +def copy_bundle(): + if os.path.isdir(bundle_name()): + shutil.rmtree(bundle_name()) + shutil.copytree( + os.path.join('TOOLS', 'osxbundle', bundle_name()), + bundle_name()) + +def copy_binary(): + shutil.copy(binary_name, target_binary()) + +def run_install_name_tool(target_file, dylib_path, destination_directory): + new_dylib_path = os.path.join("@executable_path", "lib", + os.path.basename(dylib_path)) + + sh("install_name_tool -change %s %s %s" % \ + (dylib_path, new_dylib_path, target_file)) + sh("install_name_tool -id %s %s" % \ + (new_dylib_path, os.path.join(destination_directory, + os.path.basename(dylib_path)))) + +def cp_dylibs(target_file, destination_directory): + for dylib_path in user_dylib_lst(target_file): + dylib_destination_path = os.path.join(destination_directory, + os.path.basename(dylib_path)) + shutil.copy(dylib_path, dylib_destination_path) + os.chmod(dylib_destination_path, 0o755) + cp_dylibs(dylib_destination_path, destination_directory) + +def fix_dylibs_paths(target_file, destination_directory): + for dylib_path in user_dylib_lst(target_file): + dylib_destination_path = os.path.join(destination_directory, + os.path.basename(dylib_path)) + run_install_name_tool(target_file, dylib_path, destination_directory) + fix_dylibs_paths(dylib_destination_path, destination_directory) + +def apply_plist_template(plist_file, version): + sh("sed -i -e 's/{{VERSION}}/%s/g' %s" % (version, plist_file)) + +version = sh("TOOLS/osxbundle/version.sh").strip() + +print("Creating Mac OS X application bundle (version: %s)..." % version) + +copy_bundle() +copy_binary() +apply_plist_template(target_plist(), version) +cp_dylibs(sys.argv[1], os.path.join(target_directory(), "lib")) +fix_dylibs_paths(target_binary(), os.path.join(target_directory(), "lib")) diff --git a/TOOLS/osxbundle/mpv.app/Contents/Info.plist b/TOOLS/osxbundle/mpv.app/Contents/Info.plist new file mode 100644 index 0000000000..472542fe92 --- /dev/null +++ b/TOOLS/osxbundle/mpv.app/Contents/Info.plist @@ -0,0 +1,248 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + <dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleDocumentTypes</key> + <array> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>AAC</string> + <string>AC3</string> + <string>AIFF</string> + <string>M4A</string> + <string>MKA</string> + <string>MP3</string> + <string>OGG</string> + <string>PCM</string> + <string>VAW</string> + <string>WAV</string> + <string>WAW</string> + <string>WMA</string> + <string>aac</string> + <string>ac3</string> + <string>aiff</string> + <string>m4a</string> + <string>mka</string> + <string>mp3</string> + <string>ogg</string> + <string>pcm</string> + <string>vaw</string> + <string>wav</string> + <string>waw</string> + <string>wma</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>audio.icns</string> + <key>CFBundleTypeName</key> + <string>Audio file</string> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSTypeIsPackage</key> + <false/> + <key>NSPersistentStoreTypeKey</key> + <string>XML</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>*</string> + <string>*</string> + <string>3GP</string> + <string>3IV</string> + <string>3gp</string> + <string>3iv</string> + <string>ASF</string> + <string>AVI</string> + <string>CPK</string> + <string>DAT</string> + <string>DIVX</string> + <string>DV</string> + <string>FLAC</string> + <string>FLI</string> + <string>FLV</string> + <string>H264</string> + <string>I263</string> + <string>M2TS</string> + <string>M4V</string> + <string>MKV</string> + <string>MOV</string> + <string>MP2</string> + <string>MP4</string> + <string>MPEG</string> + <string>MPG</string> + <string>MPG2</string> + <string>MPG4</string> + <string>NSV</string> + <string>NUT</string> + <string>NUV</string> + <string>OGG</string> + <string>OGM</string> + <string>QT</string> + <string>RM</string> + <string>RMVB</string> + <string>VCD</string> + <string>VFW</string> + <string>VOB</string> + <string>WMV</string> + <string>asf</string> + <string>avi</string> + <string>cpk</string> + <string>dat</string> + <string>divx</string> + <string>dv</string> + <string>flac</string> + <string>fli</string> + <string>flv</string> + <string>h264</string> + <string>i263</string> + <string>m2ts</string> + <string>m4v</string> + <string>mkv</string> + <string>mov</string> + <string>mp2</string> + <string>mp4</string> + <string>mpeg</string> + <string>mpg</string> + <string>mpg2</string> + <string>mpg4</string> + <string>nsv</string> + <string>nut</string> + <string>nuv</string> + <string>ogg</string> + <string>ogm</string> + <string>qt</string> + <string>rm</string> + <string>rmvb</string> + <string>vcd</string> + <string>vfw</string> + <string>vob</string> + <string>wmv</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>movie.icns</string> + <key>CFBundleTypeName</key> + <string>Movie file</string> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSTypeIsPackage</key> + <false/> + <key>NSPersistentStoreTypeKey</key> + <string>XML</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>AQT</string> + <string>ASS</string> + <string>JSS</string> + <string>RT</string> + <string>SMI</string> + <string>SRT</string> + <string>SSA</string> + <string>SUB</string> + <string>TXT</string> + <string>UTF</string> + <string>aqt</string> + <string>ass</string> + <string>jss</string> + <string>rt</string> + <string>smi</string> + <string>srt</string> + <string>ssa</string> + <string>sub</string> + <string>txt</string> + <string>utf</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>subtitles.icns</string> + <key>CFBundleTypeName</key> + <string>Subtitles file</string> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSTypeIsPackage</key> + <false/> + <key>NSPersistentStoreTypeKey</key> + <string>XML</string> + </dict> + </array> + <key>CFBundleExecutable</key> + <string>mpv</string> + <key>CFBundleIconFile</key> + <string>icon</string> + <key>CFBundleIdentifier</key> + <string>org.mpv-player.standalone</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>mpv</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>{{VERSION}}</string> + <key>NSHighResolutionCapable</key> + <true/> + <key>CFBundleURLTypes</key> + <array> + <dict> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>CFBundleURLName</key> + <string>Real Time (Streaming) Protocol</string> + <key>CFBundleURLSchemes</key> + <array> + <string>rtp</string> + <string>rtsp</string> + </array> + </dict> + <dict> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>CFBundleURLName</key> + <string>File over HTTP/FTP/UDP</string> + <key>CFBundleURLSchemes</key> + <array> + <string>icyx</string> + <string>udp</string> + <string>ftp</string> + <string>http_proxy</string> + <string>http</string> + </array> + </dict> + <dict> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>CFBundleURLName</key> + <string>Microsoft Media Services</string> + <key>CFBundleURLSchemes</key> + <array> + <string>mms</string> + </array> + </dict> + <dict> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>CFBundleURLName</key> + <string>Cuesheet</string> + <key>CFBundleURLSchemes</key> + <array> + <string>cue</string> + </array> + </dict> + <dict> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>CFBundleURLName</key> + <string>CD/DVD Media</string> + <key>CFBundleURLSchemes</key> + <array> + <string>dvdnav</string> + <string>dvd</string> + <string>vcd</string> + </array> + </dict> + </array> + </dict> +</plist> diff --git a/TOOLS/osxbundle/mpv.app/Contents/MacOS/.gitkeep b/TOOLS/osxbundle/mpv.app/Contents/MacOS/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/TOOLS/osxbundle/mpv.app/Contents/MacOS/.gitkeep diff --git a/TOOLS/osxbundle/mpv.app/Contents/MacOS/lib/.gitkeep b/TOOLS/osxbundle/mpv.app/Contents/MacOS/lib/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/TOOLS/osxbundle/mpv.app/Contents/MacOS/lib/.gitkeep diff --git a/TOOLS/osxbundle/mpv.app/Contents/PkgInfo b/TOOLS/osxbundle/mpv.app/Contents/PkgInfo new file mode 100644 index 0000000000..bd04210fb4 --- /dev/null +++ b/TOOLS/osxbundle/mpv.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL????
\ No newline at end of file diff --git a/TOOLS/osxbundle/mpv.app/Contents/Resources/audio.icns b/TOOLS/osxbundle/mpv.app/Contents/Resources/audio.icns Binary files differnew file mode 100644 index 0000000000..239b9bab12 --- /dev/null +++ b/TOOLS/osxbundle/mpv.app/Contents/Resources/audio.icns diff --git a/TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns b/TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns Binary files differnew file mode 100644 index 0000000000..eb056f5a15 --- /dev/null +++ b/TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns diff --git a/TOOLS/osxbundle/mpv.app/Contents/Resources/movie.icns b/TOOLS/osxbundle/mpv.app/Contents/Resources/movie.icns Binary files differnew file mode 100644 index 0000000000..8c495894a4 --- /dev/null +++ b/TOOLS/osxbundle/mpv.app/Contents/Resources/movie.icns diff --git a/TOOLS/osxbundle/mpv.app/Contents/Resources/subtitles.icns b/TOOLS/osxbundle/mpv.app/Contents/Resources/subtitles.icns Binary files differnew file mode 100644 index 0000000000..f4c7270691 --- /dev/null +++ b/TOOLS/osxbundle/mpv.app/Contents/Resources/subtitles.icns diff --git a/TOOLS/osxbundle/version.sh b/TOOLS/osxbundle/version.sh new file mode 100755 index 0000000000..ff6bb1b5fd --- /dev/null +++ b/TOOLS/osxbundle/version.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Extract revision number from file used by daily tarball snapshots +# or from "git describe" output +git_revision=$(cat snapshot_version 2> /dev/null) +test $git_revision || test ! -d .git || \ +git_revision=`git describe --match "v[0-9]*" --always` +git_revision=$(expr "$git_revision" : v*'\(.*\)') +test $git_revision || git_revision=UNKNOWN + +# releases extract the version number from the VERSION file +version=$(cat VERSION 2> /dev/null) +test $version || version=$git_revision + +echo $version @@ -1980,10 +1980,10 @@ int main(void) { } EOF _cocoa=no - cc_check -framework Cocoa -framework OpenGL && _cocoa=yes + cc_check -framework IOKit -framework Cocoa -framework OpenGL && _cocoa=yes fi if test "$_cocoa" = yes ; then - libs_mplayer="$libs_mplayer -framework Cocoa -framework OpenGL" + libs_mplayer="$libs_mplayer -framework IOKit -framework Cocoa -framework OpenGL" def_cocoa='#define CONFIG_COCOA 1' else def_cocoa='#undef CONFIG_COCOA' diff --git a/etc/codecs.conf b/etc/codecs.conf index ab9267c5a9..9d4e8c9e0c 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -732,6 +732,22 @@ videocodec ffh264crystalhd driver ffmpeg dll h264_crystalhd +videocodec ffh264vda + info "FFmpeg H.264 (VDA)" + status working + fourcc H264,h264 + fourcc X264,x264 + fourcc avc1,AVC1 + fourcc davc,DAVC + fourcc vvvc ; only one sample using this fourcc + fourcc ai55,ai15 ; flip4mac avc intra + fourcc ai1q,ai5q ; flip4mac avc intra + fourcc ai12 ;AVC Intra 100 / 1080 + format 0x10000005 + driver ffmpeg + dll h264_vda + out YUY2,UYVY,YV12,NV12 + videocodec ffsvq3 info "FFmpeg Sorenson Video v3 (SVQ3)" status working diff --git a/etc/mpv-icon-source.svg b/etc/mpv-icon-source.svg new file mode 100644 index 0000000000..6d0453bc5f --- /dev/null +++ b/etc/mpv-icon-source.svg @@ -0,0 +1,556 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="512" + height="512" + id="svg2985" + version="1.1" + inkscape:version="0.48.2 r9819" + sodipodi:docname="icon-mplayer3.svg" + inkscape:export-filename="/Users/pigoz/Documents/mplayer-icons/compiled/icon-mplayer2.png" + inkscape:export-xdpi="85.699997" + inkscape:export-ydpi="85.699997" + enable-background="new"> + <defs + id="defs2987"> + <linearGradient + id="linearGradient5632"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop5634" /> + <stop + style="stop-color:#646464;stop-opacity:1;" + offset="1" + id="stop5636" /> + </linearGradient> + <linearGradient + id="linearGradient3979"> + <stop + style="stop-color:#d2d2d2;stop-opacity:1;" + offset="0" + id="stop3981" /> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="1" + id="stop3983" /> + </linearGradient> + <linearGradient + id="linearGradient3877"> + <stop + style="stop-color:#3cc8ff;stop-opacity:1;" + offset="0" + id="stop3879" /> + <stop + id="stop3885" + offset="1" + style="stop-color:#14b4ff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient3857" + osb:paint="solid"> + <stop + style="stop-color:#03062a;stop-opacity:1;" + offset="0" + id="stop3859" /> + </linearGradient> + <linearGradient + id="linearGradient3943"> + <stop + id="stop3772" + offset="0" + style="stop-color:#44c8fd;stop-opacity:1;" /> + <stop + style="stop-color:#284aef;stop-opacity:1;" + offset="0.46829268" + id="stop3788" /> + <stop + style="stop-color:#06082a;stop-opacity:1;" + offset="1" + id="stop3947" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3877" + id="radialGradient3929" + gradientUnits="userSpaceOnUse" + cx="256.71875" + cy="256.15625" + fx="256.71875" + fy="256.15625" + r="235" + gradientTransform="translate(6.6751888,0)" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3877" + id="radialGradient3932" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(6.6751888,0)" + cx="256.71875" + cy="256.15625" + fx="256.71875" + fy="256.15625" + r="235" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3979" + id="linearGradient3924" + x1="256.12192" + y1="491.25339" + x2="256.12192" + y2="11.186499" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3943" + id="radialGradient3943" + cx="227.08333" + cy="218.25" + fx="227.08333" + fy="218.25" + r="197.08333" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3877" + id="radialGradient3964" + gradientUnits="userSpaceOnUse" + cx="258.69565" + cy="381.56522" + fx="258.69565" + fy="381.56522" + r="169.56522" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3979-0" + id="linearGradient3985" + x1="259.45453" + y1="256.90909" + x2="259.45453" + y2="38.000004" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,2)" /> + <linearGradient + id="linearGradient3979-0"> + <stop + style="stop-color:#ffffff;stop-opacity:0.01960784;" + offset="0" + id="stop3981-1" /> + <stop + style="stop-color:#ffffff;stop-opacity:0.86274511;" + offset="1" + id="stop3983-0" /> + </linearGradient> + <linearGradient + y2="38.000004" + x2="259.45453" + y1="256.90909" + x1="259.45453" + gradientTransform="translate(0,2)" + gradientUnits="userSpaceOnUse" + id="linearGradient4907" + xlink:href="#linearGradient3979-0" + inkscape:collect="always" /> + <filter + inkscape:collect="always" + id="filter5485"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="6.7826086" |