Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 MEDIA_REMOTING_RPC_DECODER_BUFFER_SEGMENT_H_ | |
| 6 #define MEDIA_REMOTING_RPC_DECODER_BUFFER_SEGMENT_H_ | |
| 7 | |
| 8 #include <cstdint> | |
| 9 #include <string> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/macros.h" | |
| 13 #include "base/memory/ref_counted.h" | |
| 14 #include "media/base/decoder_buffer.h" | |
| 15 #include "media/remoting/remoting_rpc_message.pb.h" | |
| 16 | |
| 17 namespace media { | |
| 18 namespace remoting { | |
| 19 | |
| 20 class DecoderBufferSegment | |
| 21 : public base::RefCountedThreadSafe<DecoderBufferSegment> { | |
| 22 public: | |
| 23 explicit DecoderBufferSegment( | |
|
miu
2016/09/08 01:07:34
This class should never be instantiated. It contai
erickung1
2016/09/13 03:52:53
Done.
| |
| 24 const scoped_refptr<::media::DecoderBuffer>& decoder_buffer); | |
| 25 | |
| 26 // Converts DecoderBufferSegment into byte array. | |
| 27 uint32_t ToBuffer(std::vector<uint8_t>* buffer); | |
| 28 | |
| 29 // Converts byte array into DecoderBufferSegment. | |
| 30 static scoped_refptr<DecoderBufferSegment> FromBuffer(const uint8_t* data, | |
| 31 uint32_t size); | |
| 32 | |
| 33 scoped_refptr<::media::DecoderBuffer> decoder_buffer() { | |
| 34 return decoder_buffer_; | |
| 35 } | |
| 36 | |
| 37 private: | |
| 38 friend class base::RefCountedThreadSafe<DecoderBufferSegment>; | |
| 39 ~DecoderBufferSegment(); | |
| 40 | |
| 41 scoped_refptr<::media::DecoderBuffer> decoder_buffer_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(DecoderBufferSegment); | |
| 44 }; | |
| 45 | |
| 46 } // namespace remoting | |
| 47 } // namespace media | |
| 48 | |
| 49 #endif // MEDIA_REMOTING_RPC_DECODER_BUFFER_SEGMENT_H_ | |
| OLD | NEW |