[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / cores / VideoPlayer / DVDFileInfo.h
blob8bf69f72b6a86c0c4ae45a6551820e07b21c0d0b
1 /*
2 * Copyright (C) 2005-2018 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 <memory>
12 #include <string>
13 #include <vector>
15 class CFileItem;
16 class CDVDDemux;
17 class CStreamDetails;
18 class CStreamDetailSubtitle;
19 class CDVDInputStream;
20 class CTexture;
21 class CTextureDetails;
23 class CDVDFileInfo
25 public:
26 static std::unique_ptr<CTexture> ExtractThumbToTexture(const CFileItem& fileItem,
27 int chapterNumber = 0);
29 /*!
30 * @brief Can a thumbnail image and file stream details be extracted from this file item?
32 static bool CanExtract(const CFileItem& fileItem);
34 // Probe the files streams and store the info in the VideoInfoTag
35 static bool GetFileStreamDetails(CFileItem* pItem);
37 static bool GetFileDuration(const std::string& path, int& duration);
39 private:
40 static bool DemuxerToStreamDetails(const std::shared_ptr<CDVDInputStream>& pInputStream,
41 CDVDDemux* pDemux,
42 CStreamDetails& details,
43 const std::string& path = "");
45 /** \brief Probe the file's internal and external streams and store the info in the StreamDetails parameter.
46 * \param[out] details The file's StreamDetails consisting of internal streams and external subtitle streams.
48 static bool DemuxerToStreamDetails(const std::shared_ptr<CDVDInputStream>& pInputStream,
49 CDVDDemux* pDemuxer,
50 const std::vector<CStreamDetailSubtitle>& subs,
51 CStreamDetails& details);
53 /** \brief Probe the streams of an external subtitle file and store the info in the StreamDetails parameter.
54 * \param[out] details The external subtitle file's StreamDetails.
56 static bool AddExternalSubtitleToDetails(const std::string &path, CStreamDetails &details, const std::string& filename, const std::string& subfilename = "");
58 /** \brief Checks external subtitles for a given item and adds any existing ones to the item stream details
59 * \param item The video item
60 * \sa AddExternalSubtitleToDetails
62 static void ProcessExternalSubtitles(CFileItem* item);