quicktimevideo.hpp
// ***************************************************************** -*- C++ -*-
/*
* Copyright (C) 2004-2021 Exiv2 authors
* This program is part of the Exiv2 distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
#ifndef QUICKTIMEVIDEO_HPP
#define QUICKTIMEVIDEO_HPP
// *****************************************************************************
#include "exiv2lib_export.h"
// included header files
#include "exif.hpp"
#include "image.hpp"
// *****************************************************************************
// namespace extensions
namespace Exiv2 {
// *****************************************************************************
// class definitions
// Add qtime to the supported image formats
namespace ImageType {
const int qtime = 22;
}
class EXIV2LIB_DEPRECATED_EXPORT QuickTimeVideo:public Image
{
public:
QuickTimeVideo(BasicIo::AutoPtr io);
void readMetadata();
void writeMetadata();
std::string mimeType() const;
protected:
void decodeBlock();
void tagDecoder(Exiv2::DataBuf & buf, unsigned long size);
private:
void fileTypeDecoder(unsigned long size);
void mediaHeaderDecoder(unsigned long size);
void videoHeaderDecoder(unsigned long size);
void movieHeaderDecoder(unsigned long size);
void trackHeaderDecoder(unsigned long size);
void handlerDecoder(unsigned long size);
void multipleEntriesDecoder();
void sampleDesc(unsigned long size);
void imageDescDecoder();
void userDataDecoder(unsigned long size);
void previewTagDecoder(unsigned long size);
void keysTagDecoder(unsigned long size);
void trackApertureTagDecoder(unsigned long size);
void NikonTagsDecoder(unsigned long size);
void CameraTagsDecoder(unsigned long size);
void audioDescDecoder();
void timeToSampleDecoder();
void setMediaStream();
void discard(unsigned long size);
void aspectRatio();
private:
QuickTimeVideo(const QuickTimeVideo& rhs);
QuickTimeVideo& operator=(const QuickTimeVideo& rhs);
private:
uint64_t timeScale_;
int currentStream_;
bool continueTraversing_;
uint64_t height_, width_;
}; //QuickTimeVideo End
// *****************************************************************************
// template, inline and free functions
// These could be static private functions on Image subclasses but then
// ImageFactory needs to be made a friend.
EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newQTimeInstance(BasicIo::AutoPtr io, bool create);
EXIV2LIB_DEPRECATED_EXPORT bool isQTimeType(BasicIo& iIo, bool advance);
} // namespace Exiv2
#endif // QUICKTIMEVIDEO_HPP
Exiv2::BasicIo
An interface for simple binary IO.
Definition: basicio.hpp:55
Exiv2::BasicIo::AutoPtr
std::auto_ptr< BasicIo > AutoPtr
BasicIo auto_ptr type.
Definition: basicio.hpp:58
Exiv2::DataBuf
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:193
Exiv2::Image
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition: image.hpp:78
Exiv2::Image::AutoPtr
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition: image.hpp:81
Exiv2::QuickTimeVideo
Class to access QuickTime video files.
Definition: quicktimevideo.hpp:46
Exiv2::QuickTimeVideo::tagDecoder
void tagDecoder(Exiv2::DataBuf &buf, unsigned long size)
Interpret tag information, and call the respective function to save it in the respective XMP containe...
Exiv2::QuickTimeVideo::mimeType
std::string mimeType() const
Return the MIME type of the image.
Exiv2::QuickTimeVideo::writeMetadata
void writeMetadata()
Write metadata back to the image.
Exiv2::QuickTimeVideo::QuickTimeVideo
QuickTimeVideo(BasicIo::AutoPtr io)
Constructor for a QuickTime video. Since the constructor can not return a result, callers should chec...
Exiv2::QuickTimeVideo::readMetadata
void readMetadata()
Read all metadata supported by a specific image format from the image. Before this method is called,...
Exiv2::QuickTimeVideo::decodeBlock
void decodeBlock()
Check for a valid tag and decode the block at the current IO position. Calls tagDecoder() or skips to...
exif.hpp
Encoding and decoding of Exif data.
Exiv2::ImageType::qtime
const int qtime
Treating qtime as an image type>
Definition: quicktimevideo.hpp:39
Exiv2
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
Exiv2::newQTimeInstance
EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newQTimeInstance(BasicIo::AutoPtr io, bool create)
Create a new QuicktimeVideo instance and return an auto-pointer to it. Caller owns the returned objec...
Exiv2::isQTimeType
EXIV2LIB_DEPRECATED_EXPORT bool isQTimeType(BasicIo &iIo, bool advance)
Check if the file iIo is a Quick Time Video.