Shaka Player Embedded
decoder.h
Go to the documentation of this file.
1 // Copyright 2019 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef SHAKA_EMBEDDED_MEDIA_DECODER_H_
16 #define SHAKA_EMBEDDED_MEDIA_DECODER_H_
17 
18 #include <memory>
19 #include <string>
20 
21 #include "../eme/implementation.h"
22 #include "../macros.h"
23 #include "frames.h"
24 #include "media_capabilities.h"
25 
26 namespace shaka {
27 namespace media {
28 
43  public:
45 
47  virtual MediaCapabilitiesInfo DecodingInfo(
48  const MediaDecodingConfiguration& config) const = 0;
49 
54  virtual void ResetDecoder() = 0;
55 
73  virtual MediaStatus Decode(
74  std::shared_ptr<EncodedFrame> input, const eme::Implementation* eme,
75  std::vector<std::shared_ptr<DecodedFrame>>* frames,
76  std::string* extra_info) = 0;
77 
78 
83  static std::unique_ptr<Decoder> CreateDefaultDecoder();
84 };
85 
86 } // namespace media
87 } // namespace shaka
88 
89 #endif // SHAKA_EMBEDDED_MEDIA_DECODER_H_
#define SHAKA_EXPORT
Definition: macros.h:30
#define SHAKA_DECLARE_INTERFACE_METHODS(Type)
Definition: macros.h:55
std::list< std::shared_ptr< BaseFrame > > frames
Definition: streams.cc:128