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

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

Issue 535563002: Add the base class for decoder buffers used in cast media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Naming: DecoderBufferAdapter. Created 6 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 2014 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_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_
6 #define CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_
7
8 #include "base/basictypes.h"
9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h"
12
13 namespace media {
14 class DecryptConfig;
15 }
16
17 namespace chromecast {
18 namespace media {
19
20 // DecoderBufferBase exposes only the properties of an audio/video buffer.
21 // The way a DecoderBufferBase is created and organized in memory
22 // is left as a detail of the implementation of derived classes.
23 class DecoderBufferBase
24 : public base::RefCountedThreadSafe<DecoderBufferBase> {
25 public:
26 DecoderBufferBase();
27
28 // Returns the PTS of the frame.
29 virtual base::TimeDelta timestamp() const = 0;
30
31 // Gets the frame data.
32 virtual const uint8* data() const = 0;
33 virtual uint8* writable_data() const = 0;
34
35 // Returns the size of the frame in bytes.
36 virtual int data_size() const = 0;
37
38 // Returns the decrypt configuration.
39 // Returns NULL if the buffer has no decrypt info.
40 virtual const ::media::DecryptConfig* decrypt_config() const = 0;
41
42 // Indicate if this is a special frame that indicates the end of the stream.
43 // If true, functions to access the frame content cannot be called.
44 virtual bool end_of_stream() const = 0;
45
46 protected:
47 friend class base::RefCountedThreadSafe<DecoderBufferBase>;
48 virtual ~DecoderBufferBase();
49
50 private:
51 DISALLOW_COPY_AND_ASSIGN(DecoderBufferBase);
52 };
53
54 } // namespace media
55 } // namespace chromecast
56
57 #endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_
OLDNEW
« no previous file with comments | « chromecast/media/cma/base/decoder_buffer_adapter.cc ('k') | chromecast/media/cma/base/decoder_buffer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698