{"action":"created","comment":{"url":"https://api.github.com/repos/CasparCG/Server/pulls/comments/88949000","pull_request_review_id":9504579,"id":88949000,"diff_hunk":"@@ -405,74 +408,77 @@ struct ffmpeg_producer : public core::frame_producer_base\n \t\tif (is_url() || input_.loop())\n \t\t\treturn std::numeric_limits<uint32_t>::max();\n \n-\t\tuint32_t nb_frames = file_nb_frames();\n-\n-\t\tnb_frames = std::min(length_, nb_frames - start_);\n-\t\tnb_frames = muxer_->calc_nb_frames(nb_frames);\n+\t\tauto nb_frames = std::min(input_.out(), file_nb_frames());\n+\t\tif(nb_frames >= input_.in()) nb_frames -= input_.in(); else nb_frames = 0;\n \n-\t\treturn nb_frames;\n+\t\treturn muxer_->calc_nb_frames(nb_frames);\n \t}\n \n \tuint32_t file_nb_frames() const\n \t{\n-\t\tuint32_t file_nb_frames = 0;\n-\t\tfile_nb_frames = std::max(file_nb_frames, video_decoder_ ? video_decoder_->nb_frames() : 0);\n-\t\treturn file_nb_frames;\n+\t\treturn video_decoder_ ? video_decoder_->nb_frames() : 0;\n \t}\n \n \tstd::future<std::wstring> call(const std::vector<std::wstring>& params) override\n \t{\n-\t\tstatic const boost::wregex loop_exp(LR\"(LOOP\\s*(?<VALUE>\\d?)?)\", boost::regex::icase);\n-\t\tstatic const boost::wregex seek_exp(LR\"(SEEK\\s+(?<VALUE>(\\+|-)?\\d+)(\\s+(?<WHENCE>REL|END))?)\", boost::regex::icase);\n-\t\tstatic const boost::wregex length_exp(LR\"(LENGTH\\s+(?<VALUE>\\d+)?)\", boost::regex::icase);\n-\t\tstatic const boost::wregex start_exp(LR\"(START\\s+(?<VALUE>\\d+)?)\", boost::regex::icase);\n-\n-\t\tauto param = boost::algorithm::join(params, L\" \");\n-\n \t\tstd::wstring result;\n \n-\t\tboost::wsmatch what;\n-\t\tif(boost::regex_match(param, what, loop_exp))\n-\t\t{\n-\t\t\tauto value = what[\"VALUE\"].str();\n-\t\t\tif (!value.empty())\n-\t\t\t\tinput_.loop(boost::lexical_cast<bool>(value));\n-\t\t\tresult = boost::lexical_cast<std::wstring>(input_.loop());\n-\t\t}\n-\t\telse if(boost::regex_match(param, what, seek_exp))\n+\t\tif(params.size())\n \t\t{\n-\t\t\tauto value = boost::lexical_cast<int64_t>(what[\"VALUE\"].str());\n-\t\t\tauto whence = what[\"WHENCE\"].str();\n-\t\t\tauto total = file_nb_frames();\n+\t\t\tstd::wstring cmd = params.at(0), value;\n+\t\t\tif(params.size() > 1) value = params.at(1);","path":"modules/ffmpeg/producer/ffmpeg_producer.cpp","position":120,"original_position":131,"commit_id":"6408e66840dbea845766ac49c2a82ac80d0c88d8","original_commit_id":"7a40910e1ced7e850401780f9b9b401a5e7f8c8e","user":{"login":"dimitry-ishenko","id":2858291,"avatar_url":"https://avatars.githubusercontent.com/u/2858291?v=3","gravatar_id":"","url":"https://api.github.com/users/dimitry-ishenko","html_url":"https://github.com/dimitry-ishenko","followers_url":"https://api.github.com/users/dimitry-ishenko/followers","following_url":"https://api.github.com/users/dimitry-ishenko/following{/other_user}","gists_url":"https://api.github.com/users/dimitry-ishenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitry-ishenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitry-ishenko/subscriptions","organizations_url":"https://api.github.com/users/dimitry-ishenko/orgs","repos_url":"https://api.github.com/users/dimitry-ishenko/repos","events_url":"https://api.github.com/users/dimitry-ishenko/events{/privacy}","received_events_url":"https://api.github.com/users/dimitry-ishenko/received_events","type":"User","site_admin":false},"body":"I figured. I've fixed it everywhere and will resubmit in a minute","created_at":"2016-11-21T17:46:50Z","updated_at":"2016-11-21T17:46:50Z","html_url":"https://github.com/CasparCG/Server/pull/501#discussion_r88949000","pull_request_url":"https://api.github.com/repos/CasparCG/Server/pulls/501","_links":{"self":{"href":"https://api.github.com/repos/CasparCG/Server/pulls/comments/88949000"},"html":{"href":"https://github.com/CasparCG/Server/pull/501#discussion_r88949000"},"pull_request":{"href":"https://api.github.com/repos/CasparCG/Server/pulls/501"}}},"pull_request":{"url":"https://api.github.com/repos/CasparCG/Server/pulls/501","id":94425888,"html_url":"https://github.com/CasparCG/Server/pull/501","diff_url":"https://github.com/CasparCG/Server/pull/501.diff","patch_url":"https://github.com/CasparCG/Server/pull/501.patch","issue_url":"https://api.github.com/repos/CasparCG/Server/issues/501","number":501,"state":"open","locked":false,"title":"Add support for IN and OUT parameters in PLAY, CALL and SEEK commands","user":{"login":"dimitry-ishenko","id":2858291,"avatar_url":"https://avatars.githubusercontent.com/u/2858291?v=3","gravatar_id":"","url":"https://api.github.com/users/dimitry-ishenko","html_url":"https://github.com/dimitry-ishenko","followers_url":"https://api.github.com/users/dimitry-ishenko/followers","following_url":"https://api.github.com/users/dimitry-ishenko/following{/other_user}","gists_url":"https://api.github.com/users/dimitry-ishenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitry-ishenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitry-ishenko/subscriptions","organizations_url":"https://api.github.com/users/dimitry-ishenko/orgs","repos_url":"https://api.github.com/users/dimitry-ishenko/repos","events_url":"https://api.github.com/users/dimitry-ishenko/events{/privacy}","received_events_url":"https://api.github.com/users/dimitry-ishenko/received_events","type":"User","site_admin":false},"body":"This patch adds support for the following `PLAY` command syntax:\r\n\r\n    PLAY 1-10 folder/clip IN 10 LENGTH 50\r\n    PLAY 1-10 folder/clip IN 10 OUT 60 (equivalent to the above)\r\n\r\n(Use of `SEEK` instead of `IN` is still supported.)\r\n\r\nFollowing `SEEK` command syntax is now supported:\r\n\r\n    CALL 1-10 SEEK 123 (seek to absolute frame 123)\r\n    CALL 1-10 SEEK REL 10 (seek 10 frames forward from current position)\r\n    CALL 1-10 SEEK REL -50 (seek 50 frames back from current position)\r\n    CALL 1-10 SEEK IN (seek to IN point)\r\n    CALL 1-10 SEEK IN 10 (seek to 10 frames after IN point)\r\n    CALL 1-10 SEEK IN -50 (seek to 50 frames before IN point)\r\n\r\nAdditionally, `OUT` and `END` can be specified in place of `IN` to seek relative to the OUT point or the end of the file respectively.\r\n\r\nFollowing `CALL` command syntax is now supported:\r\n\r\n    CALL 1-10 IN 10 (set IN point to 10 frames)\r\n    CALL 1-10 START 10 (still supported; equivalent to the above)\r\n    CALL 1-10 OUT 60 (set OUT point to 60 frames)\r\n    CALL 1-10 LENGTH 50 (set OUT point to IN + 50 frames)\r\n\r\nAs I've mentioned in Issue #499 the behaviour of the `LENGTH` parameter is now modified to be no longer affected by seeking during playback. In other words, when the `LENGTH` command is issued, it is used to calculate the OUT point relative to the current IN point. (NB: If the IN point is modified afterwards, the OUT point is not adjusted to keep the same length.)","created_at":"2016-11-18T19:53:44Z","updated_at":"2016-11-21T17:46:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47330395352e7c7f4598c3b84ca263d7bee4e23a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CasparCG/Server/pulls/501/commits","review_comments_url":"https://api.github.com/repos/CasparCG/Server/pulls/501/comments","review_comment_url":"https://api.github.com/repos/CasparCG/Server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CasparCG/Server/issues/501/comments","statuses_url":"https://api.github.com/repos/CasparCG/Server/statuses/6408e66840dbea845766ac49c2a82ac80d0c88d8","head":{"label":"dimitry-ishenko-casparcg:next","ref":"next","sha":"6408e66840dbea845766ac49c2a82ac80d0c88d8","user":{"login":"dimitry-ishenko-casparcg","id":13240663,"avatar_url":"https://avatars.githubusercontent.com/u/13240663?v=3","gravatar_id":"","url":"https://api.github.com/users/dimitry-ishenko-casparcg","html_url":"https://github.com/dimitry-ishenko-casparcg","followers_url":"https://api.github.com/users/dimitry-ishenko-casparcg/followers","following_url":"https://api.github.com/users/dimitry-ishenko-casparcg/following{/other_user}","gists_url":"https://api.github.com/users/dimitry-ishenko-casparcg/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitry-ishenko-casparcg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitry-ishenko-casparcg/subscriptions","organizations_url":"https://api.github.com/users/dimitry-ishenko-casparcg/orgs","repos_url":"https://api.github.com/users/dimitry-ishenko-casparcg/repos","events_url":"https://api.github.com/users/dimitry-ishenko-casparcg/events{/privacy}","received_events_url":"https://api.github.com/users/dimitry-ishenko-casparcg/received_events","type":"Organization","site_admin":false},"repo":{"id":38765800,"name":"Server","full_name":"dimitry-ishenko-casparcg/Server","owner":{"login":"dimitry-ishenko-casparcg","id":13240663,"avatar_url":"https://avatars.githubusercontent.com/u/13240663?v=3","gravatar_id":"","url":"https://api.github.com/users/dimitry-ishenko-casparcg","html_url":"https://github.com/dimitry-ishenko-casparcg","followers_url":"https://api.github.com/users/dimitry-ishenko-casparcg/followers","following_url":"https://api.github.com/users/dimitry-ishenko-casparcg/following{/other_user}","gists_url":"https://api.github.com/users/dimitry-ishenko-casparcg/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitry-ishenko-casparcg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitry-ishenko-casparcg/subscriptions","organizations_url":"https://api.github.com/users/dimitry-ishenko-casparcg/orgs","repos_url":"https://api.github.com/users/dimitry-ishenko-casparcg/repos","events_url":"https://api.github.com/users/dimitry-ishenko-casparcg/events{/privacy}","received_events_url":"https://api.github.com/users/dimitry-ishenko-casparcg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimitry-ishenko-casparcg/Server","description":"CasparCG Server is a Windows software used to play out professional graphics, audio and video to multiple outputs. It has been in 24/7 broadcast production since 2006. Ready-to-use downloads are available at the official site.","fork":true,"url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server","forks_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/forks","keys_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/teams","hooks_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/hooks","issue_events_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/issues/events{/number}","events_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/events","assignees_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/assignees{/user}","branches_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/branches{/branch}","tags_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/tags","blobs_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/statuses/{sha}","languages_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/languages","stargazers_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/stargazers","contributors_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/contributors","subscribers_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/subscribers","subscription_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/subscription","commits_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/contents/{+path}","compare_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/merges","archive_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/downloads","issues_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/issues{/number}","pulls_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/pulls{/number}","milestones_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/milestones{/number}","notifications_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/labels{/name}","releases_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/releases{/id}","deployments_url":"https://api.github.com/repos/dimitry-ishenko-casparcg/Server/deployments","created_at":"2015-07-08T16:23:29Z","updated_at":"2016-03-08T15:49:55Z","pushed_at":"2016-11-21T17:02:55Z","git_url":"git://github.com/dimitry-ishenko-casparcg/Server.git","ssh_url":"git@github.com:dimitry-ishenko-casparcg/Server.git","clone_url":"https://github.com/dimitry-ishenko-casparcg/Server.git","svn_url":"https://github.com/dimitry-ishenko-casparcg/Server","homepage":"http://www.casparcg.com/download/","size":1572728,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.1.0"}},"base":{"label":"CasparCG:2.1.0","ref":"2.1.0","sha":"92e13a827000914bc26d2839292f46098f53ee78","user":{"login":"CasparCG","id":2979769,"avatar_url":"https://avatars.githubusercontent.com/u/2979769?v=3","gravatar_id":"","url":"https://api.github.com/users/CasparCG","html_url":"https://github.com/CasparCG","followers_url":"https://api.github.com/users/CasparCG/followers","following_url":"https://api.github.com/users/CasparCG/following{/other_user}","gists_url":"https://api.github.com/users/CasparCG/gists{/gist_id}","starred_url":"https://api.github.com/users/CasparCG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CasparCG/subscriptions","organizations_url":"https://api.github.com/users/CasparCG/orgs","repos_url":"https://api.github.com/users/CasparCG/repos","events_url":"https://api.github.com/users/CasparCG/events{/privacy}","received_events_url":"https://api.github.com/users/CasparCG/received_events","type":"Organization","site_admin":false},"repo":{"id":9024450,"name":"Server","full_name":"CasparCG/Server","owner":{"login":"CasparCG","id":2979769,"avatar_url":"https://avatars.githubusercontent.com/u/2979769?v=3","gravatar_id":"","url":"https://api.github.com/users/CasparCG","html_url":"https://github.com/CasparCG","followers_url":"https://api.github.com/users/CasparCG/followers","following_url":"https://api.github.com/users/CasparCG/following{/other_user}","gists_url":"https://api.github.com/users/CasparCG/gists{/gist_id}","starred_url":"https://api.github.com/users/CasparCG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CasparCG/subscriptions","organizations_url":"https://api.github.com/users/CasparCG/orgs","repos_url":"https://api.github.com/users/CasparCG/repos","events_url":"https://api.github.com/users/CasparCG/events{/privacy}","received_events_url":"https://api.github.com/users/CasparCG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CasparCG/Server","description":"CasparCG Server is a Windows and Linux software used to play out professional graphics, audio and video to multiple outputs. It has been in 24/7 broadcast production since 2006. Ready-to-use downloads are available at the official site http://casparcg.com.","fork":false,"url":"https://api.github.com/repos/CasparCG/Server","forks_url":"https://api.github.com/repos/CasparCG/Server/forks","keys_url":"https://api.github.com/repos/CasparCG/Server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CasparCG/Server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CasparCG/Server/teams","hooks_url":"https://api.github.com/repos/CasparCG/Server/hooks","issue_events_url":"https://api.github.com/repos/CasparCG/Server/issues/events{/number}","events_url":"https://api.github.com/repos/CasparCG/Server/events","assignees_url":"https://api.github.com/repos/CasparCG/Server/assignees{/user}","branches_url":"https://api.github.com/repos/CasparCG/Server/branches{/branch}","tags_url":"https://api.github.com/repos/CasparCG/Server/tags","blobs_url":"https://api.github.com/repos/CasparCG/Server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CasparCG/Server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CasparCG/Server/git/refs{/sha}","trees_url":"https://api.github.com/repos/CasparCG/Server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CasparCG/Server/statuses/{sha}","languages_url":"https://api.github.com/repos/CasparCG/Server/languages","stargazers_url":"https://api.github.com/repos/CasparCG/Server/stargazers","contributors_url":"https://api.github.com/repos/CasparCG/Server/contributors","subscribers_url":"https://api.github.com/repos/CasparCG/Server/subscribers","subscription_url":"https://api.github.com/repos/CasparCG/Server/subscription","commits_url":"https://api.github.com/repos/CasparCG/Server/commits{/sha}","git_commits_url":"https://api.github.com/repos/CasparCG/Server/git/commits{/sha}","comments_url":"https://api.github.com/repos/CasparCG/Server/comments{/number}","issue_comment_url":"https://api.github.com/repos/CasparCG/Server/issues/comments{/number}","contents_url":"https://api.github.com/repos/CasparCG/Server/contents/{+path}","compare_url":"https://api.github.com/repos/CasparCG/Server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CasparCG/Server/merges","archive_url":"https://api.github.com/repos/CasparCG/Server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CasparCG/Server/downloads","issues_url":"https://api.github.com/repos/CasparCG/Server/issues{/number}","pulls_url":"https://api.github.com/repos/CasparCG/Server/pulls{/number}","milestones_url":"https://api.github.com/repos/CasparCG/Server/milestones{/number}","notifications_url":"https://api.github.com/repos/CasparCG/Server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CasparCG/Server/labels{/name}","releases_url":"https://api.github.com/repos/CasparCG/Server/releases{/id}","deployments_url":"https://api.github.com/repos/CasparCG/Server/deployments","created_at":"2013-03-26T06:32:20Z","updated_at":"2016-11-17T18:42:35Z","pushed_at":"2016-11-21T17:02:56Z","git_url":"git://github.com/CasparCG/Server.git","ssh_url":"git@github.com:CasparCG/Server.git","clone_url":"https://github.com/CasparCG/Server.git","svn_url":"https://github.com/CasparCG/Server","homepage":"","size":1858326,"stargazers_count":164,"watchers_count":164,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":94,"mirror_url":null,"open_issues_count":233,"forks":94,"open_issues":233,"watchers":164,"default_branch":"2.1.0"}},"_links":{"self":{"href":"https://api.github.com/repos/CasparCG/Server/pulls/501"},"html":{"href":"https://github.com/CasparCG/Server/pull/501"},"issue":{"href":"https://api.github.com/repos/CasparCG/Server/issues/501"},"comments":{"href":"https://api.github.com/repos/CasparCG/Server/issues/501/comments"},"review_comments":{"href":"https://api.github.com/repos/CasparCG/Server/pulls/501/comments"},"review_comment":{"href":"https://api.github.com/repos/CasparCG/Server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CasparCG/Server/pulls/501/commits"},"statuses":{"href":"https://api.github.com/repos/CasparCG/Server/statuses/6408e66840dbea845766ac49c2a82ac80d0c88d8"}}}}
{"actor":{"display_login":"dimitry-ishenko"}}