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

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

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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_MEDIA_CMA_BASE_CAST_DECODER_BUFFER_IMPL_H_
6 #define CHROMECAST_MEDIA_CMA_BASE_CAST_DECODER_BUFFER_IMPL_H_
7
8 #include "chromecast/public/media/cast_decoder_buffer.h"
9 #include "chromecast/media/cma/base/decoder_buffer_base.h"
10
11 namespace chromecast {
12 namespace media {
13
14 // Implementation of public DecoderBuffer interface.
15 // Holds a (refcounted) DecoderBufferBase. This way, ownership throughout
16 // the pipeline is refcounted, but without exposing RefCountedBase in
17 // the public API.
18 class CastDecoderBufferImpl : public CastDecoderBuffer {
19 public:
20 CastDecoderBufferImpl(const scoped_refptr<DecoderBufferBase>& buffer);
21 ~CastDecoderBufferImpl() override;
22
23 // Returns the stream id of this decoder buffer belonging to. it's optional
24 // and default value is kPrimary.
25 StreamId stream_id() const override;
26
27 // Returns the PTS of the frame in microseconds.
28 int64_t timestamp() const override;
29
30 // Gets the frame data.
31 const uint8* data() const override;
32
33 // Returns the size of the frame in bytes.
34 size_t data_size() const override;
35
36 // Returns the decrypt configuration.
37 // Returns NULL if the buffer has no decrypt info.
38 const CastDecryptConfig* decrypt_config() const override;
39
40 // Indicate if this is a special frame that indicates the end of the stream.
41 // If true, functions to access the frame content cannot be called.
42 bool end_of_stream() const override;
43
44 const scoped_refptr<DecoderBufferBase>& buffer() const;
45
46 private:
47 scoped_refptr<DecoderBufferBase> buffer_;
48 };
49
50 } // namespace media
51 } // namespace chromecast
52
53 #endif // CHROMECAST_MEDIA_CMA_BASE_CAST_DECODER_BUFFER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698