Exiv2
asfvideo.hpp
Go to the documentation of this file.
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2018 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 
36 namespace 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 
70  void readMetadata();
71  void writeMetadata();
73 
75 
76  std::string mimeType() const;
78 
79  protected:
84  void decodeBlock();
93  void tagDecoder(const Internal::TagVocabulary* tv, uint64_t size);
98  void fileProperties();
103  void streamProperties();
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);
139  void aspectRatio();
140 
141  private:
143 
144  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_
An interface for simple binary IO.
Definition: basicio.hpp:55
const int asf
Treating asf as an image type>
Definition: asfvideo.hpp:43
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition: image.hpp:84
EXIV2LIB_DEPRECATED_EXPORT bool isAsfType(BasicIo &iIo, bool advance)
Check if the file iIo is a Windows Asf Video.
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition: image.hpp:81
std::auto_ptr< BasicIo > AutoPtr
BasicIo auto_ptr type.
Definition: basicio.hpp:58
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 ...
IPTC string type.
Definition: types.hpp:147
Class to access ASF video files.
Definition: asfvideo.hpp:49
Helper structure for lookup tables for translations of controlled vocabulary strings to their descrip...
Definition: tags_int.hpp:209
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36