Valkka  1.6.1
OpenSource Video Management
vaapithread.h
Go to the documentation of this file.
1 #ifndef vaapithread_HEADER_GUARD
2 #define vaapithread_HEADER_GUARD
3 /*
4  * vaapithread.h :
5  *
6  * (c) Copyright 2017-2024 Sampsa Riikonen
7  *
8  * Authors: Sampsa Riikonen <sampsa.riikonen@iki.fi>
9  *
10  * This file is part of the Valkka library.
11  *
12  * Valkka is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Affero General Public License as
14  * published by the Free Software Foundation, either version 3 of the
15  * License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Affero General Public License for more details.
21  *
22  * You should have received a copy of the GNU Affero General Public License
23  * along with this program. If not, see <https://www.gnu.org/licenses/>
24  *
25  */
26 
36 #ifdef NO_VAAPI
37 // empty file
38 #else
39 
40 #include "decoderthread.h"
41 #include "hwdecoder.h"
42 
43 class VAAPIThread : public DecoderThread { // <pyapi>
44 
45 public: // <pyapi>
53  VAAPIThread(const char* name, FrameFilter& outfilter, FrameFifoContext fifo_ctx=FrameFifoContext()); // <pyapi>
54  virtual ~VAAPIThread();
55 
56 protected:
57  virtual Decoder* chooseAudioDecoder(AVCodecID codec_id);
58  virtual Decoder* chooseVideoDecoder(AVCodecID codec_id);
59  virtual Decoder* fallbackAudioDecoder(AVCodecID codec_id);
60  virtual Decoder* fallbackVideoDecoder(AVCodecID codec_id);
61 
62 }; // <pyapi>
63 
64 #endif
65 
66 #endif
Definition: decoderthread.h:43
FrameFilter & outfilter
Outgoing, decoded frames are written here.
Definition: decoderthread.h:63
A Virtual class for decoders.
Definition: decoder.h:62
The mother class of all frame filters! FrameFilters are used to create "filter chains".
Definition: framefilter.h:44
std::string name
Name of the thread.
Definition: thread.h:116
Definition: vaapithread.h:43
virtual ~VAAPIThread()
Default destructor. Calls AVThread::stopCall // <pyapi>
Definition: vaapithread.cpp:45
virtual Decoder * fallbackVideoDecoder(AVCodecID codec_id)
If the the video decoder obtained from chooseVideoDecoder fails for some reason, provide a fallback v...
Definition: vaapithread.cpp:69
virtual Decoder * chooseVideoDecoder(AVCodecID codec_id)
Chooses a video decoder.
Definition: vaapithread.cpp:52
VAAPIThread(const char *name, FrameFilter &outfilter, FrameFifoContext fifo_ctx=FrameFifoContext())
Default constructor.
Definition: vaapithread.cpp:40
Describes the stack structure and fifo behaviour for a FrameFifo.
Definition: framefifo.h:56