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

Side by Side Diff: Source/web/WebMediaPlayerClientImpl.cpp

Issue 284513003: Implement AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | public/platform/WebMediaPlayer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "config.h" 5 #include "config.h"
6 #include "web/WebMediaPlayerClientImpl.h" 6 #include "web/WebMediaPlayerClientImpl.h"
7 7
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/html/HTMLMediaElement.h" 9 #include "core/html/HTMLMediaElement.h"
10 #include "core/html/TimeRanges.h" 10 #include "core/html/TimeRanges.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void WebMediaPlayerClientImpl::keyNeeded(const WebString& contentType, const uns igned char* initData, unsigned initDataLength) 139 void WebMediaPlayerClientImpl::keyNeeded(const WebString& contentType, const uns igned char* initData, unsigned initDataLength)
140 { 140 {
141 HTMLMediaElementEncryptedMedia::keyNeeded(mediaElement(), contentType, initD ata, initDataLength); 141 HTMLMediaElementEncryptedMedia::keyNeeded(mediaElement(), contentType, initD ata, initDataLength);
142 } 142 }
143 143
144 void WebMediaPlayerClientImpl::setWebLayer(blink::WebLayer* layer) 144 void WebMediaPlayerClientImpl::setWebLayer(blink::WebLayer* layer)
145 { 145 {
146 m_client->mediaPlayerSetWebLayer(layer); 146 m_client->mediaPlayerSetWebLayer(layer);
147 } 147 }
148 148
149 WebMediaPlayer::TrackId WebMediaPlayerClientImpl::addAudioTrack(const WebString& id, AudioTrackKind kind, const WebString& label, const WebString& language, boo l enabled)
150 {
151 return mediaElement().addAudioTrack(id, kind, label, language, enabled);
152 }
153
154 void WebMediaPlayerClientImpl::removeAudioTrack(WebMediaPlayer::TrackId id)
155 {
156 mediaElement().removeAudioTrack(id);
157 }
158
159 WebMediaPlayer::TrackId WebMediaPlayerClientImpl::addVideoTrack(const WebString& id, VideoTrackKind kind, const WebString& label, const WebString& language, boo l selected)
160 {
161 return mediaElement().addVideoTrack(id, kind, label, language, selected);
162 }
163
164 void WebMediaPlayerClientImpl::removeVideoTrack(WebMediaPlayer::TrackId id)
165 {
166 mediaElement().removeVideoTrack(id);
167 }
168
149 void WebMediaPlayerClientImpl::addTextTrack(WebInbandTextTrack* textTrack) 169 void WebMediaPlayerClientImpl::addTextTrack(WebInbandTextTrack* textTrack)
150 { 170 {
151 m_client->mediaPlayerDidAddTextTrack(textTrack); 171 m_client->mediaPlayerDidAddTextTrack(textTrack);
152 } 172 }
153 173
154 void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* textTrack) 174 void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* textTrack)
155 { 175 {
156 m_client->mediaPlayerDidRemoveTextTrack(textTrack); 176 m_client->mediaPlayerDidRemoveTextTrack(textTrack);
157 } 177 }
158 178
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 487
468 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate) 488 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate)
469 { 489 {
470 if (m_client) 490 if (m_client)
471 m_client->setFormat(numberOfChannels, sampleRate); 491 m_client->setFormat(numberOfChannels, sampleRate);
472 } 492 }
473 493
474 #endif 494 #endif
475 495
476 } // namespace blink 496 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | public/platform/WebMediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698