Uniform spelling of Matroska IDs

This commit is contained in:
Martchus 2017-08-17 23:20:38 +02:00
parent 0f12cf346c
commit 1814cd9bfc
3 changed files with 19 additions and 19 deletions

View File

@ -63,10 +63,10 @@ const char *matroskaIdName(uint32 matroskaId)
case DateUTC: return "date UTC";
case SegmentUID: return "unique segment ID";
case SegmentFileName: return "segment file name";
case PrevUId: return "previous unique id";
case PrevUID: return "previous unique id";
case PrevFileName: return "previous file name";
case NexUId: return "next unique ID";
case NexFileName: return "next file name";
case NexUID: return "next unique ID";
case NextFileName: return "next file name";
case Title: return "title";
case SegmentFamily: return "segment family";
case ChapterTranslate: return "chapter translate";
@ -184,10 +184,10 @@ const char *matroskaIdName(uint32 matroskaId)
// IDs in the Targets master
case TargetTypeValue: return "target type value";
case TargetType: return "target type";
case TagTrackUId: return "tag track UID";
case TagEditionUId: return "tag edition UID";
case TagChapterUId: return "tag chapter UID";
case TagAttachmentUId: return "tag attachment UID";
case TagTrackUID: return "tag track UID";
case TagEditionUID: return "tag edition UID";
case TagChapterUID: return "tag chapter UID";
case TagAttachmentUID: return "tag attachment UID";
// IDs in the Cues master
case CuePoint: return "cue point";

View File

@ -50,10 +50,10 @@ enum SegmentInfoIds {
DateUTC = 0x4461,
SegmentUID = 0x73A4,
SegmentFileName = 0x7384,
PrevUId = 0x3CB923,
PrevUID = 0x3CB923,
PrevFileName = 0x3C83AB,
NexUId = 0x3EB923,
NexFileName = 0x3E83BB,
NexUID = 0x3EB923,
NextFileName = 0x3E83BB,
Title = 0x7BA9,
SegmentFamily = 0x4444,
ChapterTranslate = 0x6924
@ -261,10 +261,10 @@ enum SimpleTagIds {
enum TargetsIds {
TargetTypeValue = 0x68ca,
TargetType = 0x63ca,
TagTrackUId = 0x63c5,
TagEditionUId = 0x63c9,
TagChapterUId = 0x63c4,
TagAttachmentUId = 0x63c6
TagTrackUID = 0x63c5,
TagEditionUID = 0x63c9,
TagChapterUID = 0x63c4,
TagAttachmentUID = 0x63c6
};
/*!

View File

@ -178,16 +178,16 @@ void MatroskaTag::parseTargets(EbmlElement &targetsElement)
addNotification(NotificationType::Warning, "Targets element contains multiple TargetType elements. Surplus elements will be ignored.", context);
}
break;
case MatroskaIds::TagTrackUId:
case MatroskaIds::TagTrackUID:
m_target.tracks().emplace_back(child->readUInteger());
break;
case MatroskaIds::TagEditionUId:
case MatroskaIds::TagEditionUID:
m_target.editions().emplace_back(child->readUInteger());
break;
case MatroskaIds::TagChapterUId:
case MatroskaIds::TagChapterUID:
m_target.chapters().emplace_back(child->readUInteger());
break;
case MatroskaIds::TagAttachmentUId:
case MatroskaIds::TagAttachmentUID:
m_target.attachments().emplace_back(child->readUInteger());
break;
default:
@ -285,7 +285,7 @@ void MatroskaTagMaker::make(ostream &stream) const
}
// write UIDs
typedef pair<uint16, vector<uint64> > p;
for(const auto &pair : initializer_list<p>{p(MatroskaIds::TagTrackUId, t.tracks()), p(MatroskaIds::TagEditionUId, t.editions()), p(MatroskaIds::TagChapterUId, t.chapters()), p(MatroskaIds::TagAttachmentUId, t.attachments())}) {
for(const auto &pair : initializer_list<p>{p(MatroskaIds::TagTrackUID, t.tracks()), p(MatroskaIds::TagEditionUID, t.editions()), p(MatroskaIds::TagChapterUID, t.chapters()), p(MatroskaIds::TagAttachmentUID, t.attachments())}) {
if(!pair.second.empty()) {
BE::getBytes(pair.first, buff);
for(auto uid : pair.second) {