Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: public/platform/WebMediaPlayerClient.h

Issue 1055503002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebMediaPlayerClient_h 31 #ifndef WebMediaPlayerClient_h
32 #define WebMediaPlayerClient_h 32 #define WebMediaPlayerClient_h
33 33
34 #include "WebMediaPlayer.h" 34 #include "WebMediaPlayer.h"
35 #include "public/platform/WebEncryptedMediaTypes.h"
36 35
37 namespace blink { 36 namespace blink {
38 37
39 class WebInbandTextTrack; 38 class WebInbandTextTrack;
40 class WebLayer; 39 class WebLayer;
41 class WebMediaSource; 40 class WebMediaSource;
42 class WebURL;
43 41
44 class WebMediaPlayerClient { 42 class WebMediaPlayerClient {
45 public: 43 public:
46 enum MediaKeyErrorCode {
47 MediaKeyErrorCodeUnknown = 1,
48 MediaKeyErrorCodeClient,
49 MediaKeyErrorCodeService,
50 MediaKeyErrorCodeOutput,
51 MediaKeyErrorCodeHardwareChange,
52 MediaKeyErrorCodeDomain,
53 };
54
55 enum VideoTrackKind { 44 enum VideoTrackKind {
56 VideoTrackKindNone, 45 VideoTrackKindNone,
57 VideoTrackKindAlternative, 46 VideoTrackKindAlternative,
58 VideoTrackKindCaptions, 47 VideoTrackKindCaptions,
59 VideoTrackKindMain, 48 VideoTrackKindMain,
60 VideoTrackKindSign, 49 VideoTrackKindSign,
61 VideoTrackKindSubtitles, 50 VideoTrackKindSubtitles,
62 VideoTrackKindCommentary 51 VideoTrackKindCommentary
63 }; 52 };
64 53
65 enum AudioTrackKind { 54 enum AudioTrackKind {
66 AudioTrackKindNone, 55 AudioTrackKindNone,
67 AudioTrackKindAlternative, 56 AudioTrackKindAlternative,
68 AudioTrackKindDescriptions, 57 AudioTrackKindDescriptions,
69 AudioTrackKindMain, 58 AudioTrackKindMain,
70 AudioTrackKindMainDescriptions, 59 AudioTrackKindMainDescriptions,
71 AudioTrackKindTranslation, 60 AudioTrackKindTranslation,
72 AudioTrackKindCommentary 61 AudioTrackKindCommentary
73 }; 62 };
74 63
75 virtual void networkStateChanged() = 0; 64 virtual void networkStateChanged() = 0;
76 virtual void readyStateChanged() = 0; 65 virtual void readyStateChanged() = 0;
77 virtual void timeChanged() = 0; 66 virtual void timeChanged() = 0;
78 virtual void repaint() = 0; 67 virtual void repaint() = 0;
79 virtual void durationChanged() = 0; 68 virtual void durationChanged() = 0;
80 virtual void sizeChanged() = 0; 69 virtual void sizeChanged() = 0;
81 virtual void playbackStateChanged() = 0; 70 virtual void playbackStateChanged() = 0;
82 virtual void keyAdded(const WebString& keySystem, const WebString& sessionId ) = 0;
83 virtual void keyError(const WebString& keySystem, const WebString& sessionId , MediaKeyErrorCode, unsigned short systemCode) = 0;
84 virtual void keyMessage(const WebString& keySystem, const WebString& session Id, const unsigned char* message, unsigned messageLength, const WebURL& defaultU RL) = 0;
85 virtual void encrypted(WebEncryptedMediaInitDataType, const unsigned char* i nitData, unsigned initDataLength) = 0;
86 virtual void didBlockPlaybackWaitingForKey() = 0;
87 virtual void didResumePlaybackBlockedForKey() = 0;
88 virtual void setWebLayer(WebLayer*) = 0; 71 virtual void setWebLayer(WebLayer*) = 0;
89 virtual WebMediaPlayer::TrackId addAudioTrack(const WebString& id, AudioTrac kKind, const WebString& label, const WebString& language, bool enabled) = 0; 72 virtual WebMediaPlayer::TrackId addAudioTrack(const WebString& id, AudioTrac kKind, const WebString& label, const WebString& language, bool enabled) = 0;
90 virtual void removeAudioTrack(WebMediaPlayer::TrackId) = 0; 73 virtual void removeAudioTrack(WebMediaPlayer::TrackId) = 0;
91 virtual WebMediaPlayer::TrackId addVideoTrack(const WebString& id, VideoTrac kKind, const WebString& label, const WebString& language, bool selected) = 0; 74 virtual WebMediaPlayer::TrackId addVideoTrack(const WebString& id, VideoTrac kKind, const WebString& label, const WebString& language, bool selected) = 0;
92 virtual void removeVideoTrack(WebMediaPlayer::TrackId) = 0; 75 virtual void removeVideoTrack(WebMediaPlayer::TrackId) = 0;
93 virtual void addTextTrack(WebInbandTextTrack*) = 0; 76 virtual void addTextTrack(WebInbandTextTrack*) = 0;
94 virtual void removeTextTrack(WebInbandTextTrack*) = 0; 77 virtual void removeTextTrack(WebInbandTextTrack*) = 0;
95 virtual void mediaSourceOpened(WebMediaSource*) = 0; 78 virtual void mediaSourceOpened(WebMediaSource*) = 0;
96 virtual void requestSeek(double) = 0; 79 virtual void mediaPlayerRequestSeek(double) = 0;
ddorwin 2015/07/06 20:43:01 Is there a reason this name was changed?
Srirama 2015/07/09 15:19:37 As per Philip's suggestion in patchset3, i have ch
Srirama 2015/07/15 13:25:24 Done.
97 virtual void remoteRouteAvailabilityChanged(bool) = 0; 80 virtual void remoteRouteAvailabilityChanged(bool) = 0;
98 virtual void connectedToRemoteDevice() = 0; 81 virtual void connectedToRemoteDevice() = 0;
99 virtual void disconnectedFromRemoteDevice() = 0; 82 virtual void disconnectedFromRemoteDevice() = 0;
100 83
101 protected: 84 protected:
102 ~WebMediaPlayerClient() { } 85 ~WebMediaPlayerClient() { }
103 }; 86 };
104 87
105 } // namespace blink 88 } // namespace blink
106 89
107 #endif 90 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698