Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMECAST_PUBLIC_MEDIA_CAST_DECODER_BUFFER_H_ | |
| 6 #define CHROMECAST_PUBLIC_MEDIA_CAST_DECODER_BUFFER_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <cstddef> | |
| 11 | |
| 12 #include "stream_id.h" | |
| 13 | |
| 14 namespace chromecast { | |
| 15 namespace media { | |
| 16 | |
| 17 class CastDecryptConfig; | |
| 18 | |
| 19 // DecoderBuffer exposes only the properties of an audio/video buffer. | |
|
gunsch
2015/07/29 17:04:20
Can we rewrite this description to be more a descr
halliwell
2015/07/29 19:58:20
Done. I took a swing at updating a number of othe
| |
| 20 // The way a DecoderBuffer is created and organized in memory | |
| 21 // is left as a detail of the implementation of derived classes. | |
| 22 class CastDecoderBuffer { | |
| 23 public: | |
| 24 virtual ~CastDecoderBuffer() {} | |
| 25 | |
| 26 // Returns the stream id of this decoder buffer belonging to. it's optional | |
| 27 // and default value is kPrimary. | |
|
gunsch
2015/07/29 17:04:20
Can we make this not optional, and simply return k
halliwell
2015/07/29 19:58:20
I'm not quite sure what the intent of the "it's op
| |
| 28 virtual StreamId stream_id() const = 0; | |
| 29 | |
| 30 // Returns the PTS of the frame in microseconds. | |
| 31 virtual int64_t timestamp() const = 0; | |
| 32 | |
| 33 // Gets the frame data. | |
| 34 virtual const uint8_t* data() const = 0; | |
| 35 | |
| 36 // Returns the size of the frame in bytes. | |
| 37 virtual size_t data_size() const = 0; | |
| 38 | |
| 39 // Returns the decrypt configuration. | |
| 40 // Returns NULL if the buffer has no decrypt info. | |
|
gunsch
2015/07/29 17:04:20
Can we strengthen this statement to "Returns NULL
halliwell
2015/07/29 19:58:20
We can, comment updated.
| |
| 41 virtual const CastDecryptConfig* decrypt_config() const = 0; | |
| 42 | |
| 43 // Indicate if this is a special frame that indicates the end of the stream. | |
| 44 // If true, functions to access the frame content cannot be called. | |
| 45 virtual bool end_of_stream() const = 0; | |
| 46 }; | |
| 47 | |
| 48 } // namespace media | |
| 49 } // namespace chromecast | |
| 50 | |
| 51 #endif // CHROMECAST_PUBLIC_MEDIA_CAST_DECODER_BUFFER_H_ | |
| OLD | NEW |