FFmpegfs Fuse Multi Media Filesystem 2.14
vcdchapter.h
Go to the documentation of this file.
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 3 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
15 */
16
28#ifndef VCDCHAPTER_H
29#define VCDCHAPTER_H
30
31#pragma once
32
33#include <cstdint>
34#include <string>
35
39typedef enum VCDTYPE
40{
45
49typedef enum VCDPROFILETAG
50{
55
56struct VCDCHAPTER;
57typedef struct VCDCHAPTER VCDCHAPTER;
58
62{
63 friend class VcdEntries;
64
65public:
70 explicit VcdChapter(bool is_svcd);
76 explicit VcdChapter(const VCDCHAPTER & VcdChapter, bool is_svcd);
86 explicit VcdChapter(int track_no, int min, int sec, int frame, bool is_svcd, int64_t duration);
90 virtual ~VcdChapter() = default;
91
96 bool get_is_svcd() const;
101 int get_track_no() const;
106 int get_min() const;
111 int get_sec() const;
119 int get_frame() const;
124 int64_t get_duration() const;
125
130 std::string get_filename() const;
135 uint64_t get_start_pos() const;
140 uint64_t get_end_pos() const;
145 int64_t get_start_time() const;
150 uint64_t get_size() const;
155 int get_lba() const;
156
162 VcdChapter & operator= (VcdChapter const & other);
163
169 int operator==(const VcdChapter & other) const;
175 int operator<(const VcdChapter & other) const;
181 int operator<=(const VcdChapter & other) const;
187 int operator>(const VcdChapter & other) const;
193 int operator>=(const VcdChapter & other) const;
199 int operator!=(const VcdChapter & other) const;
200
201protected:
208 int readio(FILE *fpi, int track_no);
209
210protected:
213 int m_min;
214 int m_sec;
216 int64_t m_duration;
217 uint64_t m_start_pos;
218 uint64_t m_end_pos;
219};
220
221#endif // VCDCHAPTER_H
Video CD chapter.
Definition: vcdchapter.h:62
int get_track_no() const
Get the track number of this chapter.
Definition: vcdchapter.cc:114
uint64_t get_size() const
Get the size of this chapter in bytes.
Definition: vcdchapter.cc:164
int operator>=(const VcdChapter &other) const
Comparison operator >=.
Definition: vcdchapter.cc:328
int64_t m_duration
Chapter duration, in AV_TIME_BASE fractional seconds.
Definition: vcdchapter.h:216
int get_min() const
Get MSF (minutes, seconds, and fractional seconds/frames) minute.
Definition: vcdchapter.cc:119
int get_sec() const
Get MSF (minutes, seconds, and fractional seconds/frames) second.
Definition: vcdchapter.cc:124
virtual ~VcdChapter()=default
Destroy VcdChapter object.
bool m_is_svcd
true for SVCD, false for VCD
Definition: vcdchapter.h:211
int operator!=(const VcdChapter &other) const
Comparison operator !=.
Definition: vcdchapter.cc:338
int operator<=(const VcdChapter &other) const
Comparison operator <=.
Definition: vcdchapter.cc:268
int m_track_no
Track no.
Definition: vcdchapter.h:212
uint64_t m_start_pos
Start offset in bytes.
Definition: vcdchapter.h:217
int64_t get_start_time() const
Get start position of chapter in AV_TIME_BASE units.
Definition: vcdchapter.cc:169
int get_lba() const
Get LBA (large block address) of chapter.
Definition: vcdchapter.cc:188
int operator>(const VcdChapter &other) const
Comparison operator >
Definition: vcdchapter.cc:278
uint64_t get_start_pos() const
Get file position of chapter in bytes.
Definition: vcdchapter.cc:154
int m_sec
MSF second.
Definition: vcdchapter.h:214
uint64_t get_end_pos() const
Get end position of chapter in bytes.
Definition: vcdchapter.cc:159
int m_frame
MSF frame.
Definition: vcdchapter.h:215
int operator<(const VcdChapter &other) const
Comparison operator <.
Definition: vcdchapter.cc:218
bool get_is_svcd() const
Check if this is a Super Video CD.
Definition: vcdchapter.cc:109
int get_frame() const
Get MSF (minutes, seconds, and fractional seconds/frames) frame.
Definition: vcdchapter.cc:129
uint64_t m_end_pos
End offset in bytes (not including this byte)
Definition: vcdchapter.h:218
std::string get_filename() const
Get file name and path of source file (e.g. MPEG/AVSEQ##.MPG).
Definition: vcdchapter.cc:139
int operator==(const VcdChapter &other) const
Comparison operator ==.
Definition: vcdchapter.cc:210
VcdChapter & operator=(VcdChapter const &other)
Assignment operator =.
Definition: vcdchapter.cc:193
int readio(FILE *fpi, int track_no)
Read file from disk.
Definition: vcdchapter.cc:76
int64_t get_duration() const
Get chapter duration, in AV_TIME_BASE fractional seconds.
Definition: vcdchapter.cc:134
VcdChapter(bool is_svcd)
Construct VcdChapter object.
Definition: vcdchapter.cc:37
int m_min
MSF minute.
Definition: vcdchapter.h:213
Video CD entries.
Definition: vcdentries.h:41
Video CD chapter.
Definition: vcdutils.h:65
VCDTYPE
Definition: vcdchapter.h:40
@ VCDTYPE_VCD_20
VCD 2.0.
Definition: vcdchapter.h:43
@ VCDTYPE_UNKNOWN
unknown type
Definition: vcdchapter.h:41
@ VCDTYPE_VCD_10_11_SVCD_10_HQVCD
VCD 1.0, VCD 1.1, SVCD 1.0 und HQVCD.
Definition: vcdchapter.h:42
VCDPROFILETAG
Definition: vcdchapter.h:50
@ VCDPROFILETAG_VCD_10_20_SVCD_HQVCD
VCD 1.0, VCD 2.0, SVCD und HQVCD.
Definition: vcdchapter.h:52
@ VCDPROFILETAG_VCD_11
VCD 1.1.
Definition: vcdchapter.h:53
@ VCDPROFILETAG_UNKNOWN
unknown file tag
Definition: vcdchapter.h:51