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

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

Issue 1149263002: Chromecast: Add stream id interface in DecoderBufferBase class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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_ADAPTER_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_
6 #define CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_ 6 #define CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "chromecast/media/cma/base/decoder_buffer_base.h" 10 #include "chromecast/media/cma/base/decoder_buffer_base.h"
11 11
12 namespace media { 12 namespace media {
13 class DecoderBuffer; 13 class DecoderBuffer;
14 } 14 }
15 15
16 namespace chromecast { 16 namespace chromecast {
17 namespace media { 17 namespace media {
18 18
19 // DecoderBufferAdapter wraps a ::media::DecoderBuffer 19 // DecoderBufferAdapter wraps a ::media::DecoderBuffer
20 // into a DecoderBufferBase. 20 // into a DecoderBufferBase.
21 class DecoderBufferAdapter : public DecoderBufferBase { 21 class DecoderBufferAdapter : public DecoderBufferBase {
22 public: 22 public:
23 explicit DecoderBufferAdapter( 23 explicit DecoderBufferAdapter(
gunsch 2015/05/21 21:06:34 why not just change the primary ctor instead of ha
erickung1 2015/05/21 21:38:34 I found out some test code and component which doe
24 const scoped_refptr< ::media::DecoderBuffer>& buffer); 24 const scoped_refptr< ::media::DecoderBuffer>& buffer);
25 DecoderBufferAdapter(
26 int type, const scoped_refptr< ::media::DecoderBuffer>& buffer);
gunsch 2015/05/21 21:06:34 type --> stream_id
erickung1 2015/05/21 21:38:34 Done.
25 27
26 // DecoderBufferBase implementation. 28 // DecoderBufferBase implementation.
29 int stream_id() const override;
gunsch 2015/05/21 21:06:34 what values can a stream_id have? if only 2-3 pos
erickung1 2015/05/21 21:38:34 we'll use two possible value. However, I think abo
gunsch 2015/05/21 21:45:29 what is inflexible about enum? you can always add
erickung1 2015/05/21 23:32:21 Make sense. I change the type to enum
27 base::TimeDelta timestamp() const override; 30 base::TimeDelta timestamp() const override;
28 const uint8* data() const override; 31 const uint8* data() const override;
29 uint8* writable_data() const override; 32 uint8* writable_data() const override;
30 size_t data_size() const override; 33 size_t data_size() const override;
31 const ::media::DecryptConfig* decrypt_config() const override; 34 const ::media::DecryptConfig* decrypt_config() const override;
32 bool end_of_stream() const override; 35 bool end_of_stream() const override;
33 36
34 private: 37 private:
35 ~DecoderBufferAdapter() override; 38 ~DecoderBufferAdapter() override;
36 39
40 int stream_id_;
37 scoped_refptr< ::media::DecoderBuffer> const buffer_; 41 scoped_refptr< ::media::DecoderBuffer> const buffer_;
38 42
39 DISALLOW_COPY_AND_ASSIGN(DecoderBufferAdapter); 43 DISALLOW_COPY_AND_ASSIGN(DecoderBufferAdapter);
40 }; 44 };
41 45
42 } // namespace media 46 } // namespace media
43 } // namespace chromecast 47 } // namespace chromecast
44 48
45 #endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_ 49 #endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698