MythTV  master
vaapi2context.h
Go to the documentation of this file.
1 // Copyright (c) 2017 MythTV Developers <mythtv-dev@mythtv.org>
3 //
4 // This is part of MythTV (https://www.mythtv.org)
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 //
24 
25 
26 #ifndef VAAPI2CONTEXT_H
27 #define VAAPI2CONTEXT_H
28 
29 #include "mythtvexp.h"
30 #include "mythcodecid.h"
31 #include "mythcodeccontext.h"
32 
33 extern "C" {
34  #include "libavcodec/avcodec.h"
35 }
36 
38 {
39  public:
40  Vaapi2Context(void) = default;
41  ~Vaapi2Context();
42  static MythCodecID GetBestSupportedCodec(AVCodec **ppCodec,
43  const QString &decoder,
44  uint stream_type,
45  AVPixelFormat &pix_fmt);
46  int HwDecoderInit(AVCodecContext *ctx) override; // MythCodecContext
47  QString GetDeinterlaceFilter(void) override; // MythCodecContext
48  bool isValidDeinterlacer(QString /*name*/ ) override; // MythCodecContext
49  QStringList GetDeinterlacers(void) override; // MythCodecContext
50 
51  protected:
52  int InitDeinterlaceFilter(AVCodecContext *ctx, AVFrame *frame) override; // MythCodecContext
53  void CloseFilters();
54 
55 };
56 
57 #endif // VAAPI2CONTEXT_H
MythCodecID
Definition: mythcodecid.h:10
struct AVFrame AVFrame
unsigned int uint
Definition: compat.h:140
virtual int InitDeinterlaceFilter(AVCodecContext *ctx, AVFrame *frame)
#define MTV_PUBLIC
Definition: mythtvexp.h:15
virtual bool isValidDeinterlacer(QString)
virtual QStringList GetDeinterlacers(void)
virtual QString GetDeinterlaceFilter()
virtual int HwDecoderInit(AVCodecContext *)