<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[153258] trunk/dports/multimedia/mpv</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/153258">153258</a></dd>
<dt>Author</dt> <dd>ionic@macports.org</dd>
<dt>Date</dt> <dd>2016-09-28 01:32:48 -0700 (Wed, 28 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>multimedia/mpv: update to 0.20.0. Fixes: #52114.
Changes:
- Drop dependency upon ossp-uuid. Was probably unneeded to begin with.
- Update sample config file - some options were renamed or removed.
- Refresh and rework patches, mostly more generic now. Use
MAC_OS_X_VERSION_MAX_ALLOWED instead of MAC_OS_X_VERSION_MIN_REQUIRED.
- Add new patches (sadly, supporting OS X 10.7 and below is becoming
increasingly difficult.)</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsmultimediampvPortfile">trunk/dports/multimedia/mpv/Portfile</a></li>
<li><a href="#trunkdportsmultimediampvfilesconfigmaintainer">trunk/dports/multimedia/mpv/files/config-maintainer</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchosdep_macosx_compatmaddsubscriptingimplementationdiff">trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_commonmdefineconstantsdiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_commonmportlightsensordiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-port-lightsensor.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_events_viewhremoveNSDraggingDestinationprotocoldiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.h-remove-NSDraggingDestination-protocol.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_events_viewmreplaceconvertPointToBackingwithuserSpaceScaleFactordiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.m-replace-convertPointToBacking-with-userSpaceScaleFactor.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_events_viewmreplaceconvertRectFromScreenwithconvertScreenToBasediff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.m-replace-convertRectFromScreen-with-convertScreenToBase.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_video_viewmreplaceconvertRectToBackingwithuserSpaceScaleFactordiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_video_view.m-replace-convertRectToBacking-with-userSpaceScaleFactor.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_windowmfullscreenfixesdiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_window.m-fullscreen-fixes.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_opengl_commonchideGL320sectiondiff">trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.c-hide-GL320-section.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_opengl_commonhguardGL3stuffdiff">trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.h-guard-GL3-stuff.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_opengl_context_cocoachardcodeOpenGL2diff">trunk/dports/multimedia/mpv/files/patch-video_out_opengl_context_cocoa.c-hardcode-OpenGL-2.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_vo_openglcguardGL3andbackportoldbehaviordiff">trunk/dports/multimedia/mpv/files/patch-video_out_vo_opengl.c-guard-GL3-and-backport-old-behavior.diff</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_opengl_commonchideGL3timerfunctionsdiff">trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.c-hide-GL3-timer-functions.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_opengl_utilschidepbotextureuploaddiff">trunk/dports/multimedia/mpv/files/patch-video_out_opengl_utils.c-hide-pbo-texture-upload.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_opengl_videocfixcompilewarningsdiff">trunk/dports/multimedia/mpv/files/patch-video_out_opengl_video.c-fix-compile-warnings.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_opengl_videocremovetimerfunctionalitydiff">trunk/dports/multimedia/mpv/files/patch-video_out_opengl_video.c-remove-timer-functionality.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsmultimediampvPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/Portfile (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/Portfile        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/Portfile        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -6,8 +6,8 @@
</span><span class="cx"> PortGroup waf 1.0
</span><span class="cx">
</span><span class="cx"> # Please revbump mpv whenever ffmpeg{,-devel} is updated!
</span><del>-github.setup mpv-player mpv 0.17.0 v
-revision 3
</del><ins>+github.setup mpv-player mpv 0.20.0 v
+revision 0
</ins><span class="cx"> categories multimedia
</span><span class="cx"> license GPL-2+
</span><span class="cx"> maintainers ionic
</span><span class="lines">@@ -31,8 +31,8 @@
</span><span class="cx"> extract.only-delete ${waf_distfile}
</span><span class="cx">
</span><span class="cx"> checksums ${mpv_distfile} \
</span><del>- rmd160 67eba1820d4dc287bbdcba344aa5278417922c12 \
- sha256 9c3a6f35153e270066299d70cb0049a9868b9e2b6631dcaeb80d1ce255152042 \
</del><ins>+ rmd160 41466df9f6aa69eb31dcd1651b14def189b782da \
+ sha256 1a8a98cf4785206fa27387f752af0bdc1e303fe2e0a5d5be306123c6151ced08 \
</ins><span class="cx"> ${waf_distfile} \
</span><span class="cx"> rmd160 bb1dcd10a0c336a5497bb1247a301c27f997078c \
</span><span class="cx"> sha256 01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b
</span><span class="lines">@@ -44,8 +44,7 @@
</span><span class="cx"> port:zlib \
</span><span class="cx"> port:libass \
</span><span class="cx"> port:libbluray \
</span><del>- port:lcms2 \
- port:ossp-uuid
</del><ins>+ port:lcms2
</ins><span class="cx">
</span><span class="cx"> universal_variant no
</span><span class="cx">
</span><span class="lines">@@ -101,7 +100,8 @@
</span><span class="cx"> --disable-jpeg \
</span><span class="cx"> --disable-tv \
</span><span class="cx"> --disable-lua \
</span><del>- --disable-apple-remote
</del><ins>+ --disable-apple-remote \
+ --disable-gl
</ins><span class="cx">
</span><span class="cx"> # Fix picking up the correct talloc version.
</span><span class="cx"> # -isystem has the added benefit of moving the include
</span><span class="lines">@@ -207,16 +207,17 @@
</span><span class="cx"> patch-video_out_cocoa_common.m-define-constants.diff \
</span><span class="cx"> patch-video_out_cocoa_common.m-port-lightsensor.diff \
</span><span class="cx"> patch-video_out_opengl_context_cocoa.c-hardcode-OpenGL-2.diff \
</span><ins>+ patch-video_out_opengl_video.c-fix-compile-warnings.diff \
</ins><span class="cx"> patch-osdep_macosx_compat.h-fix-YES-NO-macro-warnings.diff \
</span><span class="cx"> patch-osdep_macosx_compat.m-add-subscripting-implementation.diff \
</span><span class="cx"> patch-audio_out_ao_coreaudio_utils.c-add-missing-header-for-getpid.diff \
</span><span class="cx"> patch-video_out_opengl_common.h-guard-GL3-stuff.diff \
</span><span class="cx"> patch-video_out_vo_opengl.c-guard-GL3-and-backport-old-behavior.diff \
</span><del>- patch-video_out_opengl_common.c-hide-GL320-section.diff
</del><ins>+ patch-video_out_opengl_common.c-hide-GL320-section.diff \
+ patch-video_out_opengl_common.c-hide-GL3-timer-functions.diff \
+ patch-video_out_opengl_video.c-remove-timer-functionality.diff \
+ patch-video_out_opengl_utils.c-hide-pbo-texture-upload.diff
</ins><span class="cx">
</span><del>- # Let's hope this is actually unneeded...
- #patch-video_out_cocoa_common.m-use-deprecated-ColorSync-functions.diff
-
</del><span class="cx"> notes-append {
</span><span class="cx"> On systems older than Lion (10.7), Cocoa output support is currently \
</span><span class="cx"> being patched by the MacPorts maintainer to make it work.
</span><span class="lines">@@ -417,6 +418,8 @@
</span><span class="cx"> variant opengl description {Enable glx output support. Both the CoreVideo and X11 outputs are supported} {
</span><span class="cx"> configure.args-replace --disable-gl-cocoa \
</span><span class="cx"> --enable-gl-cocoa
</span><ins>+ configure.args-replace --disable-gl \
+ --enable-gl
</ins><span class="cx">
</span><span class="cx"> if {[variant_isset x11]} {
</span><span class="cx"> depends_lib-append port:mesa
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilesconfigmaintainer"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/config-maintainer (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/config-maintainer        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/config-maintainer        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -8,8 +8,7 @@
</span><span class="cx">
</span><span class="cx"> af=scaletempo
</span><span class="cx">
</span><del>-softvol=yes
-softvol-max=800
</del><ins>+volume-max=800
</ins><span class="cx">
</span><span class="cx"> framedrop=vo
</span><span class="cx">
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchosdep_macosx_compatmaddsubscriptingimplementationdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> +
</span><span class="cx"> +#include "osdep/macosx_compat.h"
</span><span class="cx"> +
</span><del>-+#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8)
</del><ins>++#if !defined (MAC_OS_X_VERSION_10_8) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8)
</ins><span class="cx"> +
</span><span class="cx"> +@implementation NSArray (SubscriptingAdditions)
</span><span class="cx"> +- (id)objectAtIndexedSubscript:(NSUInteger)index
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> +#endif
</span><span class="cx"> --- wscript_build.py.orig
</span><span class="cx"> +++ wscript_build.py
</span><del>-@@ -394,6 +394,7 @@ def build(ctx):
</del><ins>+@@ -391,6 +391,7 @@ def build(ctx):
</ins><span class="cx"> ( "osdep/ar/HIDRemote.m", "apple-remote" ),
</span><span class="cx"> ( "osdep/macosx_application.m", "cocoa" ),
</span><span class="cx"> ( "osdep/macosx_events.m", "cocoa" ),
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_commonmdefineconstantsdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,7 +1,15 @@
</span><span class="cx"> --- video/out/cocoa_common.m.orig
</span><span class="cx"> +++ video/out/cocoa_common.m
</span><del>-@@ -50,6 +50,11 @@
</del><ins>+@@ -23,6 +23,7 @@
+ #import <AppKit/AppKit.h>
+ #include <mach/mach.h>
+ #import <CoreVideo/CoreVideo.h>
++#import <AvailabilityMacros.h>
</ins><span class="cx">
</span><ins>+ #import "cocoa_common.h"
+ #import "video/out/cocoa/window.h"
+@@ -50,6 +51,11 @@
+
</ins><span class="cx"> #include "common/msg.h"
</span><span class="cx">
</span><span class="cx"> +/* not used on OS X < 10.8 */
</span><span class="lines">@@ -9,6 +17,6 @@
</span><span class="cx"> +#define kIOPMAssertionTypePreventUserIdleDisplaySleep CFSTR("PreventUserIdleDisplaySleep")
</span><span class="cx"> +#endif
</span><span class="cx"> +
</span><del>- static int vo_cocoa_fullscreen(struct vo *vo);
- static void cocoa_rm_fs_screen_profile_observer(struct vo_cocoa_state *s);
- static void cocoa_add_screen_reconfiguration_observer(struct vo *vo);
</del><ins>+ static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now,
+ const CVTimeStamp* outputTime, CVOptionFlags flagsIn,
+ CVOptionFlags* flagsOut, void* displayLinkContext);
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_commonmportlightsensordiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-port-lightsensor.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-port-lightsensor.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-port-lightsensor.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,26 +1,20 @@
</span><span class="cx"> --- video/out/cocoa_common.m.orig
</span><span class="cx"> +++ video/out/cocoa_common.m
</span><del>-@@ -23,6 +23,7 @@
- #import <AppKit/AppKit.h>
- #include <mach/mach.h>
- #import <CoreVideo/CoreVideo.h>
-+#import <AvailabilityMacros.h>
-
- #import "cocoa_common.h"
- #import "video/out/cocoa/window.h"
-@@ -87,6 +88,7 @@ struct vo_cocoa_state {
</del><ins>+@@ -91,6 +91,9 @@ struct vo_cocoa_state {
</ins><span class="cx"> uint64_t last_lmuvalue;
</span><span class="cx"> int last_lux;
</span><span class="cx"> IONotificationPortRef light_sensor_io_port;
</span><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
</ins><span class="cx"> + CFRunLoopSourceRef light_sensor_notify_rl_source;
</span><ins>++#endif
</ins><span class="cx">
</span><span class="cx"> struct mp_log *log;
</span><span class="cx">
</span><del>-@@ -230,8 +232,18 @@ static void cocoa_init_light_sensor(stru
</del><ins>+@@ -232,8 +235,18 @@ static void cocoa_init_light_sensor(stru
</ins><span class="cx">
</span><span class="cx"> // subscribe to notifications from the light sensor driver
</span><span class="cx"> s->light_sensor_io_port = IONotificationPortCreate(kIOMasterPortDefault);
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> IONotificationPortSetDispatchQueue(
</span><span class="cx"> s->light_sensor_io_port, dispatch_get_main_queue());
</span><span class="cx"> +#else
</span><span class="lines">@@ -35,14 +29,16 @@
</span><span class="cx">
</span><span class="cx"> io_object_t n;
</span><span class="cx"> IOServiceAddInterestNotification(
</span><del>-@@ -253,6 +265,11 @@ static void cocoa_init_light_sensor(stru
</del><ins>+@@ -255,6 +268,13 @@ static void cocoa_init_light_sensor(stru
</ins><span class="cx"> static void cocoa_uninit_light_sensor(struct vo_cocoa_state *s)
</span><span class="cx"> {
</span><span class="cx"> if (s->light_sensor_io_port) {
</span><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
</ins><span class="cx"> + if (s->light_sensor_notify_rl_source) {
</span><span class="cx"> + CFRunLoopSourceInvalidate (s->light_sensor_notify_rl_source);
</span><span class="cx"> + s->light_sensor_notify_rl_source = NULL;
</span><span class="cx"> + }
</span><ins>++#endif
</ins><span class="cx"> +
</span><span class="cx"> IONotificationPortDestroy(s->light_sensor_io_port);
</span><span class="cx"> IOObjectRelease(s->light_sensor);
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_events_viewhremoveNSDraggingDestinationprotocoldiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.h-remove-NSDraggingDestination-protocol.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.h-remove-NSDraggingDestination-protocol.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.h-remove-NSDraggingDestination-protocol.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,11 +1,17 @@
</span><span class="cx"> --- video/out/cocoa/events_view.h.orig
</span><span class="cx"> +++ video/out/cocoa/events_view.h
</span><del>-@@ -18,7 +18,7 @@
</del><ins>+@@ -16,9 +16,13 @@
+ */
+
</ins><span class="cx"> #import <Cocoa/Cocoa.h>
</span><ins>++#import <AvailabilityMacros.h>
</ins><span class="cx"> #import "video/out/cocoa/mpvadapter.h"
</span><span class="cx">
</span><span class="cx"> -@interface MpvEventsView : NSView <NSDraggingDestination>
</span><span class="cx"> +@interface MpvEventsView : NSView
</span><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
++ <NSDraggingDestination>
++#endif
</ins><span class="cx"> @property(nonatomic, retain) MpvCocoaAdapter *adapter;
</span><span class="cx"> - (void)setFullScreen:(BOOL)willBeFullscreen;
</span><span class="cx"> - (void)clear;
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_events_viewmreplaceconvertPointToBackingwithuserSpaceScaleFactordiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.m-replace-convertPointToBacking-with-userSpaceScaleFactor.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.m-replace-convertPointToBacking-with-userSpaceScaleFactor.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.m-replace-convertPointToBacking-with-userSpaceScaleFactor.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,13 +1,15 @@
</span><span class="cx"> --- video/out/cocoa/events_view.m.orig
</span><span class="cx"> +++ video/out/cocoa/events_view.m
</span><del>-@@ -205,7 +205,9 @@
</del><ins>+@@ -208,7 +208,12 @@
</ins><span class="cx"> - (NSPoint)convertPointToPixels:(NSPoint)point
</span><span class="cx"> {
</span><span class="cx"> point = [self convertPoint:point fromView:nil];
</span><del>-- point = [self convertPointToBacking:point];
</del><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ point = [self convertPointToBacking:point];
++#else
</ins><span class="cx"> + CGFloat scale_factor = [self.window userSpaceScaleFactor];
</span><del>-+ //point = [self convertPointToBacking:point];
</del><span class="cx"> + point = NSMakePoint (point.x * scale_factor, point.y * scale_factor);
</span><ins>++#endif
</ins><span class="cx"> // flip y since isFlipped returning YES doesn't affect the backing
</span><span class="cx"> // coordinate system
</span><span class="cx"> point.y = -point.y;
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_events_viewmreplaceconvertRectFromScreenwithconvertScreenToBasediff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.m-replace-convertRectFromScreen-with-convertScreenToBase.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.m-replace-convertRectFromScreen-with-convertScreenToBase.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_events_view.m-replace-convertRectFromScreen-with-convertScreenToBase.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,16 +1,18 @@
</span><span class="cx"> --- video/out/cocoa/events_view.m.orig
</span><span class="cx"> +++ video/out/cocoa/events_view.m
</span><del>-@@ -133,7 +133,12 @@
</del><ins>+@@ -133,7 +133,15 @@
</ins><span class="cx"> - (BOOL)containsMouseLocation
</span><span class="cx"> {
</span><span class="cx"> NSRect vF = [[self.window screen] visibleFrame];
</span><del>-- NSRect vFW = [self.window convertRectFromScreen:vF];
</del><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ NSRect vFW = [self.window convertRectFromScreen:vF];
++#else
</ins><span class="cx"> + NSPoint vFStart = vF.origin;
</span><span class="cx"> + NSPoint vFEnd = NSMakePoint (vFStart.x + vF.size.width, vFStart.y + vF.size.height);
</span><del>-+ //NSRect vFW = [self.window convertRectFromScreen:vF];
</del><span class="cx"> + NSPoint vFStartW = [self.window convertScreenToBase:vFStart];
</span><span class="cx"> + NSPoint vFEndW = [self.window convertScreenToBase:vFEnd];
</span><span class="cx"> + NSRect vFW = NSMakeRect (vFStartW.x, vFStartW.y, vFEndW.x - vFStartW.x, vFEndW.y - vFStartW.y);
</span><ins>++#endif
</ins><span class="cx"> NSRect vFV = [self convertRect:vFW fromView:nil];
</span><span class="cx"> NSPoint pt = [self convertPoint:[self mouseLocation] fromView:nil];
</span><span class="cx">
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_video_viewmreplaceconvertRectToBackingwithuserSpaceScaleFactordiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_video_view.m-replace-convertRectToBacking-with-userSpaceScaleFactor.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_video_view.m-replace-convertRectToBacking-with-userSpaceScaleFactor.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_video_view.m-replace-convertRectToBacking-with-userSpaceScaleFactor.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,10 +1,21 @@
</span><span class="cx"> --- video/out/cocoa/video_view.m.orig
</span><span class="cx"> +++ video/out/cocoa/video_view.m
</span><del>-@@ -38,7 +38,15 @@
</del><ins>+@@ -15,6 +15,8 @@
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
+ */
</ins><span class="cx">
</span><ins>++#import <AvailabilityMacros.h>
++
+ #include "osdep/macosx_compat.h"
+ #include "video/out/cocoa_common.h"
+ #include "video_view.h"
+@@ -38,7 +40,18 @@
+
</ins><span class="cx"> - (NSRect)frameInPixels
</span><span class="cx"> {
</span><del>-- return [self convertRectToBacking:[self frame]];
</del><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ return [self convertRectToBacking:[self frame]];
++#else
</ins><span class="cx"> + NSRect cur_frame = self.frame;
</span><span class="cx"> + NSPoint frame_point = cur_frame.origin;
</span><span class="cx"> + NSSize frame_extents = cur_frame.size;
</span><span class="lines">@@ -12,8 +23,8 @@
</span><span class="cx"> + NSPoint conv_frame_point = NSMakePoint (frame_point.x * scale_factor, frame_point.y * scale_factor);
</span><span class="cx"> + NSSize conv_frame_extents = NSMakeSize (frame_extents.width * scale_factor, frame_extents.height * scale_factor);
</span><span class="cx"> + NSRect conv_frame = NSMakeRect (conv_frame_point.x, conv_frame_point.y, conv_frame_extents.width, conv_frame_extents.height);
</span><del>-+ //return [self.window convertRectToBacking:[self frame]];
</del><span class="cx"> + return conv_frame;
</span><ins>++#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_windowmfullscreenfixesdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_window.m-fullscreen-fixes.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_window.m-fullscreen-fixes.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_window.m-fullscreen-fixes.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,6 +1,15 @@
</span><span class="cx"> --- video/out/cocoa/window.m.orig
</span><span class="cx"> +++ video/out/cocoa/window.m
</span><del>-@@ -30,6 +30,14 @@
</del><ins>+@@ -15,6 +15,8 @@
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++#import <AvailabilityMacros.h>
++
+ #include <libavutil/common.h>
+
+ #include "input/keycodes.h"
+@@ -30,6 +32,14 @@
</ins><span class="cx"> - (void)setCenteredContentSize:(NSSize)newSize;
</span><span class="cx"> @end
</span><span class="cx">
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_opengl_commonchideGL3timerfunctionsdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.c-hide-GL3-timer-functions.diff (0 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.c-hide-GL3-timer-functions.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.c-hide-GL3-timer-functions.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+--- video/out/opengl/common.c.orig
++++ video/out/opengl/common.c
+@@ -275,7 +275,6 @@ static const struct gl_functions gl_func
+ {0}
+ },
+ },
+-#endif
+ {
+ .ver_core = 330,
+ .extension = "GL_ARB_timer_query",
+@@ -309,6 +308,7 @@ static const struct gl_functions gl_func
+ {0}
+ },
+ },
++#endif
+ {
+ .ver_core = 430,
+ .ver_es_core = 300,
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_opengl_commonchideGL320sectiondiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.c-hide-GL320-section.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.c-hide-GL320-section.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.c-hide-GL320-section.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,18 +1,18 @@
</span><span class="cx"> --- video/out/opengl/common.c.orig
</span><span class="cx"> +++ video/out/opengl/common.c
</span><del>-@@ -227,6 +227,7 @@ static const struct gl_functions gl_func
- .extension = "GL_ARB_texture_rg",
- .provides = MPGL_CAP_TEX_RG,
</del><ins>+@@ -264,6 +264,7 @@ static const struct gl_functions gl_func
+ .ver_exclude = 1,
+ .ver_es_exclude = 320,
</ins><span class="cx"> },
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> {
</span><span class="cx"> .ver_core = 320,
</span><span class="cx"> .extension = "GL_ARB_sync",
</span><del>-@@ -237,6 +238,7 @@ static const struct gl_functions gl_func
</del><ins>+@@ -274,6 +275,7 @@ static const struct gl_functions gl_func
</ins><span class="cx"> {0}
</span><span class="cx"> },
</span><span class="cx"> },
</span><span class="cx"> +#endif
</span><del>- // Swap control, always an OS specific extension
- // The OSX code loads this manually.
</del><span class="cx"> {
</span><ins>+ .ver_core = 330,
+ .extension = "GL_ARB_timer_query",
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_opengl_commonhguardGL3stuffdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.h-guard-GL3-stuff.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.h-guard-GL3-stuff.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_opengl_common.h-guard-GL3-stuff.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,22 +1,17 @@
</span><span class="cx"> --- video/out/opengl/common.h.orig
</span><span class="cx"> +++ video/out/opengl/common.h
</span><del>-@@ -22,6 +22,8 @@
- #include <stdint.h>
- #include <stdbool.h>
</del><ins>+@@ -190,6 +190,7 @@ struct GL {
</ins><span class="cx">
</span><del>-+#include <AvailabilityMacros.h>
-+
- #include "config.h"
- #include "common/msg.h"
- #include "misc/bstr.h"
-@@ -176,9 +178,11 @@ struct GL {
- void (GLAPIENTRY *UniformMatrix3fv)(GLint, GLsizei, GLboolean,
- const GLfloat *);
</del><ins>+ void (GLAPIENTRY *InvalidateFramebuffer)(GLenum, GLsizei, const GLenum *);
</ins><span class="cx">
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> GLsync (GLAPIENTRY *FenceSync)(GLenum, GLbitfield);
</span><span class="cx"> GLenum (GLAPIENTRY *ClientWaitSync)(GLsync, GLbitfield, GLuint64);
</span><span class="cx"> void (GLAPIENTRY *DeleteSync)(GLsync sync);
</span><ins>+@@ -204,6 +205,7 @@ struct GL {
+ void (GLAPIENTRY *GetQueryObjecti64v)(GLuint, GLenum, GLint64 *);
+ void (GLAPIENTRY *GetQueryObjectuiv)(GLuint, GLenum, GLuint *);
+ void (GLAPIENTRY *GetQueryObjectui64v)(GLuint, GLenum, GLuint64 *);
</ins><span class="cx"> +#endif
</span><span class="cx">
</span><span class="cx"> void (GLAPIENTRY *VDPAUInitNV)(const GLvoid *, const GLvoid *);
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_opengl_context_cocoachardcodeOpenGL2diff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_opengl_context_cocoa.c-hardcode-OpenGL-2.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_opengl_context_cocoa.c-hardcode-OpenGL-2.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_opengl_context_cocoa.c-hardcode-OpenGL-2.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,22 +1,14 @@
</span><span class="cx"> --- video/out/opengl/common.c.orig
</span><span class="cx"> +++ video/out/opengl/common.c
</span><del>-@@ -28,6 +28,7 @@
- #include <stdbool.h>
- #include <math.h>
- #include <assert.h>
-+#include <AvailabilityMacros.h>
-
- #include "common.h"
- #include "common/common.h"
-@@ -399,6 +400,7 @@ void mpgl_load_functions2(GL *gl, void *
</del><ins>+@@ -473,6 +473,7 @@ void mpgl_load_functions2(GL *gl, void *
</ins><span class="cx"> if (shader)
</span><span class="cx"> mp_verbose(log, "GL_SHADING_LANGUAGE_VERSION='%s'\n", shader);
</span><span class="cx">
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if !defined (__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> if (gl->version >= 300) {
</span><span class="cx"> gl->GetStringi = get_fn(fn_ctx, "glGetStringi");
</span><span class="cx"> gl->GetIntegerv = get_fn(fn_ctx, "glGetIntegerv");
</span><del>-@@ -413,7 +415,9 @@ void mpgl_load_functions2(GL *gl, void *
</del><ins>+@@ -487,7 +488,9 @@ void mpgl_load_functions2(GL *gl, void *
</ins><span class="cx"> gl->extensions = talloc_asprintf_append(gl->extensions, " %s", ext);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -29,192 +21,98 @@
</span><span class="cx"> }
</span><span class="cx"> --- video/out/opengl/common.h.orig
</span><span class="cx"> +++ video/out/opengl/common.h
</span><del>-@@ -34,7 +34,6 @@
</del><ins>+@@ -22,6 +22,10 @@
+ #include <stdint.h>
+ #include <stdbool.h>
+
++#ifdef __APPLE__
++#include <AvailabilityMacros.h>
++#endif
++
+ #include "config.h"
+ #include "common/msg.h"
+ #include "misc/bstr.h"
+@@ -34,7 +38,9 @@
</ins><span class="cx"> #if HAVE_GL_COCOA
</span><span class="cx"> #define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED 1
</span><span class="cx"> #include <OpenGL/gl.h>
</span><del>--#include <OpenGL/gl3.h>
</del><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ #include <OpenGL/gl3.h>
++#endif
</ins><span class="cx"> #include <OpenGL/glext.h>
</span><span class="cx"> #elif HAVE_ANDROID_GL
</span><span class="cx"> #include <GLES3/gl3.h>
</span><del>---- video/out/opengl/utils.c.orig
-+++ video/out/opengl/utils.c
-@@ -22,6 +22,7 @@
- #include <string.h>
- #include <stdarg.h>
- #include <assert.h>
-+#include <AvailabilityMacros.h>
-
- #include "common/common.h"
- #include "utils.h"
-@@ -79,14 +80,20 @@ int glFmt2bpp(GLenum format, GLenum type
- return 2;
- case GL_RGB:
- case GL_BGR:
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- case GL_RGB_INTEGER:
-+#endif
- return 3 * component_size;
- case GL_RGBA:
- case GL_BGRA:
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- case GL_RGBA_INTEGER:
-+#endif
- return 4 * component_size;
- case GL_RED:
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- case GL_RED_INTEGER:
-+#endif
- return component_size;
- case GL_RG:
- case GL_LUMINANCE_ALPHA:
-@@ -322,10 +329,12 @@ static const struct gl_format gl_formats
- {GL_RGB, GL_UNSIGNED_SHORT, GL_RGB16},
- {GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, GL_RGB10_A2},
- // not texture filterable in GLES 3.0
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- {GL_RGB, GL_FLOAT, GL_RGB16F},
- {GL_RGBA, GL_FLOAT, GL_RGBA16F},
- {GL_RGB, GL_FLOAT, GL_RGB32F},
- {GL_RGBA, GL_FLOAT, GL_RGBA32F},
-+#endif
- // Desktop GL
- {GL_RGB, GL_UNSIGNED_SHORT, GL_RGB10},
- {GL_RGBA, GL_UNSIGNED_SHORT, GL_RGBA12},
</del><span class="cx"> --- video/out/opengl/video.c.orig
</span><span class="cx"> +++ video/out/opengl/video.c
</span><del>-@@ -20,6 +20,7 @@
- #include <stdbool.h>
- #include <string.h>
- #include <assert.h>
-+#include <AvailabilityMacros.h>
-
- #include <libavutil/common.h>
- #include <libavutil/lfg.h>
-@@ -284,6 +285,7 @@ static const struct fmt_entry gl_byte_fo
- {0, 0, 0, 0}, // 4 x 16
- };
-
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- static const struct fmt_entry gl_ui_byte_formats_gles3[] = {
- {0, GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE}, // 1 x 8
- {0, GL_RG8UI, GL_RG_INTEGER, GL_UNSIGNED_BYTE}, // 2 x 8
-@@ -294,6 +296,7 @@ static const struct fmt_entry gl_ui_byte
- {0, GL_RGB16UI, GL_RGB_INTEGER, GL_UNSIGNED_SHORT}, // 3 x 16
- {0, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT}, // 4 x 16
- };
-+#endif
-
- static const struct fmt_entry gl_byte_formats_gles2[] = {
- {0, GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE}, // 1 x 8
-@@ -318,10 +321,10 @@ static const struct fmt_entry gl_byte_fo
- };
-
- static const struct fmt_entry gl_float16_formats[] = {
-- {0, GL_R16F, GL_RED, GL_FLOAT}, // 1 x f
-- {0, GL_RG16F, GL_RG, GL_FLOAT}, // 2 x f
-- {0, GL_RGB16F, GL_RGB, GL_FLOAT}, // 3 x f
-- {0, GL_RGBA16F, GL_RGBA, GL_FLOAT}, // 4 x f
-+ {0, 0, GL_RED, GL_FLOAT}, // 1 x f
-+ {0, 0, GL_RG, GL_FLOAT}, // 2 x f
-+ {0, 0, GL_RGB, GL_FLOAT}, // 3 x f
-+ {0, 0, GL_RGBA, GL_FLOAT}, // 4 x f
- };
-
- static const struct fmt_entry gl_apple_formats[] = {
-@@ -456,12 +459,7 @@ const struct m_sub_options gl_video_conf
</del><ins>+@@ -407,12 +407,22 @@ const struct m_sub_options gl_video_conf
</ins><span class="cx"> {"rgb10", GL_RGB10},
</span><span class="cx"> {"rgb10_a2", GL_RGB10_A2},
</span><span class="cx"> {"rgb16", GL_RGB16},
</span><del>-- {"rgb16f", GL_RGB16F},
-- {"rgb32f", GL_RGB32F},
</del><ins>++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ {"rgb16f", GL_RGB16F},
+ {"rgb32f", GL_RGB32F},
++#else
++ {"rgb16f", GL_RGB16F_ARB},
++ {"rgb32f", GL_RGB32F_ARB},
++#endif
</ins><span class="cx"> {"rgba12", GL_RGBA12},
</span><del>-- {"rgba16", GL_RGBA16},
-- {"rgba16f", GL_RGBA16F},
-- {"rgba32f", GL_RGBA32F},
</del><ins>+ {"rgba16", GL_RGBA16},
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ {"rgba16f", GL_RGBA16F},
+ {"rgba32f", GL_RGBA32F},
++#else
++ {"rgba16f", GL_RGBA16F_ARB},
++ {"rgba32f", GL_RGBA32F_ARB},
++#endif
</ins><span class="cx"> {"auto", 0})),
</span><span class="cx"> OPT_CHOICE_OR_INT("dither-depth", dither_depth, 0, -1, 16,
</span><span class="cx"> ({"no", -1}, {"auto", 0})),
</span><del>-@@ -565,10 +563,14 @@ static bool is_integer_format(const stru
- {
- // Tests only the formats which we actually declare somewhere.
- switch (fmt->format) {
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- case GL_RED_INTEGER:
-+#endif
- case GL_RG_INTEGER:
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- case GL_RGB_INTEGER:
- case GL_RGBA_INTEGER:
-+#endif
- return true;
- }
- return false;
-@@ -1003,7 +1005,7 @@ static void pass_prepare_src_tex(struct
- static void render_pass_quad(struct gl_video *p, int vp_w, int vp_h,
- const struct mp_rect *dst)
- {
-- struct vertex va[4] = {0};
-+ struct vertex va[4] = {{{0}}};
</del><ins>+@@ -3009,7 +3019,11 @@ static void check_gl_features(struct gl_
+ bool have_texrg = gl->mpgl_caps & MPGL_CAP_TEX_RG;
+ bool have_tex16 = !gl->es || (gl->mpgl_caps & MPGL_CAP_EXT16);
</ins><span class="cx">
</span><del>- struct gl_transform t;
- gl_transform_ortho(&t, 0, vp_w, 0, vp_h);
-@@ -2636,7 +2638,11 @@ static void check_gl_features(struct gl_
- if (!p->opts.fbo_format) {
- p->opts.fbo_format = GL_RGBA16;
- if (gl->es)
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- p->opts.fbo_format = have_float_tex ? GL_RGBA16F : GL_RGB10_A2;
</del><ins>++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ const GLint auto_fbo_fmts[] = {GL_RGBA16, GL_RGBA16F, GL_RGB10_A2,
</ins><span class="cx"> +#else
</span><del>-+ p->opts.fbo_format = GL_RGB10_A2;
</del><ins>++ const GLint auto_fbo_fmts[] = {GL_RGBA16, GL_RGBA16F_ARB, GL_RGB10_A2,
</ins><span class="cx"> +#endif
</span><del>- }
- have_fbo = test_fbo(p);
- }
-@@ -2855,7 +2861,9 @@ static const struct fmt_entry *find_plan
- const struct fmt_entry *e = find_tex_format(gl, bytes_per_comp, n_channels);
- if (e->format || gl->es < 300)
- return e;
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- return &gl_ui_byte_formats_gles3[n_channels - 1 + (bytes_per_comp - 1) * 4];
-+#endif
- }
-
- static bool init_format(int fmt, struct gl_video *init)
</del><ins>+ GL_RGBA8, 0};
+ GLint user_fbo_fmts[] = {p->opts.fbo_format, 0};
+ const GLint *fbo_fmts = user_fbo_fmts[0] ? user_fbo_fmts : auto_fbo_fmts;
</ins><span class="cx"> --- video/out/opengl/context_cocoa.c.orig
</span><span class="cx"> +++ video/out/opengl/context_cocoa.c
</span><del>-@@ -56,12 +56,17 @@ static void *cocoa_glgetaddr(const char
</del><ins>+@@ -48,12 +48,17 @@ static void *cocoa_glgetaddr(const char
</ins><span class="cx">
</span><span class="cx"> static CGLError test_gl_version(struct vo *vo,
</span><span class="cx"> CGLContextObj *ctx,
</span><span class="cx"> - CGLPixelFormatObj *pix,
</span><span class="cx"> - CGLOpenGLProfile version)
</span><span class="cx"> + CGLPixelFormatObj *pix
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> + , CGLOpenGLProfile version
</span><span class="cx"> +#endif
</span><span class="cx"> + )
</span><span class="cx"> {
</span><span class="cx"> CGLPixelFormatAttribute attrs[] = {
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> kCGLPFAOpenGLProfile,
</span><span class="cx"> (CGLPixelFormatAttribute) version,
</span><span class="cx"> +#endif
</span><span class="cx"> kCGLPFADoubleBuffer,
</span><span class="cx"> kCGLPFAAccelerated,
</span><span class="cx"> #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
</span><del>-@@ -99,16 +104,22 @@ static bool create_gl_context(struct MPG
</del><ins>+@@ -91,16 +96,22 @@ static bool create_gl_context(struct MPG
</ins><span class="cx"> struct cgl_context *p = ctx->priv;
</span><span class="cx"> CGLError err;
</span><span class="cx">
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> CGLOpenGLProfile gl_versions[] = {
</span><span class="cx"> kCGLOGLPVersion_3_2_Core,
</span><span class="cx"> kCGLOGLPVersion_Legacy,
</span><span class="cx"> };
</span><span class="cx"> +#endif
</span><span class="cx">
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> for (int n = 0; n < MP_ARRAY_SIZE(gl_versions); n++) {
</span><span class="cx"> err = test_gl_version(ctx->vo, &p->ctx, &p->pix, gl_versions[n]);
</span><span class="cx"> if (err == kCGLNoError)
</span><span class="lines">@@ -226,3 +124,139 @@
</span><span class="cx">
</span><span class="cx"> if (err != kCGLNoError) {
</span><span class="cx"> MP_FATAL(ctx->vo, "error creating CGL context: %s (%d)\n",
</span><ins>+@@ -164,4 +175,4 @@ const struct mpgl_driver mpgl_driver_coc
+ .swap_buffers = cocoa_swap_buffers,
+ .control = cocoa_control,
+ .uninit = cocoa_uninit,
+-};
+\ No newline at end of file
++};
+--- video/out/opengl/formats.c.orig
++++ video/out/opengl/formats.c
+@@ -42,24 +42,49 @@ const struct gl_format gl_formats[] = {
+
+ // Non-normalized integer formats.
+ // Follows ES 3.0 as to which are color-renderable.
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ {GL_R8UI, GL_RED_INTEGER, T_U8, F_CR | F_GL3 | F_ES3},
++#else
++ {GL_R8UI, GL_RED_INTEGER_EXT, T_U8, F_CR | F_GL3 | F_ES3},
++#endif
+ {GL_RG8UI, GL_RG_INTEGER, T_U8, F_CR | F_GL3 | F_ES3},
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ {GL_RGB8UI, GL_RGB_INTEGER, T_U8, F_GL3 | F_ES3},
+ {GL_RGBA8UI, GL_RGBA_INTEGER, T_U8, F_CR | F_GL3 | F_ES3},
+ {GL_R16UI, GL_RED_INTEGER, T_U16, F_CR | F_GL3 | F_ES3},
++#else
++ {GL_RGB8UI_EXT, GL_RGB_INTEGER_EXT, T_U8, F_GL3 | F_ES3},
++ {GL_RGBA8UI_EXT, GL_RGBA_INTEGER_EXT, T_U8, F_CR | F_GL3 | F_ES3},
++ {GL_R16UI, GL_RED_INTEGER_EXT, T_U16, F_CR | F_GL3 | F_ES3},
++#endif
+ {GL_RG16UI, GL_RG_INTEGER, T_U16, F_CR | F_GL3 | F_ES3},
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ {GL_RGB16UI, GL_RGB_INTEGER, T_U16, F_GL3 | F_ES3},
+ {GL_RGBA16UI, GL_RGBA_INTEGER, T_U16, F_CR | F_GL3 | F_ES3},
++#else
++ {GL_RGB16UI_EXT, GL_RGB_INTEGER_EXT, T_U16, F_GL3 | F_ES3},
++ {GL_RGBA16UI_EXT, GL_RGBA_INTEGER_EXT, T_U16, F_CR | F_GL3 | F_ES3},
++#endif
+
+ // On GL3+ or GL2.1 with GL_ARB_texture_float, floats work fully.
+ {GL_R16F, GL_RED, T_FL, F_F16 | F_CF | F_GL3 | F_GL2F},
+ {GL_RG16F, GL_RG, T_FL, F_F16 | F_CF | F_GL3 | F_GL2F},
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ {GL_RGB16F, GL_RGB, T_FL, F_F16 | F_CF | F_GL3 | F_GL2F},
+ {GL_RGBA16F, GL_RGBA, T_FL, F_F16 | F_CF | F_GL3 | F_GL2F},
++#else
++ {GL_RGB16F_ARB, GL_RGB, T_FL, F_F16 | F_CF | F_GL3 | F_GL2F},
++ {GL_RGBA16F_ARB, GL_RGBA, T_FL, F_F16 | F_CF | F_GL3 | F_GL2F},
++#endif
+ {GL_R32F, GL_RED, T_FL, F_CF | F_GL3 | F_GL2F},
+ {GL_RG32F, GL_RG, T_FL, F_CF | F_GL3 | F_GL2F},
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ {GL_RGB32F, GL_RGB, T_FL, F_CF | F_GL3 | F_GL2F},
+ {GL_RGBA32F, GL_RGBA, T_FL, F_CF | F_GL3 | F_GL2F},
++#else
++ {GL_RGB32F_ARB, GL_RGB, T_FL, F_CF | F_GL3 | F_GL2F},
++ {GL_RGBA32F_ARB, GL_RGBA, T_FL, F_CF | F_GL3 | F_GL2F},
++#endif
+
+ // Note: we simply don't support float anything on ES2, despite extensions.
+ // We also don't bother with non-filterable float formats, and we ignore
+@@ -69,15 +94,25 @@ const struct gl_format gl_formats[] = {
+ // F_EXTF16 implies extensions that also enable 16 bit floats fully.
+ {GL_R16F, GL_RED, T_FL, F_F16 | F_CF | F_ES32 | F_EXTF16},
+ {GL_RG16F, GL_RG, T_FL, F_F16 | F_CF | F_ES32 | F_EXTF16},
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ {GL_RGB16F, GL_RGB, T_FL, F_F16 | F_TF | F_ES32 | F_EXTF16},
+ {GL_RGBA16F, GL_RGBA, T_FL, F_F16 | F_CF | F_ES32 | F_EXTF16},
++#else
++ {GL_RGB16F_ARB, GL_RGB, T_FL, F_F16 | F_TF | F_ES32 | F_EXTF16},
++ {GL_RGBA16F_ARB, GL_RGBA, T_FL, F_F16 | F_CF | F_ES32 | F_EXTF16},
++#endif
+
+ // On ES3.0+, 16 bit floats are texture-filterable.
+ // Don't bother with 32 bit floats; they exist but are neither CR nor TF.
+ {GL_R16F, GL_RED, T_FL, F_F16 | F_TF | F_ES3},
+ {GL_RG16F, GL_RG, T_FL, F_F16 | F_TF | F_ES3},
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ {GL_RGB16F, GL_RGB, T_FL, F_F16 | F_TF | F_ES3},
+ {GL_RGBA16F, GL_RGBA, T_FL, F_F16 | F_TF | F_ES3},
++#else
++ {GL_RGB16F_ARB, GL_RGB, T_FL, F_F16 | F_TF | F_ES3},
++ {GL_RGBA16F_ARB, GL_RGBA, T_FL, F_F16 | F_TF | F_ES3},
++#endif
+
+ // These might be useful as FBO formats.
+ {GL_RGB10_A2, GL_RGBA,
+@@ -213,10 +248,19 @@ int gl_format_type(const struct gl_forma
+ GLenum gl_integer_format_to_base(GLenum format)
+ {
+ switch (format) {
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ case GL_RED_INTEGER: return GL_RED;
++#else
++ case GL_RED_INTEGER_EXT: return GL_RED;
++#endif
+ case GL_RG_INTEGER: return GL_RG;
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ case GL_RGB_INTEGER: return GL_RGB;
+ case GL_RGBA_INTEGER: return GL_RGBA;
++#else
++ case GL_RGB_INTEGER_EXT: return GL_RGB;
++ case GL_RGBA_INTEGER_EXT: return GL_RGBA;
++#endif
+ }
+ return 0;
+ }
+@@ -239,7 +283,11 @@ int gl_format_components(GLenum format)
+ {
+ switch (format) {
+ case GL_RED:
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ case GL_RED_INTEGER:
++#else
++ case GL_RED_INTEGER_EXT:
++#endif
+ case GL_LUMINANCE:
+ return 1;
+ case GL_RG:
+@@ -247,10 +295,18 @@ int gl_format_components(GLenum format)
+ case GL_LUMINANCE_ALPHA:
+ return 2;
+ case GL_RGB:
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ case GL_RGB_INTEGER:
++#else
++ case GL_RGB_INTEGER_EXT:
++#endif
+ return 3;
+ case GL_RGBA:
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ case GL_RGBA_INTEGER:
++#else
++ case GL_RGBA_INTEGER_EXT:
++#endif
+ return 4;
+ }
+ return 0;
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_opengl_utilschidepbotextureuploaddiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_opengl_utils.c-hide-pbo-texture-upload.diff (0 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_opengl_utils.c-hide-pbo-texture-upload.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_opengl_utils.c-hide-pbo-texture-upload.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+--- video/out/opengl/utils.c.orig
++++ video/out/opengl/utils.c
+@@ -1168,6 +1168,7 @@ void gl_pbo_upload_tex(struct gl_pbo_upl
+ pbo->index = (pbo->index + 1) % 2;
+
+ gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, pbo->buffers[pbo->index]);
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ void *data = gl->MapBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, needed_size,
+ GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
+ if (!data)
+@@ -1185,6 +1186,7 @@ void gl_pbo_upload_tex(struct gl_pbo_upl
+ gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+
+ return;
++#endif
+
+ no_pbo:
+ gl_upload_tex(gl, target, format, type, dataptr, stride, x, y, w, h);
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_opengl_videocfixcompilewarningsdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_opengl_video.c-fix-compile-warnings.diff (0 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_opengl_video.c-fix-compile-warnings.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_opengl_video.c-fix-compile-warnings.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+--- video/out/opengl/video.c.orig
++++ video/out/opengl/video.c
+@@ -897,7 +897,7 @@ static void uninit_video(struct gl_video
+ gl->DeleteTextures(1, &plane->gl_texture);
+ gl_pbo_upload_uninit(&plane->pbo);
+ }
+- *vimg = (struct video_image){0};
++ *vimg = (struct video_image){{0}};
+
+ // Invalidate image_params to ensure that gl_video_config() will call
+ // init_video() on uninitialized gl_video.
+@@ -949,7 +949,7 @@ static void pass_prepare_src_tex(struct
+ static void render_pass_quad(struct gl_video *p, int vp_w, int vp_h,
+ const struct mp_rect *dst)
+ {
+- struct vertex va[4] = {0};
++ struct vertex va[4] = {{{0}}};
+
+ struct gl_transform t;
+ gl_transform_ortho(&t, 0, vp_w, 0, vp_h);
+@@ -2844,7 +2844,7 @@ struct voctrl_performance_data gl_video_
+ // This assumes nv12, with textures set to GL_NEAREST filtering.
+ static void reinterleave_vdpau(struct gl_video *p, struct gl_hwdec_frame *frame)
+ {
+- struct gl_hwdec_frame res = {0};
++ struct gl_hwdec_frame res = {{0}};
+ for (int n = 0; n < 2; n++) {
+ struct fbotex *fbo = &p->vdpau_deinterleave_fbo[n];
+ // This is an array of the 2 to-merge planes.
+@@ -2902,7 +2902,7 @@ static bool gl_video_upload_image(struct
+
+ if (p->hwdec_active) {
+ // Hardware decoding
+- struct gl_hwdec_frame gl_frame = {0};
++ struct gl_hwdec_frame gl_frame = {{0}};
+ gl_timer_start(p->upload_timer);
+ bool ok = p->hwdec->driver->map_frame(p->hwdec, vimg->mpi, &gl_frame) >= 0;
+ gl_timer_stop(p->upload_timer);
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_opengl_videocremovetimerfunctionalitydiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_opengl_video.c-remove-timer-functionality.diff (0 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_opengl_video.c-remove-timer-functionality.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_opengl_video.c-remove-timer-functionality.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -0,0 +1,236 @@
</span><ins>+--- video/out/opengl/utils.c.orig
++++ video/out/opengl/utils.c
+@@ -999,6 +999,7 @@ void gl_sc_gen_shader_and_reset(struct g
+ gl_sc_reset(sc);
+ }
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ // Maximum number of simultaneous query objects to keep around. Reducing this
+ // number might cause rendering to block until the result of a previous query is
+ // available
+@@ -1124,6 +1125,7 @@ void gl_timer_stop(struct gl_timer *time
+ if (gl->EndQuery)
+ gl->EndQuery(GL_TIME_ELAPSED);
+ }
++#endif
+
+ // Upload a texture, going through a PBO. PBO supposedly can facilitate
+ // asynchronous copy from CPU to GPU, so this is an optimization. Note that
+--- video/out/opengl/utils.h.orig
++++ video/out/opengl/utils.h
+@@ -19,6 +19,10 @@
+ #ifndef MP_GL_UTILS_
+ #define MP_GL_UTILS_
+
++#ifdef __APPLE__
++#include <AvailabilityMacros.h>
++#endif
++
+ #include "common.h"
+ #include "math.h"
+
+@@ -170,6 +174,7 @@ void gl_sc_enable_extension(struct gl_sh
+ void gl_sc_gen_shader_and_reset(struct gl_shader_cache *sc);
+ void gl_sc_reset(struct gl_shader_cache *sc);
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ struct gl_timer;
+
+ struct gl_timer *gl_timer_create(GL *gl);
+@@ -181,6 +186,7 @@ int gl_timer_sample_count(struct gl_time
+ uint64_t gl_timer_last_us(struct gl_timer *timer);
+ uint64_t gl_timer_avg_us(struct gl_timer *timer);
+ uint64_t gl_timer_peak_us(struct gl_timer *timer);
++#endif
+
+ struct gl_pbo_upload {
+ GL *gl;
+--- video/out/opengl/video.c.orig
++++ video/out/opengl/video.c
+@@ -192,9 +192,11 @@ struct gl_video {
+ GLuint dither_texture;
+ int dither_size;
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ struct gl_timer *upload_timer;
+ struct gl_timer *render_timer;
+ struct gl_timer *present_timer;
++#endif
+
+ struct mp_image_params real_image_params; // configured format
+ struct mp_image_params image_params; // texture format (mind hwdec case)
+@@ -2407,7 +2409,9 @@ static void pass_render_frame(struct gl_
+ // start the render timer here. it will continue to the end of this
+ // function, to render the time needed to draw (excluding screen
+ // presentation)
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ gl_timer_start(p->render_timer);
++#endif
+
+ p->use_linear = p->opts.linear_scaling || p->opts.sigmoid_upscaling;
+ pass_read_video(p);
+@@ -2466,12 +2470,16 @@ static void pass_render_frame(struct gl_
+
+ pass_opt_hook_point(p, "SCALED", NULL);
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ gl_timer_stop(p->render_timer);
++#endif
+ }
+
+ static void pass_draw_to_screen(struct gl_video *p, int fbo)
+ {
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ gl_timer_start(p->present_timer);
++#endif
+
+ if (p->dumb_mode)
+ pass_render_frame_dumb(p, fbo);
+@@ -2498,7 +2506,9 @@ static void pass_draw_to_screen(struct g
+ pass_dither(p);
+ finish_pass_direct(p, fbo, p->vp_w, p->vp_h, &p->dst_rect);
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ gl_timer_stop(p->present_timer);
++#endif
+ }
+
+ // Draws an interpolate frame to fbo, based on the frame timing in t
+@@ -2677,6 +2687,7 @@ static void gl_video_interpolate_frame(s
+ p->frames_drawn += 1;
+ }
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ static void timer_dbg(struct gl_video *p, const char *name, struct gl_timer *t)
+ {
+ if (gl_timer_sample_count(t) > 0) {
+@@ -2686,6 +2697,7 @@ static void timer_dbg(struct gl_video *p
+ (int)gl_timer_peak_us(t));
+ }
+ }
++#endif
+
+ // (fbo==0 makes BindFramebuffer select the screen backbuffer)
+ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, int fbo)
+@@ -2798,10 +2810,12 @@ done:
+
+ p->frames_rendered++;
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ // Report performance metrics
+ timer_dbg(p, "upload", p->upload_timer);
+ timer_dbg(p, "render", p->render_timer);
+ timer_dbg(p, "present", p->present_timer);
++#endif
+ }
+
+ // vp_w/vp_h is the implicit size of the target framebuffer.
+@@ -2823,6 +2837,7 @@ void gl_video_resize(struct gl_video *p,
+ mpgl_osd_resize(p->osd, p->osd_rect, p->image_params.stereo_out);
+ }
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ static struct voctrl_performance_entry gl_video_perfentry(struct gl_timer *t)
+ {
+ return (struct voctrl_performance_entry) {
+@@ -2840,6 +2855,7 @@ struct voctrl_performance_data gl_video_
+ .present = gl_video_perfentry(p->present_timer),
+ };
+ }
++#endif
+
+ // This assumes nv12, with textures set to GL_NEAREST filtering.
+ static void reinterleave_vdpau(struct gl_video *p, struct gl_hwdec_frame *frame)
+@@ -2903,9 +2919,13 @@ static bool gl_video_upload_image(struct
+ if (p->hwdec_active) {
+ // Hardware decoding
+ struct gl_hwdec_frame gl_frame = {{0}};
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ gl_timer_start(p->upload_timer);
++#endif
+ bool ok = p->hwdec->driver->map_frame(p->hwdec, vimg->mpi, &gl_frame) >= 0;
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ gl_timer_stop(p->upload_timer);
++#endif
+ vimg->hwdec_mapped = true;
+ if (ok) {
+ struct mp_image layout = {0};
+@@ -2935,7 +2955,9 @@ static bool gl_video_upload_image(struct
+ // Software decoding
+ assert(mpi->num_planes == p->plane_count);
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ gl_timer_start(p->upload_timer);
++#endif
+
+
+ for (int n = 0; n < p->plane_count; n++) {
+@@ -2951,7 +2973,9 @@ static bool gl_video_upload_image(struct
+ gl->BindTexture(plane->gl_target, 0);
+ }
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ gl_timer_stop(p->upload_timer);
++#endif
+
+ return true;
+
+@@ -3188,9 +3212,11 @@ static void init_gl(struct gl_video *p)
+ gl->BindFramebuffer(GL_FRAMEBUFFER, 0);
+ }
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ p->upload_timer = gl_timer_create(p->gl);
+ p->render_timer = gl_timer_create(p->gl);
+ p->present_timer = gl_timer_create(p->gl);
++#endif
+
+ debug_check_gl(p, "after init_gl");
+ }
+@@ -3210,9 +3236,11 @@ void gl_video_uninit(struct gl_video *p)
+
+ gl->DeleteTextures(1, &p->lut_3d_texture);
+
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ gl_timer_free(p->upload_timer);
+ gl_timer_free(p->render_timer);
+ gl_timer_free(p->present_timer);
++#endif
+
+ mpgl_osd_destroy(p->osd);
+
+--- video/out/opengl/video.h.orig
++++ video/out/opengl/video.h
+@@ -20,6 +20,10 @@
+
+ #include <stdbool.h>
+
++#ifdef __APPLE__
++#include <AvailabilityMacros.h>
++#endif
++
+ #include "options/m_option.h"
+ #include "sub/osd.h"
+ #include "common.h"
+@@ -158,7 +162,9 @@ void gl_video_render_frame(struct gl_vid
+ void gl_video_resize(struct gl_video *p, int vp_w, int vp_h,
+ struct mp_rect *src, struct mp_rect *dst,
+ struct mp_osd_res *osd);
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ struct voctrl_performance_data gl_video_perfdata(struct gl_video *p);
++#endif
+ struct mp_csp_equalizer;
+ struct mp_csp_equalizer *gl_video_eq_ptr(struct gl_video *p);
+ void gl_video_eq_update(struct gl_video *p);
+--- video/out/vo_opengl.c.orig
++++ video/out/vo_opengl.c
+@@ -349,7 +349,9 @@ static int control(struct vo *vo, uint32
+ }
+ return true;
+ case VOCTRL_PERFORMANCE_DATA:
++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ *(struct voctrl_performance_data *)data = gl_video_perfdata(p->renderer);
++#endif
+ return true;
+ }
+
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_vo_openglcguardGL3andbackportoldbehaviordiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_vo_opengl.c-guard-GL3-and-backport-old-behavior.diff (153257 => 153258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_vo_opengl.c-guard-GL3-and-backport-old-behavior.diff        2016-09-28 08:32:33 UTC (rev 153257)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_vo_opengl.c-guard-GL3-and-backport-old-behavior.diff        2016-09-28 08:32:48 UTC (rev 153258)
</span><span class="lines">@@ -1,31 +1,32 @@
</span><span class="cx"> --- video/out/vo_opengl.c.orig
</span><span class="cx"> +++ video/out/vo_opengl.c
</span><del>-@@ -69,6 +69,9 @@ struct gl_priv {
- int use_gl_debug;
- int allow_sw;
- int swap_interval;
-+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
-+ int current_swap_interval;
</del><ins>+@@ -24,6 +24,10 @@
+ #include <stdbool.h>
+ #include <assert.h>
+
++#ifdef __APPLE__
++#include <AvailabilityMacros.h>
</ins><span class="cx"> +#endif
</span><del>- int dwm_flush;
- int opt_vsync_fences;
</del><ins>++
+ #include <libavutil/common.h>
</ins><span class="cx">
</span><del>-@@ -83,8 +86,10 @@ struct gl_priv {
</del><ins>+ #include "config.h"
+@@ -84,8 +88,10 @@ struct gl_priv {
</ins><span class="cx"> int last_pattern;
</span><span class="cx"> int matches, mismatches;
</span><span class="cx">
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> GLsync vsync_fences[NUM_VSYNC_FENCES];
</span><span class="cx"> int num_vsync_fences;
</span><span class="cx"> +#endif
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> static void resize(struct gl_priv *p)
</span><del>-@@ -124,13 +129,21 @@ static void draw_frame(struct vo *vo, st
</del><ins>+@@ -125,13 +131,21 @@ static void draw_frame(struct vo *vo, st
</ins><span class="cx"> struct gl_priv *p = vo->priv;
</span><span class="cx"> GL *gl = p->gl;
</span><span class="cx">
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> if (gl->FenceSync && p->num_vsync_fences < p->opt_vsync_fences) {
</span><span class="cx"> GLsync fence = gl->FenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);;
</span><span class="cx"> if (fence)
</span><span class="lines">@@ -33,8 +34,8 @@
</span><span class="cx"> }
</span><span class="cx"> +#endif
</span><span class="cx">
</span><del>- gl_video_render_frame(p->renderer, frame, 0);
-+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
</del><ins>+ gl_video_render_frame(p->renderer, frame, gl->main_fb);
++#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED < 1070
</ins><span class="cx"> + // The playloop calls this last before waiting some time until it decides
</span><span class="cx"> + // to call flip_page(). Tell OpenGL to start execution of the GPU commands
</span><span class="cx"> + // while we sleep (this happens asynchronously).
</span><span class="lines">@@ -43,11 +44,11 @@
</span><span class="cx">
</span><span class="cx"> if (p->use_glFinish)
</span><span class="cx"> gl->Finish();
</span><del>-@@ -167,11 +180,13 @@ static void flip_page(struct vo *vo)
</del><ins>+@@ -168,11 +182,13 @@ static void flip_page(struct vo *vo)
</ins><span class="cx"> p->opt_pattern[0] = 0;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</del><ins>++#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</ins><span class="cx"> while (p->opt_vsync_fences > 0 && p->num_vsync_fences >= p->opt_vsync_fences) {
</span><span class="cx"> gl->ClientWaitSync(p->vsync_fences[0], GL_SYNC_FLUSH_COMMANDS_BIT, 1e9);
</span><span class="cx"> gl->DeleteSync(p->vsync_fences[0]);
</span></span></pre>
</div>
</div>
</body>
</html>