eventtimingcodesframe.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2014 by Urs Fleisch
email : ufleisch@users.sourceforge.net
***************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
* 02110-1301 USA *
* *
* Alternatively, this file is available under the Mozilla Public *
* License Version 1.1. You may obtain a copy of the License at *
* http://www.mozilla.org/MPL/ *
***************************************************************************/
#ifndef TAGLIB_EVENTTIMINGCODESFRAME_H
#define TAGLIB_EVENTTIMINGCODESFRAME_H
#include "tlist.h"
#include "id3v2frame.h"
namespace TagLib {
namespace ID3v2 {
class TAGLIB_EXPORT EventTimingCodesFrame : public Frame
{
friend class FrameFactory;
public:
enum TimestampFormat {
Unknown = 0x00,
AbsoluteMpegFrames = 0x01,
AbsoluteMilliseconds = 0x02
};
enum EventType {
Padding = 0x00,
EndOfInitialSilence = 0x01,
IntroStart = 0x02,
MainPartStart = 0x03,
OutroStart = 0x04,
OutroEnd = 0x05,
VerseStart = 0x06,
RefrainStart = 0x07,
InterludeStart = 0x08,
ThemeStart = 0x09,
VariationStart = 0x0a,
KeyChange = 0x0b,
TimeChange = 0x0c,
MomentaryUnwantedNoise = 0x0d,
SustainedNoise = 0x0e,
SustainedNoiseEnd = 0x0f,
IntroEnd = 0x10,
MainPartEnd = 0x11,
VerseEnd = 0x12,
RefrainEnd = 0x13,
ThemeEnd = 0x14,
Profanity = 0x15,
ProfanityEnd = 0x16,
NotPredefinedSynch0 = 0xe0,
NotPredefinedSynch1 = 0xe1,
NotPredefinedSynch2 = 0xe2,
NotPredefinedSynch3 = 0xe3,
NotPredefinedSynch4 = 0xe4,
NotPredefinedSynch5 = 0xe5,
NotPredefinedSynch6 = 0xe6,
NotPredefinedSynch7 = 0xe7,
NotPredefinedSynch8 = 0xe8,
NotPredefinedSynch9 = 0xe9,
NotPredefinedSynchA = 0xea,
NotPredefinedSynchB = 0xeb,
NotPredefinedSynchC = 0xec,
NotPredefinedSynchD = 0xed,
NotPredefinedSynchE = 0xee,
NotPredefinedSynchF = 0xef,
AudioEnd = 0xfd,
AudioFileEnds = 0xfe
};
struct SynchedEvent {
SynchedEvent(unsigned int ms, EventType t) : time(ms), type(t) {}
unsigned int time;
EventType type;
};
using SynchedEventList = TagLib::List<SynchedEvent>;
explicit EventTimingCodesFrame();
explicit EventTimingCodesFrame(const ByteVector &data);
~EventTimingCodesFrame() override;
EventTimingCodesFrame(const EventTimingCodesFrame &) = delete;
EventTimingCodesFrame &operator=(const EventTimingCodesFrame &) = delete;
String toString() const override;
TimestampFormat timestampFormat() const;
SynchedEventList synchedEvents() const;
void setTimestampFormat(TimestampFormat f);
void setSynchedEvents(const SynchedEventList &e);
protected:
// Reimplementations.
void parseFields(const ByteVector &data) override;
ByteVector renderFields() const override;
private:
EventTimingCodesFrame(const ByteVector &data, Header *h);
class EventTimingCodesFramePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<EventTimingCodesFramePrivate> d;
};
} // namespace ID3v2
} // namespace TagLib
#endif
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::ID3v2::EventTimingCodesFrame::EventTimingCodesFrame
EventTimingCodesFrame(const ByteVector &data)
TagLib::ID3v2::EventTimingCodesFrame::operator=
EventTimingCodesFrame & operator=(const EventTimingCodesFrame &)=delete
TagLib::ID3v2::EventTimingCodesFrame::timestampFormat
TimestampFormat timestampFormat() const
TagLib::ID3v2::EventTimingCodesFrame::EventTimingCodesFrame
EventTimingCodesFrame(const EventTimingCodesFrame &)=delete
TagLib::ID3v2::EventTimingCodesFrame::EventTimingCodesFrame
EventTimingCodesFrame()
TagLib::ID3v2::EventTimingCodesFrame::synchedEvents
SynchedEventList synchedEvents() const
TagLib::ID3v2::EventTimingCodesFrame::setTimestampFormat
void setTimestampFormat(TimestampFormat f)
TagLib::ID3v2::EventTimingCodesFrame::setSynchedEvents
void setSynchedEvents(const SynchedEventList &e)
TagLib::ID3v2::EventTimingCodesFrame::FrameFactory
friend class FrameFactory
Definition eventtimingcodesframe.h:42
TagLib::ID3v2::EventTimingCodesFrame::SynchedEventList
TagLib::List< SynchedEvent > SynchedEventList
Definition eventtimingcodesframe.h:119
TagLib::ID3v2::EventTimingCodesFrame::~EventTimingCodesFrame
~EventTimingCodesFrame() override
TagLib::ID3v2::EventTimingCodesFrame::parseFields
void parseFields(const ByteVector &data) override
TagLib::ID3v2::EventTimingCodesFrame::EventType
EventType
Definition eventtimingcodesframe.h:63
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch5
@ NotPredefinedSynch5
Definition eventtimingcodesframe.h:92
TagLib::ID3v2::EventTimingCodesFrame::ThemeEnd
@ ThemeEnd
Definition eventtimingcodesframe.h:84
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch4
@ NotPredefinedSynch4
Definition eventtimingcodesframe.h:91
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch1
@ NotPredefinedSynch1
Definition eventtimingcodesframe.h:88
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch3
@ NotPredefinedSynch3
Definition eventtimingcodesframe.h:90
TagLib::ID3v2::EventTimingCodesFrame::RefrainStart
@ RefrainStart
Definition eventtimingcodesframe.h:71
TagLib::ID3v2::EventTimingCodesFrame::OutroEnd
@ OutroEnd
Definition eventtimingcodesframe.h:69
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch9
@ NotPredefinedSynch9
Definition eventtimingcodesframe.h:96
TagLib::ID3v2::EventTimingCodesFrame::Profanity
@ Profanity
Definition eventtimingcodesframe.h:85
TagLib::ID3v2::EventTimingCodesFrame::ThemeStart
@ ThemeStart
Definition eventtimingcodesframe.h:73
TagLib::ID3v2::EventTimingCodesFrame::MainPartStart
@ MainPartStart
Definition eventtimingcodesframe.h:67
TagLib::ID3v2::EventTimingCodesFrame::RefrainEnd
@ RefrainEnd
Definition eventtimingcodesframe.h:83
TagLib::ID3v2::EventTimingCodesFrame::TimeChange
@ TimeChange
Definition eventtimingcodesframe.h:76
TagLib::ID3v2::EventTimingCodesFrame::IntroStart
@ IntroStart
Definition eventtimingcodesframe.h:66
TagLib::ID3v2::EventTimingCodesFrame::SustainedNoiseEnd
@ SustainedNoiseEnd
Definition eventtimingcodesframe.h:79
TagLib::ID3v2::EventTimingCodesFrame::SustainedNoise
@ SustainedNoise
Definition eventtimingcodesframe.h:78
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch8
@ NotPredefinedSynch8
Definition eventtimingcodesframe.h:95
TagLib::ID3v2::EventTimingCodesFrame::OutroStart
@ OutroStart
Definition eventtimingcodesframe.h:68
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynchB
@ NotPredefinedSynchB
Definition eventtimingcodesframe.h:98
TagLib::ID3v2::EventTimingCodesFrame::IntroEnd
@ IntroEnd
Definition eventtimingcodesframe.h:80
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynchF
@ NotPredefinedSynchF
Definition eventtimingcodesframe.h:102
TagLib::ID3v2::EventTimingCodesFrame::AudioEnd
@ AudioEnd
Definition eventtimingcodesframe.h:103
TagLib::ID3v2::EventTimingCodesFrame::VerseEnd
@ VerseEnd
Definition eventtimingcodesframe.h:82
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynchE
@ NotPredefinedSynchE
Definition eventtimingcodesframe.h:101
TagLib::ID3v2::EventTimingCodesFrame::ProfanityEnd
@ ProfanityEnd
Definition eventtimingcodesframe.h:86
TagLib::ID3v2::EventTimingCodesFrame::Padding
@ Padding
Definition eventtimingcodesframe.h:64
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch2
@ NotPredefinedSynch2
Definition eventtimingcodesframe.h:89
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynchD
@ NotPredefinedSynchD
Definition eventtimingcodesframe.h:100
TagLib::ID3v2::EventTimingCodesFrame::MomentaryUnwantedNoise
@ MomentaryUnwantedNoise
Definition eventtimingcodesframe.h:77
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynchC
@ NotPredefinedSynchC
Definition eventtimingcodesframe.h:99
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch6
@ NotPredefinedSynch6
Definition eventtimingcodesframe.h:93
TagLib::ID3v2::EventTimingCodesFrame::KeyChange
@ KeyChange
Definition eventtimingcodesframe.h:75
TagLib::ID3v2::EventTimingCodesFrame::VariationStart
@ VariationStart
Definition eventtimingcodesframe.h:74
TagLib::ID3v2::EventTimingCodesFrame::EndOfInitialSilence
@ EndOfInitialSilence
Definition eventtimingcodesframe.h:65
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch7
@ NotPredefinedSynch7
Definition eventtimingcodesframe.h:94
TagLib::ID3v2::EventTimingCodesFrame::MainPartEnd
@ MainPartEnd
Definition eventtimingcodesframe.h:81
TagLib::ID3v2::EventTimingCodesFrame::VerseStart
@ VerseStart
Definition eventtimingcodesframe.h:70
TagLib::ID3v2::EventTimingCodesFrame::AudioFileEnds
@ AudioFileEnds
Definition eventtimingcodesframe.h:104
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynchA
@ NotPredefinedSynchA
Definition eventtimingcodesframe.h:97
TagLib::ID3v2::EventTimingCodesFrame::InterludeStart
@ InterludeStart
Definition eventtimingcodesframe.h:72
TagLib::ID3v2::EventTimingCodesFrame::NotPredefinedSynch0
@ NotPredefinedSynch0
Definition eventtimingcodesframe.h:87
TagLib::ID3v2::EventTimingCodesFrame::toString
String toString() const override
TagLib::ID3v2::EventTimingCodesFrame::TimestampFormat
TimestampFormat
Definition eventtimingcodesframe.h:49
TagLib::ID3v2::EventTimingCodesFrame::AbsoluteMpegFrames
@ AbsoluteMpegFrames
Definition eventtimingcodesframe.h:54
TagLib::ID3v2::EventTimingCodesFrame::Unknown
@ Unknown
The timestamp is of unknown format.
Definition eventtimingcodesframe.h:51
TagLib::ID3v2::EventTimingCodesFrame::AbsoluteMilliseconds
@ AbsoluteMilliseconds
Definition eventtimingcodesframe.h:57
TagLib::ID3v2::EventTimingCodesFrame::renderFields
ByteVector renderFields() const override
TagLib::ID3v2::Frame::Header
ID3v2 frame header implementation.
Definition id3v2frame.h:293
TagLib::ID3v2::Frame::Frame
Frame(const Frame &)=delete
TagLib::List
A generic, implicitly shared list.
Definition tlist.h:54
TagLib::String
A wide string class suitable for unicode.
Definition tstring.h:83
id3v2frame.h
TagLib::ID3v2
An ID3v2 implementation.
Definition flacfile.h:39
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
TagLib::ID3v2::EventTimingCodesFrame::SynchedEvent::SynchedEvent
SynchedEvent(unsigned int ms, EventType t)
Definition eventtimingcodesframe.h:111
TagLib::ID3v2::EventTimingCodesFrame::SynchedEvent::time
unsigned int time
Definition eventtimingcodesframe.h:112
TagLib::ID3v2::EventTimingCodesFrame::SynchedEvent::type
EventType type
Definition eventtimingcodesframe.h:113
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition taglib_export.h:40
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55
tlist.h