diff options
Diffstat (limited to 'xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.h')
| -rw-r--r-- | xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.h | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.h deleted file mode 100644 index 0c75c4a..0000000 --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.h +++ /dev/null | |||
| @@ -1,99 +0,0 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | /* | ||
| 4 | * Copyright (C) 2005-2013 Team XBMC | ||
| 5 | * http://xbmc.org | ||
| 6 | * | ||
| 7 | * This Program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 10 | * any later version. | ||
| 11 | * | ||
| 12 | * This Program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with XBMC; see the file COPYING. If not, see | ||
| 19 | * <http://www.gnu.org/licenses/>. | ||
| 20 | * | ||
| 21 | */ | ||
| 22 | |||
| 23 | #include "DVDDemux.h" | ||
| 24 | |||
| 25 | #include <memory> | ||
| 26 | #include <vector> | ||
| 27 | |||
| 28 | class CDVDOverlayCodecFFmpeg; | ||
| 29 | class CDVDInputStream; | ||
| 30 | class CDVDDemuxFFmpeg; | ||
| 31 | |||
| 32 | class CDVDDemuxVobsub : public CDVDDemux | ||
| 33 | { | ||
| 34 | public: | ||
| 35 | CDVDDemuxVobsub(); | ||
| 36 | virtual ~CDVDDemuxVobsub(); | ||
| 37 | |||
| 38 | virtual bool Open(const std::string& filename, const std::string& subfilename = ""); | ||
| 39 | virtual void Reset(); | ||
| 40 | virtual void Abort() {}; | ||
| 41 | virtual void Flush(); | ||
| 42 | virtual DemuxPacket* Read(); | ||
| 43 | virtual bool SeekTime(int time, bool backwords, double* startpts = NULL); | ||
| 44 | virtual void SetSpeed(int speed) {} | ||
| 45 | virtual CDemuxStream* GetStream(int index) { return m_Streams[index]; } | ||
| 46 | virtual int GetNrOfStreams() { return m_Streams.size(); } | ||
| 47 | virtual int GetStreamLength() { return 0; } | ||
| 48 | virtual std::string GetFileName() { return m_Filename; } | ||
| 49 | |||
| 50 | private: | ||
| 51 | class CStream | ||
| 52 | : public CDemuxStreamSubtitle | ||
| 53 | { | ||
| 54 | public: | ||
| 55 | CStream(CDVDDemuxVobsub* parent) | ||
| 56 | : m_discard(AVDISCARD_NONE), m_parent(parent) | ||
| 57 | {} | ||
| 58 | virtual void SetDiscard(AVDiscard discard) { m_discard = discard; } | ||
| 59 | virtual AVDiscard GetDiscard() { return m_discard; } | ||
| 60 | |||
| 61 | AVDiscard m_discard; | ||
| 62 | CDVDDemuxVobsub* m_parent; | ||
| 63 | }; | ||
| 64 | |||
| 65 | typedef struct STimestamp | ||
| 66 | { | ||
| 67 | int64_t pos; | ||
| 68 | double pts; | ||
| 69 | int id; | ||
| 70 | } STimestamp; | ||
| 71 | |||
| 72 | std::string m_Filename; | ||
| 73 | std::unique_ptr<CDVDInputStream> m_Input; | ||
| 74 | std::unique_ptr<CDVDDemuxFFmpeg> m_Demuxer; | ||
| 75 | std::vector<STimestamp> m_Timestamps; | ||
| 76 | std::vector<STimestamp>::iterator m_Timestamp; | ||
| 77 | std::vector<CStream*> m_Streams; | ||
| 78 | |||
| 79 | typedef struct SState | ||
| 80 | { | ||
| 81 | int id; | ||
| 82 | double delay; | ||
| 83 | std::string extra; | ||
| 84 | } SState; | ||
| 85 | |||
| 86 | struct sorter | ||
| 87 | { | ||
| 88 | bool operator()(const STimestamp &p1, const STimestamp &p2) | ||
| 89 | { | ||
| 90 | return p1.pts < p2.pts || (p1.pts == p2.pts && p1.id < p2.id); | ||
| 91 | } | ||
| 92 | }; | ||
| 93 | |||
| 94 | bool ParseLangIdx(SState& state, char* line); | ||
| 95 | bool ParseDelay(SState& state, char* line); | ||
| 96 | bool ParseId(SState& state, char* line); | ||
| 97 | bool ParseExtra(SState& state, char* line); | ||
| 98 | bool ParseTimestamp(SState& state, char* line); | ||
| 99 | }; | ||
