#include <asfvideo.hpp>
Public Member Functions | |
Creators | |
| AsfVideo (BasicIo::AutoPtr io) | |
| Constructor for a ASF video. Since the constructor can not return a result, callers should check the good() method after object construction to determine success or failure. | |
Manipulators | |
| void | readMetadata () |
| Read all metadata supported by a specific image format from the image. Before this method is called, the image metadata will be cleared. | |
| void | writeMetadata () |
| Write metadata back to the image. | |
Accessors | |
| std::string | mimeType () const |
| Return the MIME type of the image. | |
Protected Member Functions | |
| void | decodeBlock () |
| Check for a valid tag and decode the block at the current IO position. Calls tagDecoder() or skips to next tag, if required. | |
| void | tagDecoder (const TagVocabulary *tv, uint64_t size) |
| Interpret tag information, and call the respective function to save it in the respective XMP container. Decodes a Tag Information and saves it in the respective XMP container, if the block size is small. | |
| void | fileProperties () |
| Interpret File_Properties tag information, and save it in the respective XMP container. | |
| void | streamProperties () |
| Interpret Stream_Properties tag information, and save it in the respective XMP container. | |
| void | codecList () |
| Interpret Codec_List tag information, and save 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 | extendedStreamProperties (uint64_t size) |
| Interpret Extended_Stream_Properties tag information, and save it in the respective XMP container. | |
| void | headerExtension (uint64_t size) |
| Interpret Header_Extension tag information, and save it in the respective XMP container. | |
| void | metadataHandler (int meta=1) |
| Interpret Metadata, Extended_Content_Description, Metadata_Library tag information, and save it in the respective XMP container. | |
| void | aspectRatio () |
| Calculates Aspect Ratio of a video, and stores it in the respective XMP container. | |
| Exiv2::AsfVideo::AsfVideo | ( | BasicIo::AutoPtr | io | ) |
Constructor for a ASF video. Since the constructor can not return a result, callers should check the good() method after object construction to determine success or failure.
| io | An auto-pointer that owns a BasicIo instance used for reading and writing image metadata. Important: The constructor takes ownership of the passed in BasicIo instance through the auto-pointer. Callers should not continue to use the BasicIo instance after it is passed to this method. Use the Image::io() method to get a temporary reference. |
Referenced by Exiv2::newAsfInstance().
| void Exiv2::AsfVideo::readMetadata | ( | ) | [virtual] |
Read all metadata supported by a specific image format from the image. Before this method is called, the image metadata will be cleared.
This method returns success even if no metadata is found in the image. Callers must therefore check the size of individual metadata types before accessing the data.
| Error | if opening or reading of the file fails or the image data is not valid (does not look like data of the specific image type). |
Implements Exiv2::Image.
References aspectRatio(), Exiv2::Image::clearMetadata(), decodeBlock(), Exiv2::Image::io_, Exiv2::isAsfType(), mimeType(), Exiv2::strError(), and Exiv2::Image::xmpData_.
| void Exiv2::AsfVideo::writeMetadata | ( | ) | [virtual] |
Write metadata back to the image.
All existing metadata sections in the image are either created, replaced, or erased. If values for a given metadata type have been assigned, a section for that metadata type will either be created or replaced. If no values have been assigned to a given metadata type, any exists section for that metadata type will be removed from the image.
| Error | if the operation fails |
Implements Exiv2::Image.
| std::string Exiv2::AsfVideo::mimeType | ( | ) | const [virtual] |
Return the MIME type of the image.
Implements Exiv2::Image.
Referenced by readMetadata().
| void Exiv2::AsfVideo::tagDecoder | ( | const TagVocabulary * | tv, | |
| uint64_t | size | |||
| ) | [protected] |
Interpret tag information, and call the respective function to save it in the respective XMP container. Decodes a Tag Information and saves it in the respective XMP container, if the block size is small.
| tv | Pointer to current tag, | |
| size | Size of the data block used to store Tag Information. |
References Exiv2::XmpData::add(), codecList(), contentDescription(), Exiv2::Value::create(), decodeBlock(), extendedStreamProperties(), Exiv2::exvGettext(), fileProperties(), Exiv2::getUShort(), headerExtension(), Exiv2::Image::io_, Exiv2::Internal::TagVocabulary::label_, metadataHandler(), Exiv2::DataBuf::pData_, Exiv2::DataBuf::size_, streamProperties(), Exiv2::Image::xmpData_, and Exiv2::xmpSeq.
Referenced by decodeBlock().
| void Exiv2::AsfVideo::contentDescription | ( | uint64_t | size | ) | [protected] |
Interpret Content_Description tag information, and save it in the respective XMP container.
| size | Size of the data block used to store Tag Data. |
References Exiv2::convertStringCharset(), Exiv2::find(), Exiv2::getUShort(), Exiv2::Image::io_, Exiv2::Internal::TagDetails::label_, Exiv2::DataBuf::pData_, Exiv2::DataBuf::size_, Exiv2::string, and Exiv2::Image::xmpData_.
Referenced by tagDecoder().
| void Exiv2::AsfVideo::extendedStreamProperties | ( | uint64_t | size | ) | [protected] |
Interpret Extended_Stream_Properties tag information, and save it in the respective XMP container.
| size | Size of the data block used to store Tag Data. |
References Exiv2::getUShort(), Exiv2::Image::io_, Exiv2::DataBuf::pData_, Exiv2::DataBuf::size_, and Exiv2::Image::xmpData_.
Referenced by tagDecoder().
| void Exiv2::AsfVideo::headerExtension | ( | uint64_t | size | ) | [protected] |
Interpret Header_Extension tag information, and save it in the respective XMP container.
| size | Size of the data block used to store Tag Data. |
References decodeBlock(), Exiv2::Image::io_, and Exiv2::DataBuf::pData_.
Referenced by tagDecoder().
| void Exiv2::AsfVideo::metadataHandler | ( | int | meta = 1 |
) | [protected] |
Interpret Metadata, Extended_Content_Description, Metadata_Library tag information, and save it in the respective XMP container.
| meta | A default integer which helps to overload the function for various Tags that have a similar method of decoding. |
References Exiv2::XmpData::add(), Exiv2::Value::create(), EXV_ERROR, Exiv2::getULong(), Exiv2::getUShort(), Exiv2::Image::io_, Exiv2::DataBuf::pData_, Exiv2::DataBuf::size_, Exiv2::toString(), Exiv2::Image::xmpData_, and Exiv2::xmpSeq.
Referenced by tagDecoder().
1.5.6