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 SERVICES_MEDIA_FRAMEWORK_PARTS_DECODER_H_ | |
6 #define SERVICES_MEDIA_FRAMEWORK_PARTS_DECODER_H_ | |
7 | |
8 #include "services/media/framework/allocator.h" | |
9 #include "services/media/framework/models/packet_transform.h" | |
10 #include "services/media/framework/packet.h" | |
11 #include "services/media/framework/result.h" | |
12 #include "services/media/framework/stream_type.h" | |
13 | |
14 namespace mojo { | |
15 namespace media { | |
16 | |
17 class Decoder; | |
18 | |
19 typedef SharedPtr<Decoder, PacketTransform> DecoderPtr; | |
20 | |
21 // Abstract base class for transforms that decode compressed media. | |
22 class Decoder : public PacketTransform { | |
23 public: | |
24 // Creates a Decoder object for a given stream type. | |
25 static Result Create( | |
26 const StreamTypePtr& stream_type, | |
27 DecoderPtr* decoder_out); | |
28 | |
29 ~Decoder() override {} | |
30 | |
31 // Initializes the decoder. | |
32 virtual Result Init(const StreamTypePtr& stream_type) = 0; | |
jeffbrown
2016/02/02 05:35:47
Who will call this method? Does Create do it? It
dalesat
2016/02/02 21:46:39
Yes. Added a comment.
| |
33 | |
34 // Returns the type of the stream the decoder will produce. | |
35 virtual StreamTypePtr output_stream_type() = 0; | |
36 }; | |
37 | |
38 } // namespace media | |
39 } // namespace mojo | |
40 | |
41 #endif // SERVICES_MEDIA_FRAMEWORK_PARTS_DECODER_H_ | |
OLD | NEW |