Chromium Code Reviews| Index: services/media/framework/parts/decoder.h |
| diff --git a/services/media/framework/parts/decoder.h b/services/media/framework/parts/decoder.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b21d395328923ce141b9126994271631a69fd49d |
| --- /dev/null |
| +++ b/services/media/framework/parts/decoder.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SERVICES_MEDIA_FRAMEWORK_PARTS_DECODER_H_ |
| +#define SERVICES_MEDIA_FRAMEWORK_PARTS_DECODER_H_ |
| + |
| +#include "services/media/framework/allocator.h" |
| +#include "services/media/framework/models/packet_transform.h" |
| +#include "services/media/framework/packet.h" |
| +#include "services/media/framework/result.h" |
| +#include "services/media/framework/stream_type.h" |
| + |
| +namespace mojo { |
| +namespace media { |
| + |
| +class Decoder; |
| + |
| +typedef SharedPtr<Decoder, PacketTransform> DecoderPtr; |
| + |
| +// Abstract base class for transforms that decode compressed media. |
| +class Decoder : public PacketTransform { |
| + public: |
| + // Creates a Decoder object for a given stream type. |
| + static Result Create( |
| + const StreamTypePtr& stream_type, |
| + DecoderPtr* decoder_out); |
| + |
| + ~Decoder() override {} |
| + |
| + // Initializes the decoder. |
| + 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.
|
| + |
| + // Returns the type of the stream the decoder will produce. |
| + virtual StreamTypePtr output_stream_type() = 0; |
| +}; |
| + |
| +} // namespace media |
| +} // namespace mojo |
| + |
| +#endif // SERVICES_MEDIA_FRAMEWORK_PARTS_DECODER_H_ |