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

Side by Side Diff: chromecast/media/cma/pipeline/av_pipeline_impl.h

Issue 1875623002: Convert //chromecast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 #ifndef CHROMECAST_MEDIA_CMA_PIPELINE_AV_PIPELINE_IMPL_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_PIPELINE_AV_PIPELINE_IMPL_H_
6 #define CHROMECAST_MEDIA_CMA_PIPELINE_AV_PIPELINE_IMPL_H_ 6 #define CHROMECAST_MEDIA_CMA_PIPELINE_AV_PIPELINE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <list> 11 #include <list>
12 #include <memory>
12 #include <string> 13 #include <string>
13 14
14 #include "base/callback.h" 15 #include "base/callback.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/threading/thread_checker.h" 19 #include "base/threading/thread_checker.h"
20 #include "chromecast/media/cma/pipeline/av_pipeline_client.h" 20 #include "chromecast/media/cma/pipeline/av_pipeline_client.h"
21 #include "chromecast/public/media/media_pipeline_backend.h" 21 #include "chromecast/public/media/media_pipeline_backend.h"
22 #include "chromecast/public/media/stream_id.h" 22 #include "chromecast/public/media/stream_id.h"
23 #include "media/base/pipeline_status.h" 23 #include "media/base/pipeline_status.h"
24 24
25 namespace media { 25 namespace media {
26 class AudioDecoderConfig; 26 class AudioDecoderConfig;
27 class VideoDecoderConfig; 27 class VideoDecoderConfig;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 State state() const { return state_; } 72 State state() const { return state_; }
73 void set_state(State state) { state_ = state; } 73 void set_state(State state) { state_ = state; }
74 const AvPipelineClient& client() const { return client_; } 74 const AvPipelineClient& client() const { return client_; }
75 75
76 virtual void OnUpdateConfig( 76 virtual void OnUpdateConfig(
77 StreamId id, 77 StreamId id,
78 const ::media::AudioDecoderConfig& audio_config, 78 const ::media::AudioDecoderConfig& audio_config,
79 const ::media::VideoDecoderConfig& video_config) = 0; 79 const ::media::VideoDecoderConfig& video_config) = 0;
80 80
81 // Setting the frame provider must be done in the |kUninitialized| state. 81 // Setting the frame provider must be done in the |kUninitialized| state.
82 void SetCodedFrameProvider(scoped_ptr<CodedFrameProvider> frame_provider, 82 void SetCodedFrameProvider(std::unique_ptr<CodedFrameProvider> frame_provider,
83 size_t max_buffer_size, 83 size_t max_buffer_size,
84 size_t max_frame_size); 84 size_t max_frame_size);
85 85
86 ::media::PipelineStatistics previous_stats_; 86 ::media::PipelineStatistics previous_stats_;
87 int bytes_decoded_since_last_update_; 87 int bytes_decoded_since_last_update_;
88 88
89 private: 89 private:
90 void OnFlushDone(); 90 void OnFlushDone();
91 91
92 // MediaPipelineBackend::Decoder::Delegate implementation: 92 // MediaPipelineBackend::Decoder::Delegate implementation:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // |playable_buffered_time_| is the maximum timestamp of buffered and 144 // |playable_buffered_time_| is the maximum timestamp of buffered and
145 // playable frames (i.e. the key id is available for those frames). 145 // playable frames (i.e. the key id is available for those frames).
146 base::TimeDelta buffered_time_; 146 base::TimeDelta buffered_time_;
147 base::TimeDelta playable_buffered_time_; 147 base::TimeDelta playable_buffered_time_;
148 148
149 // List of frames buffered but not playable right away due to a missing 149 // List of frames buffered but not playable right away due to a missing
150 // key id. 150 // key id.
151 std::list<scoped_refptr<DecoderBufferBase> > non_playable_frames_; 151 std::list<scoped_refptr<DecoderBufferBase> > non_playable_frames_;
152 152
153 // Buffer provider. 153 // Buffer provider.
154 scoped_ptr<BufferingFrameProvider> frame_provider_; 154 std::unique_ptr<BufferingFrameProvider> frame_provider_;
155 155
156 // Indicate whether the frame fetching process is active. 156 // Indicate whether the frame fetching process is active.
157 bool enable_feeding_; 157 bool enable_feeding_;
158 158
159 // Indicate whether there is a pending buffer read. 159 // Indicate whether there is a pending buffer read.
160 bool pending_read_; 160 bool pending_read_;
161 161
162 // Pending buffer (not pushed to device yet) 162 // Pending buffer (not pushed to device yet)
163 scoped_refptr<DecoderBufferBase> pending_buffer_; 163 scoped_refptr<DecoderBufferBase> pending_buffer_;
164 164
(...skipping 12 matching lines...) Expand all
177 base::WeakPtr<AvPipelineImpl> weak_this_; 177 base::WeakPtr<AvPipelineImpl> weak_this_;
178 base::WeakPtrFactory<AvPipelineImpl> weak_factory_; 178 base::WeakPtrFactory<AvPipelineImpl> weak_factory_;
179 179
180 DISALLOW_COPY_AND_ASSIGN(AvPipelineImpl); 180 DISALLOW_COPY_AND_ASSIGN(AvPipelineImpl);
181 }; 181 };
182 182
183 } // namespace media 183 } // namespace media
184 } // namespace chromecast 184 } // namespace chromecast
185 185
186 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_AV_PIPELINE_IMPL_H_ 186 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_AV_PIPELINE_IMPL_H_
OLDNEW
« no previous file with comments | « chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc ('k') | chromecast/media/cma/pipeline/av_pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698