OLD | NEW |
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 public: | 46 public: |
47 enum MediaKeyErrorCode { | 47 enum MediaKeyErrorCode { |
48 MediaKeyErrorCodeUnknown = 1, | 48 MediaKeyErrorCodeUnknown = 1, |
49 MediaKeyErrorCodeClient, | 49 MediaKeyErrorCodeClient, |
50 MediaKeyErrorCodeService, | 50 MediaKeyErrorCodeService, |
51 MediaKeyErrorCodeOutput, | 51 MediaKeyErrorCodeOutput, |
52 MediaKeyErrorCodeHardwareChange, | 52 MediaKeyErrorCodeHardwareChange, |
53 MediaKeyErrorCodeDomain, | 53 MediaKeyErrorCodeDomain, |
54 }; | 54 }; |
55 | 55 |
| 56 enum VideoTrackKind { |
| 57 VideoTrackKindNone, |
| 58 VideoTrackKindAlternative, |
| 59 VideoTrackKindCaptions, |
| 60 VideoTrackKindMain, |
| 61 VideoTrackKindSign, |
| 62 VideoTrackKindSubtitles, |
| 63 VideoTrackKindCommentary |
| 64 }; |
| 65 |
| 66 enum AudioTrackKind { |
| 67 AudioTrackKindNone, |
| 68 AudioTrackKindAlternative, |
| 69 AudioTrackKindDescriptions, |
| 70 AudioTrackKindMain, |
| 71 AudioTrackKindMainDescriptions, |
| 72 AudioTrackKindTranslation, |
| 73 AudioTrackKindCommentary |
| 74 }; |
| 75 |
56 virtual void networkStateChanged() = 0; | 76 virtual void networkStateChanged() = 0; |
57 virtual void readyStateChanged() = 0; | 77 virtual void readyStateChanged() = 0; |
58 virtual void timeChanged() = 0; | 78 virtual void timeChanged() = 0; |
59 virtual void repaint() = 0; | 79 virtual void repaint() = 0; |
60 virtual void durationChanged() = 0; | 80 virtual void durationChanged() = 0; |
61 virtual void sizeChanged() = 0; | 81 virtual void sizeChanged() = 0; |
62 virtual void setOpaque(bool) = 0; | 82 virtual void setOpaque(bool) = 0; |
63 // FIXME: Remove once calls on the Chromium-side have been removed. | 83 // FIXME: Remove once calls on the Chromium-side have been removed. |
64 virtual double volume() const = 0; | 84 virtual double volume() const = 0; |
65 virtual void playbackStateChanged() = 0; | 85 virtual void playbackStateChanged() = 0; |
66 virtual WebMediaPlayer::Preload preload() const = 0; | 86 virtual WebMediaPlayer::Preload preload() const = 0; |
67 virtual void keyAdded(const WebString& keySystem, const WebString& sessionId
) = 0; | 87 virtual void keyAdded(const WebString& keySystem, const WebString& sessionId
) = 0; |
68 virtual void keyError(const WebString& keySystem, const WebString& sessionId
, MediaKeyErrorCode, unsigned short systemCode) = 0; | 88 virtual void keyError(const WebString& keySystem, const WebString& sessionId
, MediaKeyErrorCode, unsigned short systemCode) = 0; |
69 virtual void keyMessage(const WebString& keySystem, const WebString& session
Id, const unsigned char* message, unsigned messageLength, const WebURL& defaultU
RL) = 0; | 89 virtual void keyMessage(const WebString& keySystem, const WebString& session
Id, const unsigned char* message, unsigned messageLength, const WebURL& defaultU
RL) = 0; |
70 virtual void keyNeeded(const WebString& contentType, const unsigned char* in
itData, unsigned initDataLength) = 0; | 90 virtual void keyNeeded(const WebString& contentType, const unsigned char* in
itData, unsigned initDataLength) = 0; |
71 virtual void setWebLayer(WebLayer*) = 0; | 91 virtual void setWebLayer(WebLayer*) = 0; |
| 92 |
| 93 virtual void addVideoTrack(const WebString& id, VideoTrackKind, const WebStr
ing& label, const WebString& language, bool selected) = 0; |
| 94 virtual void removeVideoTrack(const WebString& id) = 0; |
| 95 virtual void addAudioTrack(const WebString& id, AudioTrackKind, const WebStr
ing& label, const WebString& language, bool enabled) = 0; |
| 96 virtual void removeAudioTrack(const WebString& id) = 0; |
72 virtual void addTextTrack(WebInbandTextTrack*) = 0; | 97 virtual void addTextTrack(WebInbandTextTrack*) = 0; |
73 virtual void removeTextTrack(WebInbandTextTrack*) = 0; | 98 virtual void removeTextTrack(WebInbandTextTrack*) = 0; |
74 virtual void mediaSourceOpened(WebMediaSource*) = 0; | 99 virtual void mediaSourceOpened(WebMediaSource*) = 0; |
75 virtual void requestFullscreen() = 0; | 100 virtual void requestFullscreen() = 0; |
76 virtual void requestSeek(double) = 0; | 101 virtual void requestSeek(double) = 0; |
77 | 102 |
78 protected: | 103 protected: |
79 ~WebMediaPlayerClient() { } | 104 ~WebMediaPlayerClient() { } |
80 }; | 105 }; |
81 | 106 |
82 } // namespace blink | 107 } // namespace blink |
83 | 108 |
84 #endif | 109 #endif |
OLD | NEW |