| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
| 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "media/base/android/demuxer_stream_player_params.h" | 9 #include "media/base/android/demuxer_stream_player_params.h" |
| 10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 virtual MediaPlayerAndroid* GetPlayer(int player_id) = 0; | 93 virtual MediaPlayerAndroid* GetPlayer(int player_id) = 0; |
| 94 | 94 |
| 95 // Release all the players managed by this object. | 95 // Release all the players managed by this object. |
| 96 virtual void DestroyAllMediaPlayers() = 0; | 96 virtual void DestroyAllMediaPlayers() = 0; |
| 97 | 97 |
| 98 // Callback when DemuxerStreamPlayer wants to read data from the demuxer. | 98 // Callback when DemuxerStreamPlayer wants to read data from the demuxer. |
| 99 virtual void OnReadFromDemuxer( | 99 virtual void OnReadFromDemuxer( |
| 100 int player_id, media::DemuxerStream::Type type, bool seek_done) = 0; | 100 int player_id, media::DemuxerStream::Type type, bool seek_done) = 0; |
| 101 | 101 |
| 102 // Called when player wants the media element to initiate a seek. | 102 // Called when player wants the media element to initiate a seek. |
| 103 virtual void OnMediaSeekRequest(int player_id, | 103 virtual void OnMediaSeekRequest(int player_id, base::TimeDelta time_to_seek, |
| 104 base::TimeDelta time_to_seek, | 104 unsigned seek_request_id) = 0; |
| 105 bool request_surface) = 0; | 105 |
| 106 // Called when player wants to read the config data from the demuxer. |
| 107 virtual void OnMediaConfigRequest(int player_id) = 0; |
| 106 | 108 |
| 107 // TODO(xhwang): The following three methods needs to be decoupled from | 109 // TODO(xhwang): The following three methods needs to be decoupled from |
| 108 // MediaPlayerManager to support the W3C Working Draft version of the EME | 110 // MediaPlayerManager to support the W3C Working Draft version of the EME |
| 109 // spec. | 111 // spec. |
| 110 | 112 |
| 111 // Called when the player wants to send a KeyAdded. | 113 // Called when the player wants to send a KeyAdded. |
| 112 virtual void OnKeyAdded(int player_id, | 114 virtual void OnKeyAdded(int player_id, |
| 113 const std::string& key_system, | 115 const std::string& key_system, |
| 114 const std::string& session_id) = 0; | 116 const std::string& session_id) = 0; |
| 115 | 117 |
| 116 // Called when the player wants to send a KeyError. | 118 // Called when the player wants to send a KeyError. |
| 117 virtual void OnKeyError(int player_id, | 119 virtual void OnKeyError(int player_id, |
| 118 const std::string& key_system, | 120 const std::string& key_system, |
| 119 const std::string& session_id, | 121 const std::string& session_id, |
| 120 media::MediaKeys::KeyError error_code, | 122 media::MediaKeys::KeyError error_code, |
| 121 int system_code) = 0; | 123 int system_code) = 0; |
| 122 | 124 |
| 123 // Called when the player wants to send a KeyMessage. | 125 // Called when the player wants to send a KeyMessage. |
| 124 virtual void OnKeyMessage(int player_id, | 126 virtual void OnKeyMessage(int player_id, |
| 125 const std::string& key_system, | 127 const std::string& key_system, |
| 126 const std::string& session_id, | 128 const std::string& session_id, |
| 127 const std::string& message, | 129 const std::string& message, |
| 128 const std::string& destination_url) = 0; | 130 const std::string& destination_url) = 0; |
| 129 }; | 131 }; |
| 130 | 132 |
| 131 } // namespace media | 133 } // namespace media |
| 132 | 134 |
| 133 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 135 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |