Debian Codegraph @

xbmc/cores/VideoPlayer/Process/wayland/ProcessInfoWayland.cpp

raw
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9 #include "ProcessInfoWayland.h"
10
11 #include "cores/VideoPlayer/Buffers/VideoBufferPoolDMA.h"
12
13 #include <mutex>
14
15 using namespace VIDEOPLAYER;
16
17 CProcessInfo* CProcessInfoWayland::Create()
18 {
19 return new CProcessInfoWayland();
20 }
21
22 void CProcessInfoWayland::Register()
23 {
24 CProcessInfo::RegisterProcessControl("Wayland", CProcessInfoWayland::Create);
25 }
26
27 CProcessInfoWayland::CProcessInfoWayland()
28 {
29 m_videoBufferManager.RegisterPool(std::make_shared<CVideoBufferPoolDMA>());
30 }
31
32 void CProcessInfoWayland::SetSwDeinterlacingMethods()
33 {
34 // first populate with the defaults from base implementation
35 CProcessInfo::SetSwDeinterlacingMethods();
36
37 std::list<EINTERLACEMETHOD> methods;
38 {
39 // get the current methods
40 std::unique_lock<CCriticalSection> lock(m_videoCodecSection);
41 methods = m_deintMethods;
42 }
43 // add bob and blend deinterlacer
44 methods.push_back(EINTERLACEMETHOD::VS_INTERLACEMETHOD_RENDER_BOB);
45 methods.push_back(EINTERLACEMETHOD::VS_INTERLACEMETHOD_RENDER_BLEND);
46
47 // update with the new methods list
48 UpdateDeinterlacingMethods(methods);
49 }
50
51 std::vector<AVPixelFormat> CProcessInfoWayland::GetRenderFormats()
52 {
53 return
54 {
55 // GL & GLES
56 AV_PIX_FMT_YUV420P,
57 AV_PIX_FMT_NV12,
58
59 #if defined(HAS_GL)
60 // Full GL only at the moment
61 // TODO YUV420Pxx need runtime-checking for GL_ALPHA16/GL_LUMINANCE16 support
62 AV_PIX_FMT_YUV420P9,
63 AV_PIX_FMT_YUV420P10,
64 AV_PIX_FMT_YUV420P12,
65 AV_PIX_FMT_YUV420P14,
66 AV_PIX_FMT_YUV420P16,
67 AV_PIX_FMT_YUYV422,
68 AV_PIX_FMT_UYVY422
69 #endif
70 };
71 }