Exiv2
asfvideo.hpp
Go to the documentation of this file.
1// ***************************************************************** -*- C++ -*-
2/*
3 * Copyright (C) 2004-2021 Exiv2 authors
4 * This program is part of the Exiv2 distribution.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
19 */
27#ifndef ASFVIDEO_HPP
28#define ASFVIDEO_HPP
29
30// *****************************************************************************
31#include "exiv2lib_export.h"
32
33// included header files
34#include "image.hpp"
35
36namespace Exiv2 {
37
38// *****************************************************************************
39// class definitions
40
41 // Add ASF to the supported image formats
42 namespace ImageType {
43 const int asf = 24;
44 }
45
49 class EXIV2LIB_DEPRECATED_EXPORT AsfVideo:public Image
50 {
51 public:
53
54
67
69
73
75
76 std::string mimeType() const;
78
79 protected:
93 void tagDecoder(const Internal::TagVocabulary* tv, uint64_t size);
108 void codecList();
114 void contentDescription(uint64_t size);
120 void extendedStreamProperties(uint64_t size);
126 void headerExtension(uint64_t size);
134 void metadataHandler(int meta = 1);
140
141 private:
143
144
145 AsfVideo(const AsfVideo& rhs);
147 AsfVideo& operator=(const AsfVideo& rhs);
149
150 private:
152 bool continueTraversing_;
154 uint64_t localPosition_;
156 int streamNumber_;
158 uint64_t height_, width_;
159
160 }; //Class AsfVideo
161
162// *****************************************************************************
163// template, inline and free functions
164
165 // These could be static private functions on Image subclasses but then
166 // ImageFactory needs to be made a friend.
172 EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newAsfInstance(BasicIo::AutoPtr io, bool create);
173
175 EXIV2LIB_DEPRECATED_EXPORT bool isAsfType(BasicIo& iIo, bool advance);
176
177} // namespace Exiv2
178
179#endif // #ifndef ASFVIDEO_HPP_
Class to access ASF video files.
Definition: asfvideo.hpp:50
void metadataHandler(int meta=1)
Interpret Metadata, Extended_Content_Description, Metadata_Library tag information,...
std::string mimeType() const
Return the MIME type of the image.
void headerExtension(uint64_t size)
Interpret Header_Extension tag information, and save it in the respective XMP container.
void extendedStreamProperties(uint64_t size)
Interpret Extended_Stream_Properties tag information, and save it in the respective XMP container.
void tagDecoder(const Internal::TagVocabulary *tv, uint64_t size)
Interpret tag information, and call the respective function to save it in the respective XMP containe...
void readMetadata()
Read all metadata supported by a specific image format from the image. Before this method is called,...
void aspectRatio()
Calculates Aspect Ratio of a video, and stores it in the respective XMP container.
void contentDescription(uint64_t size)
Interpret Content_Description tag information, and save it in the respective XMP container.
void decodeBlock()
Check for a valid tag and decode the block at the current IO position. Calls tagDecoder() or skips to...
void codecList()
Interpret Codec_List tag information, and save it in the respective XMP container.
void writeMetadata()
Write metadata back to the image.
void streamProperties()
Interpret Stream_Properties tag information, and save it in the respective XMP container.
AsfVideo(BasicIo::AutoPtr io)
Constructor for a ASF video. Since the constructor can not return a result, callers should check the ...
void fileProperties()
Interpret File_Properties tag information, and save it in the respective XMP container.
An interface for simple binary IO.
Definition: basicio.hpp:55
std::auto_ptr< BasicIo > AutoPtr
BasicIo auto_ptr type.
Definition: basicio.hpp:58
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition: image.hpp:78
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition: image.hpp:81
const int asf
Treating asf as an image type>
Definition: asfvideo.hpp:43
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
EXIV2LIB_DEPRECATED_EXPORT bool isAsfType(BasicIo &iIo, bool advance)
Check if the file iIo is a Windows Asf Video.
EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newAsfInstance(BasicIo::AutoPtr io, bool create)
Create a new AsfVideo instance and return an auto-pointer to it. Caller owns the returned object and ...
Helper structure for lookup tables for translations of controlled vocabulary strings to their descrip...
Definition: tags_int.hpp:246