[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / windowing / gbm / drm / DRMConnector.h
blobcde242d49f5b97fc831b85ef079d8b182c8a7697
1 /*
2 * Copyright (C) 2005-2020 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "DRMObject.h"
13 #include <string>
15 namespace KODI
17 namespace WINDOWING
19 namespace GBM
22 class CDRMConnector : public CDRMObject
24 public:
25 explicit CDRMConnector(int fd, uint32_t connector);
26 CDRMConnector(const CDRMConnector&) = delete;
27 CDRMConnector& operator=(const CDRMConnector&) = delete;
28 ~CDRMConnector() = default;
30 std::string GetType();
31 std::string GetStatus();
32 std::string GetName();
34 uint32_t GetEncoderId() const { return m_connector->encoder_id; }
35 uint32_t* GetConnectorId() const { return &m_connector->connector_id; }
36 int GetModesCount() const { return m_connector->count_modes; }
37 drmModeModeInfoPtr GetModeForIndex(int index) const { return &m_connector->modes[index]; }
39 bool IsConnected() { return m_connector->connection == DRM_MODE_CONNECTED; }
40 bool CheckConnector();
42 std::vector<uint8_t> GetEDID() const;
44 private:
45 struct DrmModeConnectorDeleter
47 void operator()(drmModeConnector* p) { drmModeFreeConnector(p); }
50 std::unique_ptr<drmModeConnector, DrmModeConnectorDeleter> m_connector;
53 } // namespace GBM
54 } // namespace WINDOWING
55 } // namespace KODI