This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdbool.h> | |
#include <stdio.h> | |
#include <windows.h> | |
#include <roapi.h> | |
typedef enum _JsErrorCode { | |
JsNoError = 0u, | |
JsErrorCategoryUsage = 0x10000u, | |
JsErrorInvalidArgument, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdlib.h> | |
struct m_thread_info { | |
DWORD tid; | |
}; | |
typedef struct m_thread_info *pthread_t; | |
static DWORD mpv_tls_index = FLS_OUT_OF_INDEXES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before patch (profile=opengl-hq): | |
[ 0.256][v][cplayer] first video frame after restart shown | |
[ 0.226][v][cplayer] first video frame after restart shown | |
[ 0.231][v][cplayer] first video frame after restart shown | |
After patch, uncached (profile=opengl-hq): | |
[ 0.268][v][cplayer] first video frame after restart shown | |
[ 0.270][v][cplayer] first video frame after restart shown | |
[ 0.264][v][cplayer] first video frame after restart shown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,128073705856,7536011,0 | |
2,128073722511,7536012,1 | |
3,128073755822,7536014,2 | |
4,128073805788,7536017,3 | |
5,128073839095,7536019,4 | |
6,128073889061,7536022,5 | |
7,128073922372,7536024,6 | |
8,128073972341,7536027,7 | |
9,128074005657,7536029,8 | |
10,128074055615,7536032,9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,127791778092,7519084,0 | |
2,127791778092,7519084,0 | |
3,127791794748,7519085,1 | |
4,127791811402,7519086,2 | |
5,127791828055,7519087,3 | |
6,127791844717,7519088,4 | |
7,127791861367,7519089,5 | |
8,127791878022,7519090,6 | |
9,127791894681,7519091,7 | |
10,127791911333,7519092,8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -std=c99 -Wall -shared test-cplugin.c -o test-cplugin.dll | |
#include <mpv/client.h> | |
typedef void *(*get_proc_address_type)(const char *name); | |
typedef int (*mpv_command_type)(mpv_handle *ctx, const char **args); | |
static mpv_command_type pfn_mpv_command; | |
int mpv_init_cplugin_api(get_proc_address_type gpa) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mp.observe_property('vo-configured', 'bool', function(name, value) | |
if value then | |
mp.set_property('keep-open', 'yes') | |
else | |
mp.set_property('keep-open', 'no') | |
end | |
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- To the extent possible under law, the author(s) have dedicated all copyright | |
-- and related and neighboring rights to this software to the public domain | |
-- worldwide. This software is distributed without any warranty. See | |
-- <https://creativecommons.org/publicdomain/zero/1.0/> for a copy of the CC0 | |
-- Public Domain Dedication, which applies to this software. | |
mp.add_hook('on_preloaded', 5, function () | |
local tracks = mp.get_property_native('track-list') | |
local enable = mp.get_property('force-window') == 'yes' or | |
mp.get_property('options/player-operation-mode') == 'pseudo-gui' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
static char *format_boolean(int boolean) | |
{ | |
return boolean ? "TRUE" : "FALSE"; | |
} | |
int main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 0.004][v][cplayer] Command line options: 'DSC_0307.JPG' '--no-config' '--pause' '--video-rotate=90' '--log-file=log.txt' | |
[ 0.004][v][cplayer] mpv git-9959622 (C) 2000-2016 mpv/MPlayer/mplayer2 projects | |
[ 0.004][v][cplayer] built on Tue Sep 20 18:24:07 AEST 2016 | |
[ 0.004][v][cplayer] ffmpeg library versions: | |
[ 0.004][v][cplayer] libavutil 55.28.100 | |
[ 0.004][v][cplayer] libavcodec 57.48.101 | |
[ 0.004][v][cplayer] libavformat 57.41.100 | |
[ 0.004][v][cplayer] libswscale 4.1.100 | |
[ 0.004][v][cplayer] libavfilter 6.47.100 | |
[ 0.004][v][cplayer] libswresample 2.1.100 |