{"action":"created","comment":{"url":"https://api.github.com/repos/eocanha/webkit/pulls/comments/62176498","id":62176498,"diff_hunk":"@@ -0,0 +1,203 @@\n+/*\n+ * Copyright (C) 2007, 2009 Apple Inc.  All rights reserved.\n+ * Copyright (C) 2007 Collabora Ltd. All rights reserved.\n+ * Copyright (C) 2007 Alp Toker <alp@atoker.com>\n+ * Copyright (C) 2009, 2010, 2016 Igalia S.L\n+ * Copyright (C) 2014 Cable Television Laboratories, Inc.\n+ * Copyright (C) 2015 Sebastian Dröge <sebastian@centricular.com>\n+ * Copyright (C) 2015, 2016 Metrological Group B.V.\n+ *\n+ * This library is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Library General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2 of the License, or (at your option) any later version.\n+ *\n+ * This library is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Library General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Library General Public License\n+ * aint with this library; see the file COPYING.LIB.  If not, write to\n+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n+ * Boston, MA 02110-1301, USA.\n+ */\n+\n+#ifndef MediaPlayerPrivateGStreamerMSE_h\n+#define MediaPlayerPrivateGStreamerMSE_h\n+\n+#if ENABLE(VIDEO) && USE(GSTREAMER) && ENABLE(MEDIA_SOURCE)  && ENABLE(VIDEO_TRACK)\n+\n+#include \"GRefPtrGStreamer.h\"\n+#include \"MediaPlayerPrivateGStreamer.h\"\n+#include \"MediaSample.h\"\n+#include \"MediaSourceGStreamer.h\"\n+#include \"WebKitMediaSourceGStreamer.h\"\n+\n+namespace WebCore {\n+\n+class MediaSourceClientGStreamerMSE;\n+class AppendPipeline;\n+\n+class MediaPlayerPrivateGStreamerMSE : public MediaPlayerPrivateGStreamer {\n+    WTF_MAKE_NONCOPYABLE(MediaPlayerPrivateGStreamerMSE); WTF_MAKE_FAST_ALLOCATED;\n+\n+    friend class MediaSourceClientGStreamerMSE;\n+\n+public:\n+    explicit MediaPlayerPrivateGStreamerMSE(MediaPlayer*);\n+    virtual ~MediaPlayerPrivateGStreamerMSE();\n+\n+    static void registerMediaEngine(MediaEngineRegistrar);\n+\n+    void load(const String &url) override;\n+    void load(const String& url, MediaSourcePrivateClient*) override;\n+\n+    void setDownloadBuffering() override { };\n+\n+    bool isLiveStream() const override { return false; }\n+    float currentTime() const override;\n+\n+    void pause() override;\n+    bool seeking() const override;\n+    void seek(float) override;\n+    bool changePipelineState(GstState) override;\n+\n+    void durationChanged() override;\n+    MediaTime durationMediaTime() const override { return m_mediaTimeDuration; }\n+    float duration() const override;\n+    float mediaTimeForTimeValue(float timeValue) const;\n+    void setRate(float) override;\n+    std::unique_ptr<PlatformTimeRanges> buffered() const override;\n+    virtual float maxTimeSeekable() const override;\n+\n+    void sourceChanged() override;\n+\n+    void setReadyState(MediaPlayer::ReadyState state);\n+    void waitForSeekCompleted();\n+    void seekCompleted();\n+    MediaSourcePrivateClient* mediaSourcePrivateClient() { return m_mediaSource.get(); }\n+\n+    void markEndOfStream(MediaSourcePrivate::EndOfStreamStatus);\n+\n+    void trackDetected(RefPtr<AppendPipeline>, RefPtr<WebCore::TrackPrivateBase> oldTrack, RefPtr<WebCore::TrackPrivateBase> newTrack);\n+    void notifySeekNeedsData(const MediaTime& seekTime);\n+\n+private:\n+    static void getSupportedTypes(HashSet<String, ASCIICaseInsensitiveHash>&);\n+    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);\n+\n+    static bool isAvailable();\n+\n+    // TODO: reduce code duplication.\n+    void updateStates() override;\n+\n+    bool doSeek(gint64 position, float rate, GstSeekFlags seekType) override;\n+    bool doSeek();\n+    void maybeFinishSeek();\n+    void updatePlaybackRate() override;\n+    void asyncStateChangeDone() override;\n+\n+    // TODO: Implement\n+    unsigned long totalVideoFrames() override { return 0; }\n+    unsigned long droppedVideoFrames() override { return 0; }\n+    unsigned long corruptedVideoFrames() override { return 0; }\n+    MediaTime totalFrameDelay() override { return MediaTime::zeroTime(); }\n+    bool timeIsBuffered(const MediaTime &time) const;","path":"Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerMSE.h","position":106,"original_position":106,"commit_id":"4d3b91fcfb52f19e52732033c73273f4ce0c1252","original_commit_id":"4d3b91fcfb52f19e52732033c73273f4ce0c1252","user":{"login":"calvaris","id":1021526,"avatar_url":"https://avatars.githubusercontent.com/u/1021526?v=3","gravatar_id":"","url":"https://api.github.com/users/calvaris","html_url":"https://github.com/calvaris","followers_url":"https://api.github.com/users/calvaris/followers","following_url":"https://api.github.com/users/calvaris/following{/other_user}","gists_url":"https://api.github.com/users/calvaris/gists{/gist_id}","starred_url":"https://api.github.com/users/calvaris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvaris/subscriptions","organizations_url":"https://api.github.com/users/calvaris/orgs","repos_url":"https://api.github.com/users/calvaris/repos","events_url":"https://api.github.com/users/calvaris/events{/privacy}","received_events_url":"https://api.github.com/users/calvaris/received_events","type":"User","site_admin":false},"body":"isTimeBuffered","created_at":"2016-05-05T11:38:47Z","updated_at":"2016-05-05T11:38:47Z","html_url":"https://github.com/eocanha/webkit/pull/1#discussion_r62176498","pull_request_url":"https://api.github.com/repos/eocanha/webkit/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/eocanha/webkit/pulls/comments/62176498"},"html":{"href":"https://github.com/eocanha/webkit/pull/1#discussion_r62176498"},"pull_request":{"href":"https://api.github.com/repos/eocanha/webkit/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/eocanha/webkit/pulls/1","id":68888898,"html_url":"https://github.com/eocanha/webkit/pull/1","diff_url":"https://github.com/eocanha/webkit/pull/1.diff","patch_url":"https://github.com/eocanha/webkit/pull/1.patch","issue_url":"https://api.github.com/repos/eocanha/webkit/issues/1","number":1,"state":"open","locked":false,"title":"Mse backport","user":{"login":"eocanha","id":6864279,"avatar_url":"https://avatars.githubusercontent.com/u/6864279?v=3","gravatar_id":"","url":"https://api.github.com/users/eocanha","html_url":"https://github.com/eocanha","followers_url":"https://api.github.com/users/eocanha/followers","following_url":"https://api.github.com/users/eocanha/following{/other_user}","gists_url":"https://api.github.com/users/eocanha/gists{/gist_id}","starred_url":"https://api.github.com/users/eocanha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eocanha/subscriptions","organizations_url":"https://api.github.com/users/eocanha/orgs","repos_url":"https://api.github.com/users/eocanha/repos","events_url":"https://api.github.com/users/eocanha/events{/privacy}","received_events_url":"https://api.github.com/users/eocanha/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-04T16:09:56Z","updated_at":"2016-05-05T11:38:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec8b027f58be6378cc3dbd649cc75fa687318bdd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eocanha/webkit/pulls/1/commits","review_comments_url":"https://api.github.com/repos/eocanha/webkit/pulls/1/comments","review_comment_url":"https://api.github.com/repos/eocanha/webkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eocanha/webkit/issues/1/comments","statuses_url":"https://api.github.com/repos/eocanha/webkit/statuses/4d3b91fcfb52f19e52732033c73273f4ce0c1252","head":{"label":"eocanha:mse-backport-rebased-20160425-sq","ref":"mse-backport-rebased-20160425-sq","sha":"4d3b91fcfb52f19e52732033c73273f4ce0c1252","user":{"login":"eocanha","id":6864279,"avatar_url":"https://avatars.githubusercontent.com/u/6864279?v=3","gravatar_id":"","url":"https://api.github.com/users/eocanha","html_url":"https://github.com/eocanha","followers_url":"https://api.github.com/users/eocanha/followers","following_url":"https://api.github.com/users/eocanha/following{/other_user}","gists_url":"https://api.github.com/users/eocanha/gists{/gist_id}","starred_url":"https://api.github.com/users/eocanha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eocanha/subscriptions","organizations_url":"https://api.github.com/users/eocanha/orgs","repos_url":"https://api.github.com/users/eocanha/repos","events_url":"https://api.github.com/users/eocanha/events{/privacy}","received_events_url":"https://api.github.com/users/eocanha/received_events","type":"User","site_admin":false},"repo":{"id":49714349,"name":"webkit","full_name":"eocanha/webkit","owner":{"login":"eocanha","id":6864279,"avatar_url":"https://avatars.githubusercontent.com/u/6864279?v=3","gravatar_id":"","url":"https://api.github.com/users/eocanha","html_url":"https://github.com/eocanha","followers_url":"https://api.github.com/users/eocanha/followers","following_url":"https://api.github.com/users/eocanha/following{/other_user}","gists_url":"https://api.github.com/users/eocanha/gists{/gist_id}","starred_url":"https://api.github.com/users/eocanha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eocanha/subscriptions","organizations_url":"https://api.github.com/users/eocanha/orgs","repos_url":"https://api.github.com/users/eocanha/repos","events_url":"https://api.github.com/users/eocanha/events{/privacy}","received_events_url":"https://api.github.com/users/eocanha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eocanha/webkit","description":"Unofficial mirror of the WebKit SVN repository","fork":true,"url":"https://api.github.com/repos/eocanha/webkit","forks_url":"https://api.github.com/repos/eocanha/webkit/forks","keys_url":"https://api.github.com/repos/eocanha/webkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eocanha/webkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eocanha/webkit/teams","hooks_url":"https://api.github.com/repos/eocanha/webkit/hooks","issue_events_url":"https://api.github.com/repos/eocanha/webkit/issues/events{/number}","events_url":"https://api.github.com/repos/eocanha/webkit/events","assignees_url":"https://api.github.com/repos/eocanha/webkit/assignees{/user}","branches_url":"https://api.github.com/repos/eocanha/webkit/branches{/branch}","tags_url":"https://api.github.com/repos/eocanha/webkit/tags","blobs_url":"https://api.github.com/repos/eocanha/webkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eocanha/webkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eocanha/webkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/eocanha/webkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eocanha/webkit/statuses/{sha}","languages_url":"https://api.github.com/repos/eocanha/webkit/languages","stargazers_url":"https://api.github.com/repos/eocanha/webkit/stargazers","contributors_url":"https://api.github.com/repos/eocanha/webkit/contributors","subscribers_url":"https://api.github.com/repos/eocanha/webkit/subscribers","subscription_url":"https://api.github.com/repos/eocanha/webkit/subscription","commits_url":"https://api.github.com/repos/eocanha/webkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/eocanha/webkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/eocanha/webkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/eocanha/webkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/eocanha/webkit/contents/{+path}","compare_url":"https://api.github.com/repos/eocanha/webkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eocanha/webkit/merges","archive_url":"https://api.github.com/repos/eocanha/webkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eocanha/webkit/downloads","issues_url":"https://api.github.com/repos/eocanha/webkit/issues{/number}","pulls_url":"https://api.github.com/repos/eocanha/webkit/pulls{/number}","milestones_url":"https://api.github.com/repos/eocanha/webkit/milestones{/number}","notifications_url":"https://api.github.com/repos/eocanha/webkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eocanha/webkit/labels{/name}","releases_url":"https://api.github.com/repos/eocanha/webkit/releases{/id}","deployments_url":"https://api.github.com/repos/eocanha/webkit/deployments","created_at":"2016-01-15T11:07:43Z","updated_at":"2016-01-15T09:28:48Z","pushed_at":"2016-05-04T16:09:58Z","git_url":"git://github.com/eocanha/webkit.git","ssh_url":"git@github.com:eocanha/webkit.git","clone_url":"https://github.com/eocanha/webkit.git","svn_url":"https://github.com/eocanha/webkit","homepage":"http://www.webkit.org/","size":7247872,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"eocanha:master","ref":"master","sha":"c3035c080aebda88b4e8078c87f43318dd2db953","user":{"login":"eocanha","id":6864279,"avatar_url":"https://avatars.githubusercontent.com/u/6864279?v=3","gravatar_id":"","url":"https://api.github.com/users/eocanha","html_url":"https://github.com/eocanha","followers_url":"https://api.github.com/users/eocanha/followers","following_url":"https://api.github.com/users/eocanha/following{/other_user}","gists_url":"https://api.github.com/users/eocanha/gists{/gist_id}","starred_url":"https://api.github.com/users/eocanha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eocanha/subscriptions","organizations_url":"https://api.github.com/users/eocanha/orgs","repos_url":"https://api.github.com/users/eocanha/repos","events_url":"https://api.github.com/users/eocanha/events{/privacy}","received_events_url":"https://api.github.com/users/eocanha/received_events","type":"User","site_admin":false},"repo":{"id":49714349,"name":"webkit","full_name":"eocanha/webkit","owner":{"login":"eocanha","id":6864279,"avatar_url":"https://avatars.githubusercontent.com/u/6864279?v=3","gravatar_id":"","url":"https://api.github.com/users/eocanha","html_url":"https://github.com/eocanha","followers_url":"https://api.github.com/users/eocanha/followers","following_url":"https://api.github.com/users/eocanha/following{/other_user}","gists_url":"https://api.github.com/users/eocanha/gists{/gist_id}","starred_url":"https://api.github.com/users/eocanha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eocanha/subscriptions","organizations_url":"https://api.github.com/users/eocanha/orgs","repos_url":"https://api.github.com/users/eocanha/repos","events_url":"https://api.github.com/users/eocanha/events{/privacy}","received_events_url":"https://api.github.com/users/eocanha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eocanha/webkit","description":"Unofficial mirror of the WebKit SVN repository","fork":true,"url":"https://api.github.com/repos/eocanha/webkit","forks_url":"https://api.github.com/repos/eocanha/webkit/forks","keys_url":"https://api.github.com/repos/eocanha/webkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eocanha/webkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eocanha/webkit/teams","hooks_url":"https://api.github.com/repos/eocanha/webkit/hooks","issue_events_url":"https://api.github.com/repos/eocanha/webkit/issues/events{/number}","events_url":"https://api.github.com/repos/eocanha/webkit/events","assignees_url":"https://api.github.com/repos/eocanha/webkit/assignees{/user}","branches_url":"https://api.github.com/repos/eocanha/webkit/branches{/branch}","tags_url":"https://api.github.com/repos/eocanha/webkit/tags","blobs_url":"https://api.github.com/repos/eocanha/webkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eocanha/webkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eocanha/webkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/eocanha/webkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eocanha/webkit/statuses/{sha}","languages_url":"https://api.github.com/repos/eocanha/webkit/languages","stargazers_url":"https://api.github.com/repos/eocanha/webkit/stargazers","contributors_url":"https://api.github.com/repos/eocanha/webkit/contributors","subscribers_url":"https://api.github.com/repos/eocanha/webkit/subscribers","subscription_url":"https://api.github.com/repos/eocanha/webkit/subscription","commits_url":"https://api.github.com/repos/eocanha/webkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/eocanha/webkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/eocanha/webkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/eocanha/webkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/eocanha/webkit/contents/{+path}","compare_url":"https://api.github.com/repos/eocanha/webkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eocanha/webkit/merges","archive_url":"https://api.github.com/repos/eocanha/webkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eocanha/webkit/downloads","issues_url":"https://api.github.com/repos/eocanha/webkit/issues{/number}","pulls_url":"https://api.github.com/repos/eocanha/webkit/pulls{/number}","milestones_url":"https://api.github.com/repos/eocanha/webkit/milestones{/number}","notifications_url":"https://api.github.com/repos/eocanha/webkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eocanha/webkit/labels{/name}","releases_url":"https://api.github.com/repos/eocanha/webkit/releases{/id}","deployments_url":"https://api.github.com/repos/eocanha/webkit/deployments","created_at":"2016-01-15T11:07:43Z","updated_at":"2016-01-15T09:28:48Z","pushed_at":"2016-05-04T16:09:58Z","git_url":"git://github.com/eocanha/webkit.git","ssh_url":"git@github.com:eocanha/webkit.git","clone_url":"https://github.com/eocanha/webkit.git","svn_url":"https://github.com/eocanha/webkit","homepage":"http://www.webkit.org/","size":7247872,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eocanha/webkit/pulls/1"},"html":{"href":"https://github.com/eocanha/webkit/pull/1"},"issue":{"href":"https://api.github.com/repos/eocanha/webkit/issues/1"},"comments":{"href":"https://api.github.com/repos/eocanha/webkit/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/eocanha/webkit/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/eocanha/webkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eocanha/webkit/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/eocanha/webkit/statuses/4d3b91fcfb52f19e52732033c73273f4ce0c1252"}}}}