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.
18 class CStreamDetailSubtitle
;
19 class CDVDInputStream
;
21 class CTextureDetails
;
26 static std::unique_ptr
<CTexture
> ExtractThumbToTexture(const CFileItem
& fileItem
,
27 int chapterNumber
= 0);
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
);
40 static bool DemuxerToStreamDetails(const std::shared_ptr
<CDVDInputStream
>& pInputStream
,
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
,
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
);