|
| 1 | +/******************************************************************************* |
| 2 | + * The MIT License (MIT) |
| 3 | + * |
| 4 | + * Copyright (c) 2017 DigiDNA - www.digidna.net |
| 5 | + * |
| 6 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | + * of this software and associated documentation files (the "Software"), to deal |
| 8 | + * in the Software without restriction, including without limitation the rights |
| 9 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | + * copies of the Software, and to permit persons to whom the Software is |
| 11 | + * furnished to do so, subject to the following conditions: |
| 12 | + * |
| 13 | + * The above copyright notice and this permission notice shall be included in |
| 14 | + * all copies or substantial portions of the Software. |
| 15 | + * |
| 16 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | + * THE SOFTWARE. |
| 23 | + ******************************************************************************/ |
| 24 | + |
| 25 | +/*! |
| 26 | + * @header MDHD.hpp |
| 27 | + * @copyright (c) 2017, DigiDNA - www.digidna.net |
| 28 | + * @author Jean-David Gadina - www.digidna.net |
| 29 | + */ |
| 30 | + |
| 31 | +#ifndef ISOBMFF_MDHD_HPP |
| 32 | +#define ISOBMFF_MDHD_HPP |
| 33 | + |
| 34 | +#include <memory> |
| 35 | +#include <algorithm> |
| 36 | +#include <ISOBMFF/Macros.hpp> |
| 37 | +#include <ISOBMFF/FullBox.hpp> |
| 38 | +#include <ISOBMFF/DisplayableObjectContainer.hpp> |
| 39 | +#include <cstdint> |
| 40 | +#include <vector> |
| 41 | + |
| 42 | +namespace ISOBMFF |
| 43 | +{ |
| 44 | + class ISOBMFF_EXPORT MDHD: public FullBox, public DisplayableObjectContainer |
| 45 | + { |
| 46 | + public: |
| 47 | + |
| 48 | + MDHD(); |
| 49 | + MDHD( const MDHD & o ); |
| 50 | + MDHD( MDHD && o ) noexcept; |
| 51 | + virtual ~MDHD() override; |
| 52 | + |
| 53 | + MDHD & operator =( MDHD o ); |
| 54 | + |
| 55 | + void ReadData( Parser & parser, BinaryStream & stream ) override; |
| 56 | + void WriteDescription( std::ostream & os, std::size_t indentLevel ) const override; |
| 57 | + |
| 58 | + virtual std::vector< std::shared_ptr< DisplayableObject > > GetDisplayableObjects() const override; |
| 59 | + virtual std::vector< std::pair< std::string, std::string > > GetDisplayableProperties() const override; |
| 60 | + |
| 61 | + uint64_t GetCreationTime() const; |
| 62 | + uint64_t GetModificationTime() const; |
| 63 | + uint32_t GetTimescale() const; |
| 64 | + uint64_t GetDuration() const; |
| 65 | + uint8_t GetPad() const; |
| 66 | + uint8_t GetLanguage0() const; |
| 67 | + uint8_t GetLanguage1() const; |
| 68 | + uint8_t GetLanguage2() const; |
| 69 | + uint16_t GetPredefined() const; |
| 70 | + |
| 71 | + void SetCreationTime( uint64_t value ); |
| 72 | + void SetModificationTime( uint64_t value ); |
| 73 | + void SetTimescale( uint32_t value ); |
| 74 | + void SetDuration( uint64_t value ); |
| 75 | + void SetPad( uint8_t value ); |
| 76 | + void SetLanguage0( uint8_t value ); |
| 77 | + void SetLanguage1( uint8_t value ); |
| 78 | + void SetLanguage2( uint8_t value ); |
| 79 | + void SetPredefined( uint16_t value ); |
| 80 | + |
| 81 | + ISOBMFF_EXPORT friend void swap( MDHD & o1, MDHD & o2 ); |
| 82 | + |
| 83 | + private: |
| 84 | + |
| 85 | + class IMPL; |
| 86 | + |
| 87 | + std::unique_ptr< IMPL > impl; |
| 88 | + }; |
| 89 | +} |
| 90 | + |
| 91 | +#endif /* ISOBMFF_MDHD_HPP */ |
0 commit comments