kodi
VideoTagLoaderFFmpeg.h
1 /*
2  * Copyright (C) 2017-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 #pragma once
10 
11 #include "IVideoInfoTagLoader.h"
12 
13 #include <string>
14 #include <vector>
15 
16 struct AVFormatContext;
17 struct AVIOContext;
18 namespace XFILE
19 {
20  class CFile;
21 }
22 
25 {
26 public:
28  CVideoTagLoaderFFmpeg(const CFileItem& item,
29  const ADDON::ScraperPtr& info,
30  bool lookInFolder);
31 
33  ~CVideoTagLoaderFFmpeg() override;
34 
36  bool HasInfo() const override;
37 
40  CInfoScanner::INFO_TYPE Load(CVideoInfoTag& tag, bool,
41  std::vector<EmbeddedArt>* art = nullptr) override;
42 
43  ADDON::ScraperPtr GetScraperInfo() const { return m_info; }
44 
45 protected:
46  ADDON::ScraperPtr m_info;
47  AVIOContext* m_ioctx = nullptr;
48  AVFormatContext* m_fctx = nullptr;
49  XFILE::CFile* m_file = nullptr;
50  mutable int m_metadata_stream = -1;
51  mutable bool m_override_data = false;
52 
54  CInfoScanner::INFO_TYPE LoadMKV(CVideoInfoTag& tag, std::vector<EmbeddedArt>* art);
55 
57  CInfoScanner::INFO_TYPE LoadMP4(CVideoInfoTag& tag, std::vector<EmbeddedArt>* art);
58 
60  CInfoScanner::INFO_TYPE LoadAVI(CVideoInfoTag& tag, std::vector<EmbeddedArt>* art);
61 };
62 
Definition: Scraper.h:41
Base class for video tag loaders.
Definition: IVideoInfoTagLoader.h:25
Definition: File.h:37
Definition: SimpleFS.h:27
Video tag loader using FFMPEG.
Definition: VideoTagLoaderFFmpeg.h:24
ADDON::ScraperPtr m_info
Passed scraper info.
Definition: VideoTagLoaderFFmpeg.h:46
Definition: VideoInfoTag.h:53
Represents a file on a share.
Definition: FileItem.h:102
INFO_TYPE
Definition: InfoScanner.h:37