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

Side by Side Diff: chromecast/media/cma/base/decoder_buffer_base.h

Issue 1553503002: Convert Pass()→std::move() in //chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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_BASE_DECODER_BUFFER_BASE_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_
6 #define CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_ 6 #define CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/time/time.h" 14 #include "base/time/time.h"
14 #include "chromecast/public/media/cast_decoder_buffer.h" 15 #include "chromecast/public/media/cast_decoder_buffer.h"
15 #include "chromecast/public/media/decrypt_context.h" 16 #include "chromecast/public/media/decrypt_context.h"
16 17
17 namespace media { 18 namespace media {
18 class DecoderBuffer; 19 class DecoderBuffer;
19 } 20 }
20 21
21 namespace chromecast { 22 namespace chromecast {
22 namespace media { 23 namespace media {
23 24
24 // DecoderBufferBase exposes only the properties of an audio/video buffer. 25 // DecoderBufferBase exposes only the properties of an audio/video buffer.
25 // The way a DecoderBufferBase is created and organized in memory 26 // The way a DecoderBufferBase is created and organized in memory
26 // is left as a detail of the implementation of derived classes. 27 // is left as a detail of the implementation of derived classes.
27 class DecoderBufferBase : public CastDecoderBuffer, 28 class DecoderBufferBase : public CastDecoderBuffer,
28 public base::RefCountedThreadSafe<DecoderBufferBase> { 29 public base::RefCountedThreadSafe<DecoderBufferBase> {
29 public: 30 public:
30 // Partial CastDecoderBuffer implementation: 31 // Partial CastDecoderBuffer implementation:
31 DecryptContext* decrypt_context() const override; 32 DecryptContext* decrypt_context() const override;
32 33
33 void set_decrypt_context(scoped_ptr<DecryptContext> context) { 34 void set_decrypt_context(scoped_ptr<DecryptContext> context) {
34 decrypt_context_ = context.Pass(); 35 decrypt_context_ = std::move(context);
35 } 36 }
36 37
37 // Sets the PTS of the frame. 38 // Sets the PTS of the frame.
38 virtual void set_timestamp(base::TimeDelta timestamp) = 0; 39 virtual void set_timestamp(base::TimeDelta timestamp) = 0;
39 40
40 // Gets a pointer to the frame data buffer. 41 // Gets a pointer to the frame data buffer.
41 virtual uint8_t* writable_data() const = 0; 42 virtual uint8_t* writable_data() const = 0;
42 43
43 virtual scoped_refptr<::media::DecoderBuffer> ToMediaBuffer() const = 0; 44 virtual scoped_refptr<::media::DecoderBuffer> ToMediaBuffer() const = 0;
44 45
(...skipping 16 matching lines...) Expand all
61 } 62 }
62 63
63 inline DecryptContext* DecoderBufferBase::decrypt_context() const { 64 inline DecryptContext* DecoderBufferBase::decrypt_context() const {
64 return decrypt_context_.get(); 65 return decrypt_context_.get();
65 } 66 }
66 67
67 } // namespace media 68 } // namespace media
68 } // namespace chromecast 69 } // namespace chromecast
69 70
70 #endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_ 71 #endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698