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

Side by Side Diff: chromecast/public/media/decoder_buffer.h

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test + android fixes Created 5 years, 4 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 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_DECODER_BUFFER_H_
6 #define CHROMECAST_PUBLIC_MEDIA_DECODER_BUFFER_H_
7
8 #include <stdint.h>
9
10 #include <cstddef>
11
12 #include "chromecast/public/time_delta.h"
byungchul 2015/07/27 18:22:23 should be relative to chromecast/public
halliwell 2015/07/28 02:19:35 TimeDelta removed now anyway.
13 #include "stream_id.h"
14
15 namespace chromecast {
16 namespace media {
17
18 class DecryptConfig;
19
20 // DecoderBuffer exposes only the properties of an audio/video buffer.
21 // The way a DecoderBuffer is created and organized in memory
22 // is left as a detail of the implementation of derived classes.
23 class DecoderBuffer {
gunsch 2015/07/27 17:14:49 Any chance we can change the name, to avoid confus
halliwell 2015/07/28 02:19:35 Happy to change the name. DecryptConfig is a simi
halliwell 2015/07/28 23:26:06 Ok, renamed to CastDecoderBuffer, CastDecryptConfi
24 public:
25 DecoderBuffer() {}
byungchul 2015/07/27 18:22:23 not necessary
halliwell 2015/07/28 02:19:35 removed.
26 virtual ~DecoderBuffer() {}
27
28 // Returns the stream id of this decoder buffer belonging to. it's optional
29 // and default value is kPrimary.
30 virtual StreamId stream_id() const = 0;
byungchul 2015/07/27 18:22:23 Isn't const in public apis too restricted?
halliwell 2015/07/28 02:19:35 This isn't an API for vendors to implement. It's
31
32 // Returns the PTS of the frame.
33 virtual TimeDelta timestamp() const = 0;
34
35 // Sets the PTS of the frame.
36 virtual void set_timestamp(TimeDelta timestamp) = 0;
byungchul 2015/07/27 18:22:23 No simple setters/getters in public apis. Otherwis
halliwell 2015/07/28 02:19:35 I removed this and also writable_data. I had been
byungchul 2015/07/28 18:05:43 If it is not for vendors, why is this defined in p
halliwell 2015/07/28 23:26:06 We need to pass buffers to vendors, this is their
37
38 // Gets the frame data.
39 virtual const uint8_t* data() const = 0;
40 virtual uint8_t* writable_data() const = 0;
41
42 // Returns the size of the frame in bytes.
43 virtual size_t data_size() const = 0;
44
45 // Returns the decrypt configuration.
46 // Returns NULL if the buffer has no decrypt info.
47 virtual const DecryptConfig* decrypt_config() const = 0;
48
49 // Indicate if this is a special frame that indicates the end of the stream.
50 // If true, functions to access the frame content cannot be called.
51 virtual bool end_of_stream() const = 0;
52 };
53
54 } // namespace media
55 } // namespace chromecast
56
57 #endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698