anbox-platform-sdk  1.23.0
Anbox Platform SDK API documentation
video_decoder.h
Go to the documentation of this file.
1 /*
2  * This file is part of Anbox Platform SDK
3  *
4  * Copyright 2021 Canonical Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef ANBOX_SDK_VIDEO_DECODER_H_
20 #define ANBOX_SDK_VIDEO_DECODER_H_
21 
23 
24 namespace anbox {
29 class VideoDecoder {
30  public:
31  VideoDecoder() = default;
32  virtual ~VideoDecoder() = default;
33  VideoDecoder(const VideoDecoder &) = delete;
34  VideoDecoder& operator=(const VideoDecoder &) = delete;
35 
42  virtual int configure(const AnboxVideoDecoderConfig& config) = 0;
43 
49  virtual int flush() = 0;
50 
58  virtual uint64_t decode_frame(const AnboxVideoFrame* frame, int64_t pts) = 0;
59 
66  virtual int retrieve_image(AnboxVideoImage* img) = 0;
67 };
68 } // namespace anbox
69 
70 #endif
Provides access to a video decoder which will be used by both Anbox and the Android instance for hard...
Definition: video_decoder.h:29
virtual uint64_t decode_frame(const AnboxVideoFrame *frame, int64_t pts)=0
Decode the given frame with its presentation timestamp.
virtual int configure(const AnboxVideoDecoderConfig &config)=0
Configure the video decoder with the given spec.
VideoDecoder & operator=(const VideoDecoder &)=delete
VideoDecoder()=default
virtual int retrieve_image(AnboxVideoImage *img)=0
Retrieve the latest decoded image from the video decoder.
VideoDecoder(const VideoDecoder &)=delete
virtual int flush()=0
Flush all pending frames to the decoder for decoding.
virtual ~VideoDecoder()=default
AnboxVideoDecoderConfig describes the configuration of a video decoder.
Definition: types.h:1611
AnboxVideoFrame represents a single complete video frame.
Definition: types.h:742
AnboxVideoImage describes a decoded image returned by the video decoder.
Definition: types.h:1623