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

Side by Side Diff: content/renderer/media/android/media_source_delegate.cc

Issue 18590002: Migrate MediaStream test code from content/shell/renderer/ to content/test/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/media/android/media_source_delegate.h" 5 #include "content/renderer/media/android/media_source_delegate.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "content/renderer/media/android/webmediaplayer_proxy_android.h" 9 #include "content/renderer/media/android/webmediaplayer_proxy_android.h"
10 #include "content/renderer/media/webmediaplayer_util.h"
11 #include "content/renderer/media/webmediasourceclient_impl.h"
10 #include "media/base/android/demuxer_stream_player_params.h" 12 #include "media/base/android/demuxer_stream_player_params.h"
11 #include "media/base/bind_to_loop.h" 13 #include "media/base/bind_to_loop.h"
12 #include "media/base/demuxer_stream.h" 14 #include "media/base/demuxer_stream.h"
13 #include "media/base/media_log.h" 15 #include "media/base/media_log.h"
14 #include "media/filters/chunk_demuxer.h" 16 #include "media/filters/chunk_demuxer.h"
15 #include "media/filters/decrypting_demuxer_stream.h" 17 #include "media/filters/decrypting_demuxer_stream.h"
16 #include "third_party/WebKit/public/platform/WebString.h" 18 #include "third_party/WebKit/public/platform/WebString.h"
17 #include "third_party/WebKit/public/web/WebMediaSource.h" 19 #include "third_party/WebKit/public/web/WebMediaSource.h"
18 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 20 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
19 #include "webkit/renderer/media/webmediaplayer_util.h"
20 #include "webkit/renderer/media/webmediasourceclient_impl.h"
21 21
22 using media::DemuxerStream; 22 using media::DemuxerStream;
23 using media::MediaPlayerHostMsg_DemuxerReady_Params; 23 using media::MediaPlayerHostMsg_DemuxerReady_Params;
24 using media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params; 24 using media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params;
25 using webkit_media::ConvertToWebTimeRanges;
26 using webkit_media::PipelineErrorToNetworkState;
27 using webkit_media::WebMediaSourceClientImpl;
28 using WebKit::WebMediaPlayer; 25 using WebKit::WebMediaPlayer;
29 using WebKit::WebString; 26 using WebKit::WebString;
30 27
31 namespace { 28 namespace {
32 29
33 // The size of the access unit to transfer in an IPC in case of MediaSource. 30 // The size of the access unit to transfer in an IPC in case of MediaSource.
34 // 16: approximately 250ms of content in 60 fps movies. 31 // 16: approximately 250ms of content in 60 fps movies.
35 const size_t kAccessUnitSizeForMediaSource = 16; 32 const size_t kAccessUnitSizeForMediaSource = 16;
36 33
37 const uint8 kVorbisPadding[] = { 0xff, 0xff, 0xff, 0xff }; 34 const uint8 kVorbisPadding[] = { 0xff, 0xff, 0xff, 0xff };
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 } 624 }
628 625
629 bool MediaSourceDelegate::HasEncryptedStream() { 626 bool MediaSourceDelegate::HasEncryptedStream() {
630 return (audio_stream_ && 627 return (audio_stream_ &&
631 audio_stream_->audio_decoder_config().is_encrypted()) || 628 audio_stream_->audio_decoder_config().is_encrypted()) ||
632 (video_stream_ && 629 (video_stream_ &&
633 video_stream_->video_decoder_config().is_encrypted()); 630 video_stream_->video_decoder_config().is_encrypted());
634 } 631 }
635 632
636 } // namespace content 633 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698