oggpageheader.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2002 - 2008 by Scott Wheeler
email : wheeler@kde.org
***************************************************************************/
/***************************************************************************
* 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_OGGPAGEHEADER_H
#define TAGLIB_OGGPAGEHEADER_H
#include "tlist.h"
#include "tbytevector.h"
#include "taglib.h"
#include "taglib_export.h"
namespace TagLib {
namespace Ogg {
class File;
class TAGLIB_EXPORT PageHeader
{
public:
PageHeader(File *file = nullptr, offset_t pageOffset = -1);
~PageHeader();
PageHeader(const PageHeader &) = delete;
PageHeader &operator=(const PageHeader &) = delete;
bool isValid() const;
List<int> packetSizes() const;
void setPacketSizes(const List<int> &sizes);
bool firstPacketContinued() const;
void setFirstPacketContinued(bool continued);
bool lastPacketCompleted() const;
void setLastPacketCompleted(bool completed);
bool firstPageOfStream() const;
void setFirstPageOfStream(bool first);
bool lastPageOfStream() const;
void setLastPageOfStream(bool last);
long long absoluteGranularPosition() const;
void setAbsoluteGranularPosition(long long agp);
unsigned int streamSerialNumber() const;
void setStreamSerialNumber(unsigned int n);
int pageSequenceNumber() const;
void setPageSequenceNumber(int sequenceNumber);
int size() const;
int dataSize() const;
ByteVector render() const;
private:
void read(Ogg::File *file, offset_t pageOffset);
ByteVector lacingValues() const;
class PageHeaderPrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<PageHeaderPrivate> d;
};
} // namespace Ogg
} // namespace TagLib
#endif
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::List
A generic, implicitly shared list.
Definition tlist.h:54
TagLib::Ogg::File
An implementation of TagLib::File with some helpers for Ogg based formats.
Definition oggfile.h:51
TagLib::Ogg::PageHeader::setStreamSerialNumber
void setStreamSerialNumber(unsigned int n)
TagLib::Ogg::PageHeader::dataSize
int dataSize() const
TagLib::Ogg::PageHeader::pageSequenceNumber
int pageSequenceNumber() const
TagLib::Ogg::PageHeader::render
ByteVector render() const
TagLib::Ogg::PageHeader::PageHeader
PageHeader(const PageHeader &)=delete
TagLib::Ogg::PageHeader::setFirstPacketContinued
void setFirstPacketContinued(bool continued)
TagLib::Ogg::PageHeader::isValid
bool isValid() const
TagLib::Ogg::PageHeader::firstPacketContinued
bool firstPacketContinued() const
TagLib::Ogg::PageHeader::setLastPageOfStream
void setLastPageOfStream(bool last)
TagLib::Ogg::PageHeader::setFirstPageOfStream
void setFirstPageOfStream(bool first)
TagLib::Ogg::PageHeader::lastPacketCompleted
bool lastPacketCompleted() const
TagLib::Ogg::PageHeader::setPageSequenceNumber
void setPageSequenceNumber(int sequenceNumber)
TagLib::Ogg::PageHeader::PageHeader
PageHeader(File *file=nullptr, offset_t pageOffset=-1)
TagLib::Ogg::PageHeader::setLastPacketCompleted
void setLastPacketCompleted(bool completed)
TagLib::Ogg::PageHeader::streamSerialNumber
unsigned int streamSerialNumber() const
TagLib::Ogg::PageHeader::size
int size() const
TagLib::Ogg::PageHeader::~PageHeader
~PageHeader()
TagLib::Ogg::PageHeader::absoluteGranularPosition
long long absoluteGranularPosition() const
TagLib::Ogg::PageHeader::lastPageOfStream
bool lastPageOfStream() const
TagLib::Ogg::PageHeader::setAbsoluteGranularPosition
void setAbsoluteGranularPosition(long long agp)
TagLib::Ogg::PageHeader::operator=
PageHeader & operator=(const PageHeader &)=delete
TagLib::Ogg::PageHeader::firstPageOfStream
bool firstPageOfStream() const
TagLib::Ogg::PageHeader::packetSizes
List< int > packetSizes() const
TagLib::Ogg::PageHeader::setPacketSizes
void setPacketSizes(const List< int > &sizes)
TagLib::Ogg
A namespace for the classes used by Ogg-based metadata files.
Definition flacfile.h:41
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
TagLib::offset_t
off_t offset_t
Definition taglib.h:64
taglib.h
taglib_export.h
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
tbytevector.h
tlist.h