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

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 1308153005: [Chromecast] Plumbs raw audio through CMA backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed default sample rate Created 5 years, 3 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
« no previous file with comments | « no previous file | chromecast/media/BUILD.gn » ('j') | chromecast/media/audio/audio_manager.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" 5 #include "chromecast/browser/cast_content_browser_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/files/scoped_file.h" 11 #include "base/files/scoped_file.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "chromecast/base/cast_paths.h" 15 #include "chromecast/base/cast_paths.h"
16 #include "chromecast/base/chromecast_switches.h" 16 #include "chromecast/base/chromecast_switches.h"
17 #include "chromecast/browser/cast_browser_context.h" 17 #include "chromecast/browser/cast_browser_context.h"
18 #include "chromecast/browser/cast_browser_main_parts.h" 18 #include "chromecast/browser/cast_browser_main_parts.h"
19 #include "chromecast/browser/cast_browser_process.h" 19 #include "chromecast/browser/cast_browser_process.h"
20 #include "chromecast/browser/cast_network_delegate.h" 20 #include "chromecast/browser/cast_network_delegate.h"
21 #include "chromecast/browser/cast_quota_permission_context.h" 21 #include "chromecast/browser/cast_quota_permission_context.h"
22 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h" 22 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h"
23 #include "chromecast/browser/geolocation/cast_access_token_store.h" 23 #include "chromecast/browser/geolocation/cast_access_token_store.h"
24 #include "chromecast/browser/media/cma_media_pipeline_client.h" 24 #include "chromecast/browser/media/cma_media_pipeline_client.h"
25 #include "chromecast/browser/media/cma_message_filter_host.h" 25 #include "chromecast/browser/media/cma_message_filter_host.h"
26 #include "chromecast/browser/service/cast_service_simple.h" 26 #include "chromecast/browser/service/cast_service_simple.h"
27 #include "chromecast/browser/url_request_context_factory.h" 27 #include "chromecast/browser/url_request_context_factory.h"
28 #include "chromecast/common/global_descriptors.h" 28 #include "chromecast/common/global_descriptors.h"
29 #include "chromecast/media/audio/audio_manager_factory.h"
29 #include "chromecast/media/base/media_message_loop.h" 30 #include "chromecast/media/base/media_message_loop.h"
30 #include "chromecast/public/cast_media_shlib.h" 31 #include "chromecast/public/cast_media_shlib.h"
31 #include "chromecast/public/media/media_pipeline_backend.h" 32 #include "chromecast/public/media/media_pipeline_backend.h"
32 #include "components/crash/content/app/breakpad_linux.h" 33 #include "components/crash/content/app/breakpad_linux.h"
33 #include "components/crash/content/browser/crash_handler_host_linux.h" 34 #include "components/crash/content/browser/crash_handler_host_linux.h"
34 #include "components/network_hints/browser/network_hints_message_filter.h" 35 #include "components/network_hints/browser/network_hints_message_filter.h"
35 #include "content/public/browser/browser_thread.h" 36 #include "content/public/browser/browser_thread.h"
36 #include "content/public/browser/certificate_request_result_type.h" 37 #include "content/public/browser/certificate_request_result_type.h"
37 #include "content/public/browser/client_certificate_delegate.h" 38 #include "content/public/browser/client_certificate_delegate.h"
38 #include "content/public/browser/render_process_host.h" 39 #include "content/public/browser/render_process_host.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 75
75 scoped_ptr<CastService> CastContentBrowserClient::CreateCastService( 76 scoped_ptr<CastService> CastContentBrowserClient::CreateCastService(
76 content::BrowserContext* browser_context, 77 content::BrowserContext* browser_context,
77 PrefService* pref_service, 78 PrefService* pref_service,
78 net::URLRequestContextGetter* request_context_getter) { 79 net::URLRequestContextGetter* request_context_getter) {
79 return make_scoped_ptr(new CastServiceSimple(browser_context, pref_service)); 80 return make_scoped_ptr(new CastServiceSimple(browser_context, pref_service));
80 } 81 }
81 82
82 scoped_ptr<::media::AudioManagerFactory> 83 scoped_ptr<::media::AudioManagerFactory>
83 CastContentBrowserClient::CreateAudioManagerFactory() { 84 CastContentBrowserClient::CreateAudioManagerFactory() {
84 // Return nullptr. The factory will not be set, and the statically linked 85 #if defined(OS_ANDROID)
86 // Return nullptr. The factory will not be set, and the default
85 // implementation of AudioManager will be used. 87 // implementation of AudioManager will be used.
86 return scoped_ptr<::media::AudioManagerFactory>(); 88 return scoped_ptr<::media::AudioManagerFactory>();
89 #else
90 return make_scoped_ptr(new media::AudioManagerFactory);
gunsch 2015/09/18 21:23:07 From my understanding of this CL, this removes the
alokp 2015/09/18 21:42:14 The internal implementation needs to create a diff
gunsch 2015/09/18 21:57:06 SGTM. Nit: prefer '()' when invoking empty constr
alokp 2015/09/18 22:08:49 Done.
91 #endif
87 } 92 }
88 93
89 #if !defined(OS_ANDROID) 94 #if !defined(OS_ANDROID)
90 scoped_refptr<media::CmaMediaPipelineClient> 95 scoped_refptr<media::CmaMediaPipelineClient>
91 CastContentBrowserClient::CreateCmaMediaPipelineClient() { 96 CastContentBrowserClient::CreateCmaMediaPipelineClient() {
92 return make_scoped_refptr(new media::CmaMediaPipelineClient()); 97 return make_scoped_refptr(new media::CmaMediaPipelineClient());
93 } 98 }
94 99
95 scoped_ptr<::media::BrowserCdmFactory> 100 scoped_ptr<::media::BrowserCdmFactory>
96 CastContentBrowserClient::CreateBrowserCdmFactory() { 101 CastContentBrowserClient::CreateBrowserCdmFactory() {
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 process_type, dumps_path, false /* upload */); 453 process_type, dumps_path, false /* upload */);
449 // StartUploaderThread() even though upload is diferred. 454 // StartUploaderThread() even though upload is diferred.
450 // Breakpad-related memory is freed in the uploader thread. 455 // Breakpad-related memory is freed in the uploader thread.
451 crash_handler->StartUploaderThread(); 456 crash_handler->StartUploaderThread();
452 return crash_handler; 457 return crash_handler;
453 } 458 }
454 #endif // !defined(OS_ANDROID) 459 #endif // !defined(OS_ANDROID)
455 460
456 } // namespace shell 461 } // namespace shell
457 } // namespace chromecast 462 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | chromecast/media/BUILD.gn » ('j') | chromecast/media/audio/audio_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698