{"action":"created","comment":{"url":"https://api.github.com/repos/pdfpc/pdfpc/pulls/comments/30770672","id":30770672,"diff_hunk":"@@ -498,10 +526,35 @@ namespace pdfpc {\n             cr.scale(this.scalex, -this.scaley);\n \n             this.draw_seek_bar(cr, timestamp);\n-        }\n \n+            // if a stop time is defined, stop there (but still let\n+            // the user manually seek *after* this timestamp)\n+            if (this.stoptime != 0 && \n+                this.stoptime * Gst.SECOND < timestamp &&\n+                timestamp < (this.stoptime + 0.2) * Gst.SECOND) {\n+                if (this.loop) {\n+                    this.pipeline.seek_simple(Gst.Format.TIME, Gst.SeekFlags.FLUSH, this.starttime * Gst.SECOND);\n+                } else {\n+                    // Can't seek to beginning w/o updating output, so mark to seek later\n+                    this.eos = true;\n+                    this.pause();\n+                }\n+            }\n+\n+        }\n+        \n         private void draw_seek_bar(Cairo.Context cr, uint64 timestamp) {\n+            double start = 1.0*this.starttime*Gst.SECOND / this.duration;\n+            double stop = 1.0*this.stoptime*Gst.SECOND / this.duration;\n+\n+            // special case: only starttime is defined\n+            if (this.starttime != 0 && this.stoptime == 0) stop = 1.0;","path":"src/classes/action/movie.vala","position":138,"original_position":138,"commit_id":"3e091ab3509244f8ec5a365559d95f9599916bbb","original_commit_id":"3e091ab3509244f8ec5a365559d95f9599916bbb","user":{"login":"rschroll","id":367903,"avatar_url":"https://avatars.githubusercontent.com/u/367903?v=3","gravatar_id":"","url":"https://api.github.com/users/rschroll","html_url":"https://github.com/rschroll","followers_url":"https://api.github.com/users/rschroll/followers","following_url":"https://api.github.com/users/rschroll/following{/other_user}","gists_url":"https://api.github.com/users/rschroll/gists{/gist_id}","starred_url":"https://api.github.com/users/rschroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschroll/subscriptions","organizations_url":"https://api.github.com/users/rschroll/orgs","repos_url":"https://api.github.com/users/rschroll/repos","events_url":"https://api.github.com/users/rschroll/events{/privacy}","received_events_url":"https://api.github.com/users/rschroll/received_events","type":"User","site_admin":false},"body":"Put the body of the if statement on its own line.","created_at":"2015-05-21T03:35:08Z","updated_at":"2015-05-21T03:35:08Z","html_url":"https://github.com/pdfpc/pdfpc/pull/42#discussion_r30770672","pull_request_url":"https://api.github.com/repos/pdfpc/pdfpc/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/pdfpc/pdfpc/pulls/comments/30770672"},"html":{"href":"https://github.com/pdfpc/pdfpc/pull/42#discussion_r30770672"},"pull_request":{"href":"https://api.github.com/repos/pdfpc/pdfpc/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/pdfpc/pdfpc/pulls/42","id":35878360,"html_url":"https://github.com/pdfpc/pdfpc/pull/42","diff_url":"https://github.com/pdfpc/pdfpc/pull/42.diff","patch_url":"https://github.com/pdfpc/pdfpc/pull/42.patch","issue_url":"https://api.github.com/repos/pdfpc/pdfpc/issues/42","number":42,"state":"open","locked":false,"title":"Support playing subsequence of movies via ?start=xxx&stop=xxx","user":{"login":"severin-lemaignan","id":385379,"avatar_url":"https://avatars.githubusercontent.com/u/385379?v=3","gravatar_id":"","url":"https://api.github.com/users/severin-lemaignan","html_url":"https://github.com/severin-lemaignan","followers_url":"https://api.github.com/users/severin-lemaignan/followers","following_url":"https://api.github.com/users/severin-lemaignan/following{/other_user}","gists_url":"https://api.github.com/users/severin-lemaignan/gists{/gist_id}","starred_url":"https://api.github.com/users/severin-lemaignan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/severin-lemaignan/subscriptions","organizations_url":"https://api.github.com/users/severin-lemaignan/orgs","repos_url":"https://api.github.com/users/severin-lemaignan/repos","events_url":"https://api.github.com/users/severin-lemaignan/events{/privacy}","received_events_url":"https://api.github.com/users/severin-lemaignan/received_events","type":"User","site_admin":false},"body":"When movies are embedded in the PDF via a link (ie\r\n\\href{run:movie.avi}{...}), pdfpc will now treat queries arguments\r\n'start' and 'stop' as indication of a start and stop time, in seconds\r\nfrom the beginning of the movie.\r\n\r\nThose can be used in combination with existing 'autostart' and 'loop'.\r\n\r\nHowever, a remaining (mysterious) bug prevent 'loop' of looping when\r\nusing 'stop' ('start' works)\r\n\r\nThe seek bar highlights the sub-sequence and still let the user to\r\nmanually seek out of it.\r\n\r\nSuperseed #40 ","created_at":"2015-05-20T21:30:57Z","updated_at":"2015-05-21T03:35:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5217739db8e757b53ab68ab686856bcb0ab9828e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pdfpc/pdfpc/pulls/42/commits","review_comments_url":"https://api.github.com/repos/pdfpc/pdfpc/pulls/42/comments","review_comment_url":"https://api.github.com/repos/pdfpc/pdfpc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pdfpc/pdfpc/issues/42/comments","statuses_url":"https://api.github.com/repos/pdfpc/pdfpc/statuses/3e091ab3509244f8ec5a365559d95f9599916bbb","head":{"label":"severin-lemaignan:startstop","ref":"startstop","sha":"3e091ab3509244f8ec5a365559d95f9599916bbb","user":{"login":"severin-lemaignan","id":385379,"avatar_url":"https://avatars.githubusercontent.com/u/385379?v=3","gravatar_id":"","url":"https://api.github.com/users/severin-lemaignan","html_url":"https://github.com/severin-lemaignan","followers_url":"https://api.github.com/users/severin-lemaignan/followers","following_url":"https://api.github.com/users/severin-lemaignan/following{/other_user}","gists_url":"https://api.github.com/users/severin-lemaignan/gists{/gist_id}","starred_url":"https://api.github.com/users/severin-lemaignan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/severin-lemaignan/subscriptions","organizations_url":"https://api.github.com/users/severin-lemaignan/orgs","repos_url":"https://api.github.com/users/severin-lemaignan/repos","events_url":"https://api.github.com/users/severin-lemaignan/events{/privacy}","received_events_url":"https://api.github.com/users/severin-lemaignan/received_events","type":"User","site_admin":false},"repo":{"id":21311437,"name":"pdfpc","full_name":"severin-lemaignan/pdfpc","owner":{"login":"severin-lemaignan","id":385379,"avatar_url":"https://avatars.githubusercontent.com/u/385379?v=3","gravatar_id":"","url":"https://api.github.com/users/severin-lemaignan","html_url":"https://github.com/severin-lemaignan","followers_url":"https://api.github.com/users/severin-lemaignan/followers","following_url":"https://api.github.com/users/severin-lemaignan/following{/other_user}","gists_url":"https://api.github.com/users/severin-lemaignan/gists{/gist_id}","starred_url":"https://api.github.com/users/severin-lemaignan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/severin-lemaignan/subscriptions","organizations_url":"https://api.github.com/users/severin-lemaignan/orgs","repos_url":"https://api.github.com/users/severin-lemaignan/repos","events_url":"https://api.github.com/users/severin-lemaignan/events{/privacy}","received_events_url":"https://api.github.com/users/severin-lemaignan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/severin-lemaignan/pdfpc","description":"A presenter console with multi-monitor support for PDF files.","fork":true,"url":"https://api.github.com/repos/severin-lemaignan/pdfpc","forks_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/forks","keys_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/teams","hooks_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/hooks","issue_events_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/issues/events{/number}","events_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/events","assignees_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/assignees{/user}","branches_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/branches{/branch}","tags_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/tags","blobs_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/statuses/{sha}","languages_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/languages","stargazers_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/stargazers","contributors_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/contributors","subscribers_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/subscribers","subscription_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/subscription","commits_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/contents/{+path}","compare_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/merges","archive_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/downloads","issues_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/issues{/number}","pulls_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/pulls{/number}","milestones_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/milestones{/number}","notifications_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/labels{/name}","releases_url":"https://api.github.com/repos/severin-lemaignan/pdfpc/releases{/id}","created_at":"2014-06-28T21:33:05Z","updated_at":"2014-06-28T18:17:31Z","pushed_at":"2015-05-20T21:32:16Z","git_url":"git://github.com/severin-lemaignan/pdfpc.git","ssh_url":"git@github.com:severin-lemaignan/pdfpc.git","clone_url":"https://github.com/severin-lemaignan/pdfpc.git","svn_url":"https://github.com/severin-lemaignan/pdfpc","homepage":"http://davvil.github.com/pdfpc/","size":2279,"stargazers_count":0,"watchers_count":0,"language":"Vala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"pdfpc:master","ref":"master","sha":"1740bced88c9f983ae7ff10f065fd3e5b18992b4","user":{"login":"pdfpc","id":11020808,"avatar_url":"https://avatars.githubusercontent.com/u/11020808?v=3","gravatar_id":"","url":"https://api.github.com/users/pdfpc","html_url":"https://github.com/pdfpc","followers_url":"https://api.github.com/users/pdfpc/followers","following_url":"https://api.github.com/users/pdfpc/following{/other_user}","gists_url":"https://api.github.com/users/pdfpc/gists{/gist_id}","starred_url":"https://api.github.com/users/pdfpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdfpc/subscriptions","organizations_url":"https://api.github.com/users/pdfpc/orgs","repos_url":"https://api.github.com/users/pdfpc/repos","events_url":"https://api.github.com/users/pdfpc/events{/privacy}","received_events_url":"https://api.github.com/users/pdfpc/received_events","type":"Organization","site_admin":false},"repo":{"id":30842668,"name":"pdfpc","full_name":"pdfpc/pdfpc","owner":{"login":"pdfpc","id":11020808,"avatar_url":"https://avatars.githubusercontent.com/u/11020808?v=3","gravatar_id":"","url":"https://api.github.com/users/pdfpc","html_url":"https://github.com/pdfpc","followers_url":"https://api.github.com/users/pdfpc/followers","following_url":"https://api.github.com/users/pdfpc/following{/other_user}","gists_url":"https://api.github.com/users/pdfpc/gists{/gist_id}","starred_url":"https://api.github.com/users/pdfpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdfpc/subscriptions","organizations_url":"https://api.github.com/users/pdfpc/orgs","repos_url":"https://api.github.com/users/pdfpc/repos","events_url":"https://api.github.com/users/pdfpc/events{/privacy}","received_events_url":"https://api.github.com/users/pdfpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pdfpc/pdfpc","description":"A presenter console with multi-monitor support for PDF files.","fork":true,"url":"https://api.github.com/repos/pdfpc/pdfpc","forks_url":"https://api.github.com/repos/pdfpc/pdfpc/forks","keys_url":"https://api.github.com/repos/pdfpc/pdfpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pdfpc/pdfpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pdfpc/pdfpc/teams","hooks_url":"https://api.github.com/repos/pdfpc/pdfpc/hooks","issue_events_url":"https://api.github.com/repos/pdfpc/pdfpc/issues/events{/number}","events_url":"https://api.github.com/repos/pdfpc/pdfpc/events","assignees_url":"https://api.github.com/repos/pdfpc/pdfpc/assignees{/user}","branches_url":"https://api.github.com/repos/pdfpc/pdfpc/branches{/branch}","tags_url":"https://api.github.com/repos/pdfpc/pdfpc/tags","blobs_url":"https://api.github.com/repos/pdfpc/pdfpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pdfpc/pdfpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pdfpc/pdfpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/pdfpc/pdfpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pdfpc/pdfpc/statuses/{sha}","languages_url":"https://api.github.com/repos/pdfpc/pdfpc/languages","stargazers_url":"https://api.github.com/repos/pdfpc/pdfpc/stargazers","contributors_url":"https://api.github.com/repos/pdfpc/pdfpc/contributors","subscribers_url":"https://api.github.com/repos/pdfpc/pdfpc/subscribers","subscription_url":"https://api.github.com/repos/pdfpc/pdfpc/subscription","commits_url":"https://api.github.com/repos/pdfpc/pdfpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/pdfpc/pdfpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/pdfpc/pdfpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/pdfpc/pdfpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/pdfpc/pdfpc/contents/{+path}","compare_url":"https://api.github.com/repos/pdfpc/pdfpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pdfpc/pdfpc/merges","archive_url":"https://api.github.com/repos/pdfpc/pdfpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pdfpc/pdfpc/downloads","issues_url":"https://api.github.com/repos/pdfpc/pdfpc/issues{/number}","pulls_url":"https://api.github.com/repos/pdfpc/pdfpc/pulls{/number}","milestones_url":"https://api.github.com/repos/pdfpc/pdfpc/milestones{/number}","notifications_url":"https://api.github.com/repos/pdfpc/pdfpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pdfpc/pdfpc/labels{/name}","releases_url":"https://api.github.com/repos/pdfpc/pdfpc/releases{/id}","created_at":"2015-02-15T21:20:57Z","updated_at":"2015-05-18T23:18:51Z","pushed_at":"2015-05-20T21:34:18Z","git_url":"git://github.com/pdfpc/pdfpc.git","ssh_url":"git@github.com:pdfpc/pdfpc.git","clone_url":"https://github.com/pdfpc/pdfpc.git","svn_url":"https://github.com/pdfpc/pdfpc","homepage":"http://davvil.github.com/pdfpc/","size":2126,"stargazers_count":23,"watchers_count":23,"language":"Vala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":15,"forks":3,"open_issues":15,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pdfpc/pdfpc/pulls/42"},"html":{"href":"https://github.com/pdfpc/pdfpc/pull/42"},"issue":{"href":"https://api.github.com/repos/pdfpc/pdfpc/issues/42"},"comments":{"href":"https://api.github.com/repos/pdfpc/pdfpc/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/pdfpc/pdfpc/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/pdfpc/pdfpc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pdfpc/pdfpc/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/pdfpc/pdfpc/statuses/3e091ab3509244f8ec5a365559d95f9599916bbb"}}}}