{"action":"created","comment":{"url":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/comments/195902889","pull_request_review_id":129363075,"id":195902889,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTkwMjg4OQ==","diff_hunk":"@@ -179,19 +195,23 @@ - (void) applicationDidFinishLaunching:(NSNotification *)notification {\n \n     check_error(mpv_initialize(mpv));\n     check_error(mpv_set_option_string(mpv, \"vo\", \"opengl-cb\"));\n-    mpv_opengl_cb_context *mpvGL = mpv_get_sub_api(mpv, MPV_SUB_API_OPENGL_CB);\n-    if (!mpvGL) {\n-        puts(\"libmpv does not have the opengl-cb sub-API.\");\n+    \n+    mpv_render_param params[] = {\n+        {MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL},\n+        {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &(mpv_opengl_init_params){\n+            .get_proc_address = get_proc_address,\n+        }},\n+        {MPV_RENDER_PARAM_INVALID, 0}\n+    };\n+    mpv_render_context *mpvGL;\n+    if (mpv_render_context_create(&mpvGL, mpv, params) < 0) {\n+        puts(\"libmpv does not obtain the render context.\");","path":"libmpv/cocoa-openglcb/cocoa-openglcb.m","position":64,"original_position":64,"commit_id":"bcb11eb4a19b64df3ea2ea0885c71e9d0d9ecfeb","original_commit_id":"bcb11eb4a19b64df3ea2ea0885c71e9d0d9ecfeb","user":{"login":"Akemi","id":680386,"node_id":"MDQ6VXNlcjY4MDM4Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/680386?v=4","gravatar_id":"","url":"https://api.github.com/users/Akemi","html_url":"https://github.com/Akemi","followers_url":"https://api.github.com/users/Akemi/followers","following_url":"https://api.github.com/users/Akemi/following{/other_user}","gists_url":"https://api.github.com/users/Akemi/gists{/gist_id}","starred_url":"https://api.github.com/users/Akemi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akemi/subscriptions","organizations_url":"https://api.github.com/users/Akemi/orgs","repos_url":"https://api.github.com/users/Akemi/repos","events_url":"https://api.github.com/users/Akemi/events{/privacy}","received_events_url":"https://api.github.com/users/Akemi/received_events","type":"User","site_admin":false},"body":"this sounds a bit weird. `libmpv couldn't create a render context` or along the lines is probably more appropriate.","created_at":"2018-06-16T13:13:07Z","updated_at":"2018-06-16T13:13:24Z","html_url":"https://github.com/mpv-player/mpv-examples/pull/23#discussion_r195902889","pull_request_url":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/23","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/comments/195902889"},"html":{"href":"https://github.com/mpv-player/mpv-examples/pull/23#discussion_r195902889"},"pull_request":{"href":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/23","id":195328503,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MzI4NTAz","html_url":"https://github.com/mpv-player/mpv-examples/pull/23","diff_url":"https://github.com/mpv-player/mpv-examples/pull/23.diff","patch_url":"https://github.com/mpv-player/mpv-examples/pull/23.patch","issue_url":"https://api.github.com/repos/mpv-player/mpv-examples/issues/23","number":23,"state":"open","locked":false,"title":"Convert Cocoa example from opengl-cb to render API","user":{"login":"doggy","id":443524,"node_id":"MDQ6VXNlcjQ0MzUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/443524?v=4","gravatar_id":"","url":"https://api.github.com/users/doggy","html_url":"https://github.com/doggy","followers_url":"https://api.github.com/users/doggy/followers","following_url":"https://api.github.com/users/doggy/following{/other_user}","gists_url":"https://api.github.com/users/doggy/gists{/gist_id}","starred_url":"https://api.github.com/users/doggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doggy/subscriptions","organizations_url":"https://api.github.com/users/doggy/orgs","repos_url":"https://api.github.com/users/doggy/repos","events_url":"https://api.github.com/users/doggy/events{/privacy}","received_events_url":"https://api.github.com/users/doggy/received_events","type":"User","site_admin":false},"body":"Verified with latest mpv head sources.\r\n\r\n```\r\nclang -o cocoa-openglcb cocoa-openglcb.m -I/Users/doug/WorkSpace/mpv.git/install/include -L/Users/doug/WorkSpace/mpv.git/install/lib -lmpv -framework Cocoa -framework OpenGL\r\n```\r\n","created_at":"2018-06-16T11:17:38Z","updated_at":"2018-06-16T13:13:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63e1b3956c49ba5b68bd686ac26643dee4aa4545","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/23/commits","review_comments_url":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/23/comments","review_comment_url":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mpv-player/mpv-examples/issues/23/comments","statuses_url":"https://api.github.com/repos/mpv-player/mpv-examples/statuses/bcb11eb4a19b64df3ea2ea0885c71e9d0d9ecfeb","head":{"label":"doggy:portRenderApi","ref":"portRenderApi","sha":"bcb11eb4a19b64df3ea2ea0885c71e9d0d9ecfeb","user":{"login":"doggy","id":443524,"node_id":"MDQ6VXNlcjQ0MzUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/443524?v=4","gravatar_id":"","url":"https://api.github.com/users/doggy","html_url":"https://github.com/doggy","followers_url":"https://api.github.com/users/doggy/followers","following_url":"https://api.github.com/users/doggy/following{/other_user}","gists_url":"https://api.github.com/users/doggy/gists{/gist_id}","starred_url":"https://api.github.com/users/doggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doggy/subscriptions","organizations_url":"https://api.github.com/users/doggy/orgs","repos_url":"https://api.github.com/users/doggy/repos","events_url":"https://api.github.com/users/doggy/events{/privacy}","received_events_url":"https://api.github.com/users/doggy/received_events","type":"User","site_admin":false},"repo":{"id":137572726,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc1NzI3MjY=","name":"mpv-examples","full_name":"doggy/mpv-examples","owner":{"login":"doggy","id":443524,"node_id":"MDQ6VXNlcjQ0MzUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/443524?v=4","gravatar_id":"","url":"https://api.github.com/users/doggy","html_url":"https://github.com/doggy","followers_url":"https://api.github.com/users/doggy/followers","following_url":"https://api.github.com/users/doggy/following{/other_user}","gists_url":"https://api.github.com/users/doggy/gists{/gist_id}","starred_url":"https://api.github.com/users/doggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doggy/subscriptions","organizations_url":"https://api.github.com/users/doggy/orgs","repos_url":"https://api.github.com/users/doggy/repos","events_url":"https://api.github.com/users/doggy/events{/privacy}","received_events_url":"https://api.github.com/users/doggy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/doggy/mpv-examples","description":"📚","fork":true,"url":"https://api.github.com/repos/doggy/mpv-examples","forks_url":"https://api.github.com/repos/doggy/mpv-examples/forks","keys_url":"https://api.github.com/repos/doggy/mpv-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doggy/mpv-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doggy/mpv-examples/teams","hooks_url":"https://api.github.com/repos/doggy/mpv-examples/hooks","issue_events_url":"https://api.github.com/repos/doggy/mpv-examples/issues/events{/number}","events_url":"https://api.github.com/repos/doggy/mpv-examples/events","assignees_url":"https://api.github.com/repos/doggy/mpv-examples/assignees{/user}","branches_url":"https://api.github.com/repos/doggy/mpv-examples/branches{/branch}","tags_url":"https://api.github.com/repos/doggy/mpv-examples/tags","blobs_url":"https://api.github.com/repos/doggy/mpv-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doggy/mpv-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doggy/mpv-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/doggy/mpv-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doggy/mpv-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/doggy/mpv-examples/languages","stargazers_url":"https://api.github.com/repos/doggy/mpv-examples/stargazers","contributors_url":"https://api.github.com/repos/doggy/mpv-examples/contributors","subscribers_url":"https://api.github.com/repos/doggy/mpv-examples/subscribers","subscription_url":"https://api.github.com/repos/doggy/mpv-examples/subscription","commits_url":"https://api.github.com/repos/doggy/mpv-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/doggy/mpv-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/doggy/mpv-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/doggy/mpv-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/doggy/mpv-examples/contents/{+path}","compare_url":"https://api.github.com/repos/doggy/mpv-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doggy/mpv-examples/merges","archive_url":"https://api.github.com/repos/doggy/mpv-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doggy/mpv-examples/downloads","issues_url":"https://api.github.com/repos/doggy/mpv-examples/issues{/number}","pulls_url":"https://api.github.com/repos/doggy/mpv-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/doggy/mpv-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/doggy/mpv-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doggy/mpv-examples/labels{/name}","releases_url":"https://api.github.com/repos/doggy/mpv-examples/releases{/id}","deployments_url":"https://api.github.com/repos/doggy/mpv-examples/deployments","created_at":"2018-06-16T10:32:40Z","updated_at":"2018-06-16T10:32:41Z","pushed_at":"2018-06-16T11:13:15Z","git_url":"git://github.com/doggy/mpv-examples.git","ssh_url":"git@github.com:doggy/mpv-examples.git","clone_url":"https://github.com/doggy/mpv-examples.git","svn_url":"https://github.com/doggy/mpv-examples","homepage":"","size":50,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mpv-player:master","ref":"master","sha":"e72572b7b2bae5f3512ff7f188ce0e99a4383c42","user":{"login":"mpv-player","id":2550273,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTAyNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2550273?v=4","gravatar_id":"","url":"https://api.github.com/users/mpv-player","html_url":"https://github.com/mpv-player","followers_url":"https://api.github.com/users/mpv-player/followers","following_url":"https://api.github.com/users/mpv-player/following{/other_user}","gists_url":"https://api.github.com/users/mpv-player/gists{/gist_id}","starred_url":"https://api.github.com/users/mpv-player/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpv-player/subscriptions","organizations_url":"https://api.github.com/users/mpv-player/orgs","repos_url":"https://api.github.com/users/mpv-player/repos","events_url":"https://api.github.com/users/mpv-player/events{/privacy}","received_events_url":"https://api.github.com/users/mpv-player/received_events","type":"Organization","site_admin":false},"repo":{"id":53614367,"node_id":"MDEwOlJlcG9zaXRvcnk1MzYxNDM2Nw==","name":"mpv-examples","full_name":"mpv-player/mpv-examples","owner":{"login":"mpv-player","id":2550273,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTAyNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2550273?v=4","gravatar_id":"","url":"https://api.github.com/users/mpv-player","html_url":"https://github.com/mpv-player","followers_url":"https://api.github.com/users/mpv-player/followers","following_url":"https://api.github.com/users/mpv-player/following{/other_user}","gists_url":"https://api.github.com/users/mpv-player/gists{/gist_id}","starred_url":"https://api.github.com/users/mpv-player/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpv-player/subscriptions","organizations_url":"https://api.github.com/users/mpv-player/orgs","repos_url":"https://api.github.com/users/mpv-player/repos","events_url":"https://api.github.com/users/mpv-player/events{/privacy}","received_events_url":"https://api.github.com/users/mpv-player/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mpv-player/mpv-examples","description":"📚","fork":false,"url":"https://api.github.com/repos/mpv-player/mpv-examples","forks_url":"https://api.github.com/repos/mpv-player/mpv-examples/forks","keys_url":"https://api.github.com/repos/mpv-player/mpv-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpv-player/mpv-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpv-player/mpv-examples/teams","hooks_url":"https://api.github.com/repos/mpv-player/mpv-examples/hooks","issue_events_url":"https://api.github.com/repos/mpv-player/mpv-examples/issues/events{/number}","events_url":"https://api.github.com/repos/mpv-player/mpv-examples/events","assignees_url":"https://api.github.com/repos/mpv-player/mpv-examples/assignees{/user}","branches_url":"https://api.github.com/repos/mpv-player/mpv-examples/branches{/branch}","tags_url":"https://api.github.com/repos/mpv-player/mpv-examples/tags","blobs_url":"https://api.github.com/repos/mpv-player/mpv-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpv-player/mpv-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpv-player/mpv-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpv-player/mpv-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpv-player/mpv-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/mpv-player/mpv-examples/languages","stargazers_url":"https://api.github.com/repos/mpv-player/mpv-examples/stargazers","contributors_url":"https://api.github.com/repos/mpv-player/mpv-examples/contributors","subscribers_url":"https://api.github.com/repos/mpv-player/mpv-examples/subscribers","subscription_url":"https://api.github.com/repos/mpv-player/mpv-examples/subscription","commits_url":"https://api.github.com/repos/mpv-player/mpv-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpv-player/mpv-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpv-player/mpv-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpv-player/mpv-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpv-player/mpv-examples/contents/{+path}","compare_url":"https://api.github.com/repos/mpv-player/mpv-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpv-player/mpv-examples/merges","archive_url":"https://api.github.com/repos/mpv-player/mpv-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpv-player/mpv-examples/downloads","issues_url":"https://api.github.com/repos/mpv-player/mpv-examples/issues{/number}","pulls_url":"https://api.github.com/repos/mpv-player/mpv-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/mpv-player/mpv-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/mpv-player/mpv-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpv-player/mpv-examples/labels{/name}","releases_url":"https://api.github.com/repos/mpv-player/mpv-examples/releases{/id}","deployments_url":"https://api.github.com/repos/mpv-player/mpv-examples/deployments","created_at":"2016-03-10T20:22:07Z","updated_at":"2018-06-04T08:46:42Z","pushed_at":"2018-06-16T11:17:39Z","git_url":"git://github.com/mpv-player/mpv-examples.git","ssh_url":"git@github.com:mpv-player/mpv-examples.git","clone_url":"https://github.com/mpv-player/mpv-examples.git","svn_url":"https://github.com/mpv-player/mpv-examples","homepage":"","size":49,"stargazers_count":47,"watchers_count":47,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":29,"open_issues":11,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/23"},"html":{"href":"https://github.com/mpv-player/mpv-examples/pull/23"},"issue":{"href":"https://api.github.com/repos/mpv-player/mpv-examples/issues/23"},"comments":{"href":"https://api.github.com/repos/mpv-player/mpv-examples/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mpv-player/mpv-examples/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/mpv-player/mpv-examples/statuses/bcb11eb4a19b64df3ea2ea0885c71e9d0d9ecfeb"}},"author_association":"NONE"}}
{"actor":{"display_login":"Akemi"}}