Tag Parser
12.4.0
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
lOriginalMediaType
:
41
return
sOriginalMediaType
;
42
case
lRecordingDates
:
43
return
sRecordingDates
;
44
case
lDate
:
45
return
sDate
;
46
case
lTime
:
47
return
sTime
;
48
case
lTitle
:
49
return
sTitle
;
50
case
lGenre
:
51
return
sGenre
;
52
case
lTrackPosition
:
53
return
sTrackPosition
;
54
case
lDiskPosition
:
55
return
sDiskPosition
;
56
case
lEncoder
:
57
return
sEncoder
;
58
case
lBpm
:
59
return
sBpm
;
60
case
lCover
:
61
return
sCover
;
62
case
lWriter
:
63
return
sWriter
;
64
case
lLength
:
65
return
sLength
;
66
case
lLanguage
:
67
return
sLanguage
;
68
case
lEncoderSettings
:
69
return
sEncoderSettings
;
70
case
lUnsynchronizedLyrics
:
71
return
sUnsynchronizedLyrics
;
72
case
lAlbumArtist
:
73
return
sAlbumArtist
;
74
case
lContentGroupDescription
:
75
return
sContentGroupDescription
;
76
case
lRecordLabel
:
77
return
sRecordLabel
;
78
case
lUserDefinedText
:
79
return
sUserDefinedText
;
80
case
lRemixedBy
:
81
return
sRemixedBy
;
82
case
lCopyright
:
83
return
sCopyright
;
84
case
lPlayCounter
:
85
return
sPlayCounter
;
86
case
lRating
:
87
return
sRating
;
88
case
lISRC
:
89
return
sISRC
;
90
case
lKey
:
91
return
sKey
;
92
case
lPublisherWebpage
:
93
return
sPublisherWebpage
;
94
case
lCommericalInfoWebpage
:
95
return
sCommericalInfoWebpage
;
96
case
lCopyrightInfoWebpage
:
97
return
sCopyrightInfoWebpage
;
98
case
lAudioFileWebpage
:
99
return
sAudioFileWebpage
;
100
case
lAudioSourceWebpage
:
101
return
sAudioSourceWebpage
;
102
case
lPerformerWebpage
:
103
return
sPerformerWebpage
;
104
case
lUserDefinedURL
:
105
return
sUserDefinedURL
;
106
default
:
107
return
0;
108
}
109
}
110
115
std::uint32_t
convertToLongId
(std::uint32_t
id
)
116
{
117
switch
(
id
) {
118
case
sAlbum
:
119
return
lAlbum
;
120
case
sArtist
:
121
return
lArtist
;
122
case
sComment
:
123
return
lComment
;
124
case
sYear
:
125
return
lYear
;
126
case
sOriginalYear
:
127
return
lOriginalYear
;
128
case
sOriginalMediaType
:
129
return
lOriginalMediaType
;
130
case
sRecordingDates
:
131
return
lRecordingDates
;
132
case
sDate
:
133
return
lDate
;
134
case
sTime
:
135
return
lTime
;
136
case
sTitle
:
137
return
lTitle
;
138
case
sGenre
:
139
return
lGenre
;
140
case
sTrackPosition
:
141
return
lTrackPosition
;
142
case
sDiskPosition
:
143
return
lDiskPosition
;
144
case
sEncoder
:
145
return
lEncoder
;
146
case
sBpm
:
147
return
lBpm
;
148
case
sCover
:
149
return
lCover
;
150
case
sWriter
:
151
return
lWriter
;
152
case
sLength
:
153
return
lLength
;
154
case
sLanguage
:
155
return
lLanguage
;
156
case
sEncoderSettings
:
157
return
lEncoderSettings
;
158
case
sUnsynchronizedLyrics
:
159
return
lUnsynchronizedLyrics
;
160
case
sAlbumArtist
:
161
return
lAlbumArtist
;
162
case
sContentGroupDescription
:
163
return
lContentGroupDescription
;
164
case
sRecordLabel
:
165
return
lRecordLabel
;
166
case
sUserDefinedText
:
167
return
lUserDefinedText
;
168
case
sRemixedBy
:
169
return
lRemixedBy
;
170
case
sCopyright
:
171
return
lCopyright
;
172
case
sPlayCounter
:
173
return
lPlayCounter
;
174
case
sRating
:
175
return
lRating
;
176
case
sISRC
:
177
return
lISRC
;
178
case
sKey
:
179
return
lKey
;
180
case
sPublisherWebpage
:
181
return
lPublisherWebpage
;
182
case
sCommericalInfoWebpage
:
183
return
lCommericalInfoWebpage
;
184
case
sCopyrightInfoWebpage
:
185
return
lCopyrightInfoWebpage
;
186
case
sAudioFileWebpage
:
187
return
lAudioFileWebpage
;
188
case
sAudioSourceWebpage
:
189
return
lAudioSourceWebpage
;
190
case
sPerformerWebpage
:
191
return
lPerformerWebpage
;
192
case
sUserDefinedURL
:
193
return
lUserDefinedURL
;
194
default
:
195
return
0;
196
}
197
}
198
206
bool
isPreId3v24Id
(uint32_t
id
)
207
{
208
switch
(
id
) {
209
case
lYear
:
210
case
lOriginalYear
:
211
case
lRecordingDates
:
212
case
lDate
:
213
case
lTime
:
214
return
true
;
215
default
:
216
return
false
;
217
}
218
}
219
224
bool
isOnlyId3v24Id
(uint32_t
id
)
225
{
226
switch
(
id
) {
227
case
lRecordingTime
:
228
case
lReleaseTime
:
229
case
lOriginalReleaseTime
:
230
case
lTaggingTime
:
231
return
true
;
232
default
:
233
return
false
;
234
}
235
}
236
237
}
// namespace Id3v2FrameIds
238
239
}
// 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:46
TagParser::Id3v2FrameIds::sRecordLabel
@ sRecordLabel
Definition
id3v2frameids.h:88
TagParser::Id3v2FrameIds::sISRC
@ sISRC
Definition
id3v2frameids.h:95
TagParser::Id3v2FrameIds::sPerformerWebpage
@ sPerformerWebpage
Definition
id3v2frameids.h:103
TagParser::Id3v2FrameIds::lPublisherWebpage
@ lPublisherWebpage
Definition
id3v2frameids.h:60
TagParser::Id3v2FrameIds::sRating
@ sRating
Definition
id3v2frameids.h:92
TagParser::Id3v2FrameIds::sEncoder
@ sEncoder
Definition
id3v2frameids.h:77
TagParser::Id3v2FrameIds::lWriter
@ lWriter
Definition
id3v2frameids.h:34
TagParser::Id3v2FrameIds::lISRC
@ lISRC
Definition
id3v2frameids.h:51
TagParser::Id3v2FrameIds::lYear
@ lYear
Definition
id3v2frameids.h:17
TagParser::Id3v2FrameIds::lArtist
@ lArtist
Definition
id3v2frameids.h:15
TagParser::Id3v2FrameIds::lTrackPosition
@ lTrackPosition
Definition
id3v2frameids.h:29
TagParser::Id3v2FrameIds::lLanguage
@ lLanguage
Definition
id3v2frameids.h:36
TagParser::Id3v2FrameIds::lContentGroupDescription
@ lContentGroupDescription
Definition
id3v2frameids.h:41
TagParser::Id3v2FrameIds::sTime
@ sTime
Definition
id3v2frameids.h:72
TagParser::Id3v2FrameIds::lAlbumArtist
@ lAlbumArtist
Definition
id3v2frameids.h:40
TagParser::Id3v2FrameIds::sEncoderSettings
@ sEncoderSettings
Definition
id3v2frameids.h:83
TagParser::Id3v2FrameIds::lEncoderSettings
@ lEncoderSettings
Definition
id3v2frameids.h:37
TagParser::Id3v2FrameIds::sUserDefinedText
@ sUserDefinedText
Definition
id3v2frameids.h:97
TagParser::Id3v2FrameIds::sComment
@ sComment
Definition
id3v2frameids.h:66
TagParser::Id3v2FrameIds::lDate
@ lDate
Definition
id3v2frameids.h:20
TagParser::Id3v2FrameIds::lUserDefinedText
@ lUserDefinedText
Definition
id3v2frameids.h:53
TagParser::Id3v2FrameIds::sPublisherWebpage
@ sPublisherWebpage
Definition
id3v2frameids.h:102
TagParser::Id3v2FrameIds::lReleaseTime
@ lReleaseTime
Definition
id3v2frameids.h:23
TagParser::Id3v2FrameIds::lTime
@ lTime
Definition
id3v2frameids.h:21
TagParser::Id3v2FrameIds::sAudioFileWebpage
@ sAudioFileWebpage
Definition
id3v2frameids.h:100
TagParser::Id3v2FrameIds::sCopyrightInfoWebpage
@ sCopyrightInfoWebpage
Definition
id3v2frameids.h:99
TagParser::Id3v2FrameIds::sArtist
@ sArtist
Definition
id3v2frameids.h:65
TagParser::Id3v2FrameIds::lEncoder
@ lEncoder
Definition
id3v2frameids.h:31
TagParser::Id3v2FrameIds::sLength
@ sLength
Definition
id3v2frameids.h:81
TagParser::Id3v2FrameIds::lOriginalReleaseTime
@ lOriginalReleaseTime
Definition
id3v2frameids.h:24
TagParser::Id3v2FrameIds::lCover
@ lCover
Definition
id3v2frameids.h:33
TagParser::Id3v2FrameIds::lTaggingTime
@ lTaggingTime
Definition
id3v2frameids.h:26
TagParser::Id3v2FrameIds::sYear
@ sYear
Definition
id3v2frameids.h:67
TagParser::Id3v2FrameIds::sContentGroupDescription
@ sContentGroupDescription
Definition
id3v2frameids.h:87
TagParser::Id3v2FrameIds::lRecordingTime
@ lRecordingTime
Definition
id3v2frameids.h:22
TagParser::Id3v2FrameIds::lOriginalMediaType
@ lOriginalMediaType
Definition
id3v2frameids.h:25
TagParser::Id3v2FrameIds::lAudioFileWebpage
@ lAudioFileWebpage
Definition
id3v2frameids.h:56
TagParser::Id3v2FrameIds::lPerformerWebpage
@ lPerformerWebpage
Definition
id3v2frameids.h:61
TagParser::Id3v2FrameIds::lKey
@ lKey
Definition
id3v2frameids.h:52
TagParser::Id3v2FrameIds::lAudioSourceWebpage
@ lAudioSourceWebpage
Definition
id3v2frameids.h:57
TagParser::Id3v2FrameIds::sRemixedBy
@ sRemixedBy
Definition
id3v2frameids.h:93
TagParser::Id3v2FrameIds::sBpm
@ sBpm
Definition
id3v2frameids.h:78
TagParser::Id3v2FrameIds::sCopyright
@ sCopyright
Definition
id3v2frameids.h:94
TagParser::Id3v2FrameIds::lRecordingDates
@ lRecordingDates
Definition
id3v2frameids.h:19
TagParser::Id3v2FrameIds::sCommericalInfoWebpage
@ sCommericalInfoWebpage
Definition
id3v2frameids.h:98
TagParser::Id3v2FrameIds::sAlbumArtist
@ sAlbumArtist
Definition
id3v2frameids.h:86
TagParser::Id3v2FrameIds::lCopyright
@ lCopyright
Definition
id3v2frameids.h:48
TagParser::Id3v2FrameIds::sOriginalMediaType
@ sOriginalMediaType
Definition
id3v2frameids.h:69
TagParser::Id3v2FrameIds::sRecordingDates
@ sRecordingDates
Definition
id3v2frameids.h:70
TagParser::Id3v2FrameIds::sGenre
@ sGenre
Definition
id3v2frameids.h:74
TagParser::Id3v2FrameIds::lUserDefinedURL
@ lUserDefinedURL
Definition
id3v2frameids.h:62
TagParser::Id3v2FrameIds::lPlayCounter
@ lPlayCounter
Definition
id3v2frameids.h:45
TagParser::Id3v2FrameIds::sDiskPosition
@ sDiskPosition
Definition
id3v2frameids.h:76
TagParser::Id3v2FrameIds::lAlbum
@ lAlbum
Definition
id3v2frameids.h:14
TagParser::Id3v2FrameIds::lComment
@ lComment
Definition
id3v2frameids.h:16
TagParser::Id3v2FrameIds::lCopyrightInfoWebpage
@ lCopyrightInfoWebpage
Definition
id3v2frameids.h:55
TagParser::Id3v2FrameIds::lUnsynchronizedLyrics
@ lUnsynchronizedLyrics
Definition
id3v2frameids.h:38
TagParser::Id3v2FrameIds::sTitle
@ sTitle
Definition
id3v2frameids.h:73
TagParser::Id3v2FrameIds::lDiskPosition
@ lDiskPosition
Definition
id3v2frameids.h:30
TagParser::Id3v2FrameIds::sUnsynchronizedLyrics
@ sUnsynchronizedLyrics
Definition
id3v2frameids.h:84
TagParser::Id3v2FrameIds::lTitle
@ lTitle
Definition
id3v2frameids.h:27
TagParser::Id3v2FrameIds::sLanguage
@ sLanguage
Definition
id3v2frameids.h:82
TagParser::Id3v2FrameIds::lOriginalYear
@ lOriginalYear
Definition
id3v2frameids.h:18
TagParser::Id3v2FrameIds::lRecordLabel
@ lRecordLabel
Definition
id3v2frameids.h:42
TagParser::Id3v2FrameIds::sAudioSourceWebpage
@ sAudioSourceWebpage
Definition
id3v2frameids.h:101
TagParser::Id3v2FrameIds::sAlbum
@ sAlbum
Definition
id3v2frameids.h:64
TagParser::Id3v2FrameIds::lCommericalInfoWebpage
@ lCommericalInfoWebpage
Definition
id3v2frameids.h:54
TagParser::Id3v2FrameIds::sPlayCounter
@ sPlayCounter
Definition
id3v2frameids.h:91
TagParser::Id3v2FrameIds::sDate
@ sDate
Definition
id3v2frameids.h:71
TagParser::Id3v2FrameIds::lGenre
@ lGenre
Definition
id3v2frameids.h:28
TagParser::Id3v2FrameIds::sWriter
@ sWriter
Definition
id3v2frameids.h:80
TagParser::Id3v2FrameIds::sUserDefinedURL
@ sUserDefinedURL
Definition
id3v2frameids.h:104
TagParser::Id3v2FrameIds::sCover
@ sCover
Definition
id3v2frameids.h:79
TagParser::Id3v2FrameIds::sKey
@ sKey
Definition
id3v2frameids.h:96
TagParser::Id3v2FrameIds::sOriginalYear
@ sOriginalYear
Definition
id3v2frameids.h:68
TagParser::Id3v2FrameIds::lBpm
@ lBpm
Definition
id3v2frameids.h:32
TagParser::Id3v2FrameIds::lRemixedBy
@ lRemixedBy
Definition
id3v2frameids.h:47
TagParser::Id3v2FrameIds::lLength
@ lLength
Definition
id3v2frameids.h:35
TagParser::Id3v2FrameIds::sTrackPosition
@ sTrackPosition
Definition
id3v2frameids.h:75
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:115
TagParser
Contains all classes and functions of the TagInfo library.
Definition
aaccodebook.h:10
Generated on Tue Dec 3 2024 17:03:31 for Tag Parser by
1.12.0