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

Side by Side Diff: media/base/android/media_codec_decoder.h

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
11
10 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
11 #include "base/callback.h" 13 #include "base/callback.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
16 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
17 #include "base/threading/thread.h" 18 #include "base/threading/thread.h"
18 #include "base/time/time.h" 19 #include "base/time/time.h"
19 #include "media/base/android/access_unit_queue.h" 20 #include "media/base/android/access_unit_queue.h"
20 #include "media/base/android/demuxer_stream_player_params.h" 21 #include "media/base/android/demuxer_stream_player_params.h"
21 22
22 namespace media { 23 namespace media {
23 24
24 struct FrameStatistics; 25 struct FrameStatistics;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // We call MediaCodecBridge on this thread for both input and output buffers. 322 // We call MediaCodecBridge on this thread for both input and output buffers.
322 base::Thread decoder_thread_; 323 base::Thread decoder_thread_;
323 324
324 // Object for posting tasks on Media thread. 325 // Object for posting tasks on Media thread.
325 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; 326 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
326 327
327 // Statistics for UMA. 328 // Statistics for UMA.
328 FrameStatistics* frame_statistics_; 329 FrameStatistics* frame_statistics_;
329 330
330 // Controls Android MediaCodec 331 // Controls Android MediaCodec
331 scoped_ptr<MediaCodecBridge> media_codec_bridge_; 332 std::unique_ptr<MediaCodecBridge> media_codec_bridge_;
332 333
333 // The queue of access units. 334 // The queue of access units.
334 AccessUnitQueue au_queue_; 335 AccessUnitQueue au_queue_;
335 336
336 // Flag forces reconfiguration even if |media_codec_bridge_| exists. Currently 337 // Flag forces reconfiguration even if |media_codec_bridge_| exists. Currently
337 // is set by video decoder when the video surface changes. 338 // is set by video decoder when the video surface changes.
338 bool needs_reconfigure_; 339 bool needs_reconfigure_;
339 340
340 // Flag forces to drain decoder in the process of dynamic reconfiguration. 341 // Flag forces to drain decoder in the process of dynamic reconfiguration.
341 bool drain_decoder_; 342 bool drain_decoder_;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 460
460 // NOTE: Weak pointers must be invalidated before all other member variables. 461 // NOTE: Weak pointers must be invalidated before all other member variables.
461 base::WeakPtrFactory<MediaCodecDecoder> weak_factory_; 462 base::WeakPtrFactory<MediaCodecDecoder> weak_factory_;
462 463
463 DISALLOW_COPY_AND_ASSIGN(MediaCodecDecoder); 464 DISALLOW_COPY_AND_ASSIGN(MediaCodecDecoder);
464 }; 465 };
465 466
466 } // namespace media 467 } // namespace media
467 468
468 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ 469 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_
OLDNEW
« no previous file with comments | « media/base/android/audio_media_codec_decoder.h ('k') | media/base/android/media_codec_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698