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

Side by Side Diff: chromecast/media/cma/backend/media_pipeline_backend_manager.cc

Issue 2701613006: [Chromecast] Process streams with different post-processing. (Closed)
Patch Set: Fix nits Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/media/cma/backend/media_pipeline_backend_manager.h" 5 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 27 matching lines...) Expand all
38 const media::MediaPipelineDeviceParams& params) { 38 const media::MediaPipelineDeviceParams& params) {
39 DCHECK(media_task_runner_->BelongsToCurrentThread()); 39 DCHECK(media_task_runner_->BelongsToCurrentThread());
40 return CreateMediaPipelineBackend(params, 0); 40 return CreateMediaPipelineBackend(params, 0);
41 } 41 }
42 42
43 std::unique_ptr<MediaPipelineBackend> 43 std::unique_ptr<MediaPipelineBackend>
44 MediaPipelineBackendManager::CreateMediaPipelineBackend( 44 MediaPipelineBackendManager::CreateMediaPipelineBackend(
45 const media::MediaPipelineDeviceParams& params, 45 const media::MediaPipelineDeviceParams& params,
46 int stream_type) { 46 int stream_type) {
47 DCHECK(media_task_runner_->BelongsToCurrentThread()); 47 DCHECK(media_task_runner_->BelongsToCurrentThread());
48 LOG(INFO) << "Creating a " << params.name << " with type " << stream_type;
48 std::unique_ptr<MediaPipelineBackend> backend_ptr( 49 std::unique_ptr<MediaPipelineBackend> backend_ptr(
49 new MediaPipelineBackendWrapper( 50 new MediaPipelineBackendWrapper(
50 base::WrapUnique( 51 base::WrapUnique(
51 media::CastMediaShlib::CreateMediaPipelineBackend(params)), 52 media::CastMediaShlib::CreateMediaPipelineBackend(params)),
52 stream_type, GetVolumeMultiplier(stream_type), this)); 53 stream_type, GetVolumeMultiplier(stream_type), this));
53 media_pipeline_backends_.push_back(backend_ptr.get()); 54 media_pipeline_backends_.push_back(backend_ptr.get());
54 return backend_ptr; 55 return backend_ptr;
55 } 56 }
56 57
57 bool MediaPipelineBackendManager::IncrementDecoderCount(DecoderType type) { 58 bool MediaPipelineBackendManager::IncrementDecoderCount(DecoderType type) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 auto it = volume_by_stream_type_.find(stream_type); 105 auto it = volume_by_stream_type_.find(stream_type);
105 if (it == volume_by_stream_type_.end()) { 106 if (it == volume_by_stream_type_.end()) {
106 return 1.0; 107 return 1.0;
107 } else { 108 } else {
108 return it->second; 109 return it->second;
109 } 110 }
110 } 111 }
111 112
112 } // namespace media 113 } // namespace media
113 } // namespace chromecast 114 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698