Tag Parser
12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
id3
id3v2frameids.cpp
Go to the documentation of this file.
1
#include "
./id3v2frameids.h
"
2
3
#include "
../exceptions.h
"
4
5
namespace
TagParser
{
6
21
namespace
Id3v2FrameIds {
22
27
std::uint32_t
convertToShortId
(std::uint32_t
id
)
28
{
29
switch
(
id
) {
30
case
lAlbum
:
31
return
sAlbum
;
32
case
lArtist
:
33
return
sArtist
;
34
case
lComment
:
35
return
sComment
;
36
case
lYear
:
37
return
sYear
;
38
case
lOriginalYear
:
39
return
sOriginalYear
;
40
case
lRecordingDates
:
41
return
sRecordingDates
;
42
case
lDate
:
43
return
sDate
;
44
case
lTime
:
45
return
sTime
;
46
case
lTitle
:
47
return
sTitle
;
48
case
lGenre
:
49
return
sGenre
;
50
case
lTrackPosition
:
51
return
sTrackPosition
;
52
case
lDiskPosition
:
53
return
sDiskPosition
;
54
case
lEncoder
:
55
return
sEncoder
;
56
case
lBpm
:
57
return
sBpm
;
58
case
lCover
:
59
return
sCover
;
60
case
lWriter
:
61
return
sWriter
;
62
case
lLength
:
63
return
sLength
;
64
case
lLanguage
:
65
return
sLanguage
;
66
case
lEncoderSettings
:
67
return
sEncoderSettings
;
68
case
lUnsynchronizedLyrics
:
69
return
sUnsynchronizedLyrics
;
70
case
lAlbumArtist
:
71
return
sAlbumArtist
;
72
case
lContentGroupDescription
:
73
return
sContentGroupDescription
;
74
case
lRecordLabel
:
75
return
sRecordLabel
;
76
case
lUserDefinedText
:
77
return
sUserDefinedText
;
78
case
lRemixedBy
:
79
return
sRemixedBy
;
80
case
lCopyright
:
81
return
sCopyright
;
82
case
lPlayCounter
:
83
return
sPlayCounter
;
84
case
lRating
:
85
return
sRating
;
86
case
lISRC
:
87
return
sISRC
;
88
case
lPublisherWebpage
:
89
return
sPublisherWebpage
;
90
case
lUserDefinedURL
:
91
return
sUserDefinedURL
;
92
default
:
93
return
0;
94
}
95
}
96
101
std::uint32_t
convertToLongId
(std::uint32_t
id
)
102
{
103
switch
(
id
) {
104
case
sAlbum
:
105
return
lAlbum
;
106
case
sArtist
:
107
return
lArtist
;
108
case
sComment
:
109
return
lComment
;
110
case
sYear
:
111
return
lYear
;
112
case
sOriginalYear
:
113
return
lOriginalYear
;
114
case
sRecordingDates
:
115
return
lRecordingDates
;
116
case
sDate
:
117
return
lDate
;
118
case
sTime
:
119
return
lTime
;
120
case
sTitle
:
121
return
lTitle
;
122
case
sGenre
:
123
return
lGenre
;
124
case
sTrackPosition
:
125
return
lTrackPosition
;
126
case
sDiskPosition
:
127
return
lDiskPosition
;
128
case
sEncoder
:
129
return
lEncoder
;
130
case
sBpm
:
131
return
lBpm
;
132
case
sCover
:
133
return
lCover
;
134
case
sWriter
:
135
return
lWriter
;
136
case
sLength
:
137
return
lLength
;
138
case
sLanguage
:
139
return
lLanguage
;
140
case
sEncoderSettings
:
141
return
lEncoderSettings
;
142
case
sUnsynchronizedLyrics
:
143
return
lUnsynchronizedLyrics
;
144
case
sAlbumArtist
:
145
return
lAlbumArtist
;
146
case
sContentGroupDescription
:
147
return
lContentGroupDescription
;
148
case
sRecordLabel
:
149
return
lRecordLabel
;
150
case
sUserDefinedText
:
151
return
lUserDefinedText
;
152
case
sRemixedBy
:
153
return
lRemixedBy
;
154
case
sCopyright
:
155
return
lCopyright
;
156
case
sPlayCounter
:
157
return
lPlayCounter
;
158
case
sRating
:
159
return
lRating
;
160
case
sISRC
:
161
return
lISRC
;
162
case
sPublisherWebpage
:
163
return
lPublisherWebpage
;
164
case
sUserDefinedURL
:
165
return
lUserDefinedURL
;
166
default
:
167
return
0;
168
}
169
}
170
178
bool
isPreId3v24Id
(uint32_t
id
)
179
{
180
switch
(
id
) {
181
case
lYear
:
182
case
lOriginalYear
:
183
case
lRecordingDates
:
184
case
lDate
:
185
case
lTime
:
186
return
true
;
187
default
:
188
return
false
;
189
}
190
}
191
196
bool
isOnlyId3v24Id
(uint32_t
id
)
197
{
198
switch
(
id
) {
199
case
lRecordingTime
:
200
case
lReleaseTime
:
201
case
lOriginalReleaseTime
:
202
case
lTaggingTime
:
203
return
true
;
204
default
:
205
return
false
;
206
}
207
}
208
209
}
// namespace Id3v2FrameIds
210
211
}
// namespace TagParser
exceptions.h
id3v2frameids.h
TagParser::Id3v2FrameIds::isPreId3v24Id
TAG_PARSER_EXPORT bool isPreId3v24Id(std::uint32_t id)
TagParser::Id3v2FrameIds::convertToShortId
TAG_PARSER_EXPORT std::uint32_t convertToShortId(std::uint32_t id)
Converts the specified long frame ID to the equivalent short frame ID.
Definition
id3v2frameids.cpp:27
TagParser::Id3v2FrameIds::lRating
@ lRating
Definition
id3v2frameids.h:45
TagParser::Id3v2FrameIds::sRecordLabel
@ sRecordLabel
Definition
id3v2frameids.h:78
TagParser::Id3v2FrameIds::sISRC
@ sISRC
Definition
id3v2frameids.h:85
TagParser::Id3v2FrameIds::lPublisherWebpage
@ lPublisherWebpage
Definition
id3v2frameids.h:52
TagParser::Id3v2FrameIds::sRating
@ sRating
Definition
id3v2frameids.h:82
TagParser::Id3v2FrameIds::sEncoder
@ sEncoder
Definition
id3v2frameids.h:67
TagParser::Id3v2FrameIds::lWriter
@ lWriter
Definition
id3v2frameids.h:33
TagParser::Id3v2FrameIds::lISRC
@ lISRC
Definition
id3v2frameids.h:50
TagParser::Id3v2FrameIds::lYear
@ lYear
Definition
id3v2frameids.h:17
TagParser::Id3v2FrameIds::lArtist
@ lArtist
Definition
id3v2frameids.h:15
TagParser::Id3v2FrameIds::lTrackPosition
@ lTrackPosition
Definition
id3v2frameids.h:28
TagParser::Id3v2FrameIds::lLanguage
@ lLanguage
Definition
id3v2frameids.h:35
TagParser::Id3v2FrameIds::lContentGroupDescription
@ lContentGroupDescription
Definition
id3v2frameids.h:40
TagParser::Id3v2FrameIds::sTime
@ sTime
Definition
id3v2frameids.h:62
TagParser::Id3v2FrameIds::lAlbumArtist
@ lAlbumArtist
Definition
id3v2frameids.h:39
TagParser::Id3v2FrameIds::sEncoderSettings
@ sEncoderSettings
Definition
id3v2frameids.h:73
TagParser::Id3v2FrameIds::lEncoderSettings
@ lEncoderSettings
Definition
id3v2frameids.h:36
TagParser::Id3v2FrameIds::sUserDefinedText
@ sUserDefinedText
Definition
id3v2frameids.h:86
TagParser::Id3v2FrameIds::sComment
@ sComment
Definition
id3v2frameids.h:57
TagParser::Id3v2FrameIds::lDate
@ lDate
Definition
id3v2frameids.h:20
TagParser::Id3v2FrameIds::lUserDefinedText
@ lUserDefinedText
Definition
id3v2frameids.h:51
TagParser::Id3v2FrameIds::sPublisherWebpage
@ sPublisherWebpage
Definition
id3v2frameids.h:87
TagParser::Id3v2FrameIds::lReleaseTime
@ lReleaseTime
Definition
id3v2frameids.h:23
TagParser::Id3v2FrameIds::lTime
@ lTime
Definition
id3v2frameids.h:21
TagParser::Id3v2FrameIds::sArtist
@ sArtist
Definition
id3v2frameids.h:56
TagParser::Id3v2FrameIds::lEncoder
@ lEncoder
Definition
id3v2frameids.h:30
TagParser::Id3v2FrameIds::sLength
@ sLength
Definition
id3v2frameids.h:71
TagParser::Id3v2FrameIds::lOriginalReleaseTime
@ lOriginalReleaseTime
Definition
id3v2frameids.h:24
TagParser::Id3v2FrameIds::lCover
@ lCover
Definition
id3v2frameids.h:32
TagParser::Id3v2FrameIds::lTaggingTime
@ lTaggingTime
Definition
id3v2frameids.h:25
TagParser::Id3v2FrameIds::sYear
@ sYear
Definition
id3v2frameids.h:58
TagParser::Id3v2FrameIds::sContentGroupDescription
@ sContentGroupDescription
Definition
id3v2frameids.h:77
TagParser::Id3v2FrameIds::lRecordingTime
@ lRecordingTime
Definition
id3v2frameids.h:22
TagParser::Id3v2FrameIds::sRemixedBy
@ sRemixedBy
Definition
id3v2frameids.h:83
TagParser::Id3v2FrameIds::sBpm
@ sBpm
Definition
id3v2frameids.h:68
TagParser::Id3v2FrameIds::sCopyright
@ sCopyright
Definition
id3v2frameids.h:84
TagParser::Id3v2FrameIds::lRecordingDates
@ lRecordingDates
Definition
id3v2frameids.h:19
TagParser::Id3v2FrameIds::sAlbumArtist
@ sAlbumArtist
Definition
id3v2frameids.h:76
TagParser::Id3v2FrameIds::lCopyright
@ lCopyright
Definition
id3v2frameids.h:47
TagParser::Id3v2FrameIds::sRecordingDates
@ sRecordingDates
Definition
id3v2frameids.h:60
TagParser::Id3v2FrameIds::sGenre
@ sGenre
Definition
id3v2frameids.h:64
TagParser::Id3v2FrameIds::lUserDefinedURL
@ lUserDefinedURL
Definition
id3v2frameids.h:53
TagParser::Id3v2FrameIds::lPlayCounter
@ lPlayCounter
Definition
id3v2frameids.h:44
TagParser::Id3v2FrameIds::sDiskPosition
@ sDiskPosition
Definition
id3v2frameids.h:66
TagParser::Id3v2FrameIds::lAlbum
@ lAlbum
Definition
id3v2frameids.h:14
TagParser::Id3v2FrameIds::lComment
@ lComment
Definition
id3v2frameids.h:16
TagParser::Id3v2FrameIds::lUnsynchronizedLyrics
@ lUnsynchronizedLyrics
Definition
id3v2frameids.h:37
TagParser::Id3v2FrameIds::sTitle
@ sTitle
Definition
id3v2frameids.h:63
TagParser::Id3v2FrameIds::lDiskPosition
@ lDiskPosition
Definition
id3v2frameids.h:29
TagParser::Id3v2FrameIds::sUnsynchronizedLyrics
@ sUnsynchronizedLyrics
Definition
id3v2frameids.h:74
TagParser::Id3v2FrameIds::lTitle
@ lTitle
Definition
id3v2frameids.h:26
TagParser::Id3v2FrameIds::sLanguage
@ sLanguage
Definition
id3v2frameids.h:72
TagParser::Id3v2FrameIds::lOriginalYear
@ lOriginalYear
Definition
id3v2frameids.h:18
TagParser::Id3v2FrameIds::lRecordLabel
@ lRecordLabel
Definition
id3v2frameids.h:41
TagParser::Id3v2FrameIds::sAlbum
@ sAlbum
Definition
id3v2frameids.h:55
TagParser::Id3v2FrameIds::sPlayCounter
@ sPlayCounter
Definition
id3v2frameids.h:81
TagParser::Id3v2FrameIds::sDate
@ sDate
Definition
id3v2frameids.h:61
TagParser::Id3v2FrameIds::lGenre
@ lGenre
Definition
id3v2frameids.h:27
TagParser::Id3v2FrameIds::sWriter
@ sWriter
Definition
id3v2frameids.h:70
TagParser::Id3v2FrameIds::sUserDefinedURL
@ sUserDefinedURL
Definition
id3v2frameids.h:88
TagParser::Id3v2FrameIds::sCover
@ sCover
Definition
id3v2frameids.h:69
TagParser::Id3v2FrameIds::sOriginalYear
@ sOriginalYear
Definition
id3v2frameids.h:59
TagParser::Id3v2FrameIds::lBpm
@ lBpm
Definition
id3v2frameids.h:31
TagParser::Id3v2FrameIds::lRemixedBy
@ lRemixedBy
Definition
id3v2frameids.h:46
TagParser::Id3v2FrameIds::lLength
@ lLength
Definition
id3v2frameids.h:34
TagParser::Id3v2FrameIds::sTrackPosition
@ sTrackPosition
Definition
id3v2frameids.h:65
TagParser::Id3v2FrameIds::isOnlyId3v24Id
TAG_PARSER_EXPORT bool isOnlyId3v24Id(std::uint32_t id)
TagParser::Id3v2FrameIds::convertToLongId
TAG_PARSER_EXPORT std::uint32_t convertToLongId(std::uint32_t id)
Converts the specified short frame ID to the equivalent long frame ID.
Definition
id3v2frameids.cpp:101
TagParser
Contains all classes and functions of the TagInfo library.
Definition
aaccodebook.h:10
Generated on Sun Sep 22 2024 20:12:46 for Tag Parser by
1.12.0