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

Side by Side Diff: media/remoting/rpc/decoder_buffer_segment.h

Issue 2261503002: Define remote playback proto buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add OWNERS file Created 4 years, 3 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
(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
xjz 2016/09/02 18:29:38 Can you add some comments briefly describe this cl
erickung1 2016/09/06 09:37:24 Done.
21 : public base::RefCountedThreadSafe<DecoderBufferSegment> {
22 public:
23 explicit DecoderBufferSegment(
24 const scoped_refptr<::media::DecoderBuffer>& decoder_buffer);
25
26 // Converts DecoderBufferSegment into byte array.
27 uint32_t ToBuffer(std::vector<uint8_t>* buffer);
xjz 2016/09/02 18:29:38 Suggest use a more meaningful name, and use std::s
erickung1 2016/09/06 09:37:24 change it to std::string Serialzie();
miu 2016/09/08 01:07:34 If this string is going to be passed to the Mojo i
28
29 // Converts byte array into DecoderBufferSegment.
30 static scoped_refptr<DecoderBufferSegment> FromBuffer(const uint8_t* data,
xjz 2016/09/02 18:29:38 This method creates a new object. Maybe name it Cr
erickung1 2016/09/06 09:37:24 Done.
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_
OLDNEW
« no previous file with comments | « media/remoting/proto/remoting_rpc_message.proto ('k') | media/remoting/rpc/decoder_buffer_segment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698