[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / cores / VideoPlayer / VideoPlayerAudioID3.h
blobfe97a5e78511a728e9c4f5a1b3c1ef4fc073cad0
1 /*
2 * Copyright (C) 2005-2022 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 "DVDMessageQueue.h"
12 #include "IVideoPlayer.h"
13 #include "Interface/TimingConstants.h"
14 #include "threads/CriticalSection.h"
15 #include "threads/Thread.h"
17 #include <memory>
18 #include <string>
19 #include <vector>
21 #include <taglib/id3v1tag.h>
22 #include <taglib/id3v2tag.h>
23 #include <taglib/tstringlist.h>
25 class CVideoPlayerAudioID3 : public IDVDStreamPlayer, private CThread
27 public:
28 explicit CVideoPlayerAudioID3(CProcessInfo& processInfo);
29 ~CVideoPlayerAudioID3() override;
31 bool CheckStream(const CDVDStreamInfo& hints);
32 void Flush();
33 void WaitForBuffers();
35 bool OpenStream(CDVDStreamInfo hints) override;
36 void CloseStream(bool bWaitForBuffers) override;
37 void SendMessage(std::shared_ptr<CDVDMsg> pMsg, int priority = 0) override;
38 void FlushMessages() override;
39 bool IsInited() const override;
40 bool AcceptsData() const override;
41 bool IsStalled() const override;
43 protected:
44 void OnExit() override;
45 void Process() override;
47 private:
48 void ProcessID3(const unsigned char* data, unsigned int length) const;
49 void ProcessID3v1(const TagLib::ID3v1::Tag* tag) const;
50 void ProcessID3v2(const TagLib::ID3v2::Tag* tag) const;
52 static std::vector<std::string> GetID3v2StringList(const TagLib::ID3v2::FrameList& frameList);
53 static std::vector<std::string> StringListToVectorString(const TagLib::StringList& stringList);
55 int m_speed = DVD_PLAYSPEED_NORMAL;
56 CCriticalSection m_critSection;
57 CDVDMessageQueue m_messageQueue;