Tag Parser  8.2.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
id3v2frameids.cpp
Go to the documentation of this file.
1 #include "./id3v2frameids.h"
2 
3 #include "../exceptions.h"
4 
5 namespace TagParser {
6 
17 namespace Id3v2FrameIds {
18 
23 uint32 convertToShortId(uint32 id)
24 {
25  switch (id) {
26  case lAlbum:
27  return sAlbum;
28  case lArtist:
29  return sArtist;
30  case lComment:
31  return sComment;
32  case lYear:
33  return sYear;
34  case lRecordDate:
35  return sRecordDate;
36  case lTitle:
37  return sTitle;
38  case lGenre:
39  return sGenre;
40  case lTrackPosition:
41  return sTrackPosition;
42  case lDiskPosition:
43  return sDiskPosition;
44  case lEncoder:
45  return sEncoder;
46  case lBpm:
47  return sBpm;
48  case lCover:
49  return sCover;
50  case lWriter:
51  return sWriter;
52  case lLength:
53  return sLength;
54  case lLanguage:
55  return sLanguage;
56  case lEncoderSettings:
57  return sEncoderSettings;
59  return sUnsynchronizedLyrics;
60  case lGrouping:
61  return sGrouping;
64  case lRecordLabel:
65  return sRecordLabel;
66  case lUserDefinedText:
67  return sUserDefinedText;
68  default:
69  return 0;
70  }
71 }
72 
77 uint32 convertToLongId(uint32 id)
78 {
79  switch (id) {
80  case sAlbum:
81  return lAlbum;
82  case sArtist:
83  return lArtist;
84  case sComment:
85  return lComment;
86  case sYear:
87  return lYear;
88  case sRecordDate:
89  return lRecordDate;
90  case sTitle:
91  return lTitle;
92  case sGenre:
93  return lGenre;
94  case sTrackPosition:
95  return lTrackPosition;
96  case sDiskPosition:
97  return lDiskPosition;
98  case sEncoder:
99  return lEncoder;
100  case sBpm:
101  return lBpm;
102  case sCover:
103  return lCover;
104  case sWriter:
105  return lWriter;
106  case sLength:
107  return lLength;
108  case sLanguage:
109  return lLanguage;
110  case sEncoderSettings:
111  return lEncoderSettings;
113  return lUnsynchronizedLyrics;
114  case sGrouping:
115  return lGrouping;
118  case sRecordLabel:
119  return lRecordLabel;
120  case sUserDefinedText:
121  return lUserDefinedText;
122  default:
123  return 0;
124  }
125 }
126 
127 } // namespace Id3v2FrameIds
128 
129 } // namespace TagParser
uint32 convertToLongId(uint32 id)
Converts the specified short frame ID to the equivalent long frame ID.
uint32 convertToShortId(uint32 id)
Converts the specified long frame ID to the equivalent short frame ID.
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:9