src/qtff/PictureAspectRatioBox.h Source File
PictureAspectRatioBox.h
1
2//
3// The contents of this file are subject to the Mozilla Public License
4// Version 1.1 (the "License"); you may not use this file except in
5// compliance with the License. You may obtain a copy of the License at
6// http://www.mozilla.org/MPL/
7//
8// Software distributed under the License is distributed on an "AS IS"
9// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
10// License for the specific language governing rights and limitations
11// under the License.
12//
13// The Original Code is MP4v2.
14//
15// The Initial Developer of the Original Code is Kona Blend.
16// Portions created by Kona Blend are Copyright (C) 2008.
17// All Rights Reserved.
18//
19// Contributors:
20// Kona Blend, kona8lend@@gmail.com
21//
23
24#ifndef MP4V2_IMPL_QTFF_PICTUREAPSECTRATIOBOX_H
25#define MP4V2_IMPL_QTFF_PICTUREAPSECTRATIOBOX_H
26
27namespace mp4v2 { namespace impl { namespace qtff {
28 using namespace std;
29
31
42class MP4V2_EXPORT PictureAspectRatioBox
43{
44public:
47 class MP4V2_EXPORT Item
48 {
49 public:
50 Item ();
51
53 void reset();
54
55 // convert from string CSV format.
56 void convertFromCSV( const string& csv );
57
58 // convert to string CSV format.
59 string convertToCSV() const;
60
61 // convert to string CSV format with buffer.
62 string& convertToCSV( string& buffer ) const;
63
64 public:
66 uint32_t hSpacing;
67
69 uint32_t vSpacing;
70 };
71
72 class MP4V2_EXPORT IndexedItem {
73 public:
75
76 uint16_t trackIndex;
77 uint16_t trackId;
78 Item item;
79 };
80
81 typedef vector<IndexedItem> ItemList;
82
83 static bool list( MP4FileHandle file, ItemList& itemList );
84
97 static bool add( MP4FileHandle file, uint16_t trackIndex, const Item& item );
98
111 static bool add( MP4FileHandle file, MP4TrackId trackId, const Item& item );
112
124 static bool set( MP4FileHandle file, uint16_t trackIndex, const Item& item );
125
137 static bool set( MP4FileHandle file, MP4TrackId trackId, const Item& item );
138
150 static bool get( MP4FileHandle file, uint16_t trackIndex, Item& item );
151
163 static bool get( MP4FileHandle file, MP4TrackId trackId, Item& item );
164
172 static bool remove( MP4FileHandle file, uint16_t trackIndex );
173
181 static bool remove( MP4FileHandle file, MP4TrackId trackId );
182};
183
185
186}}} // namespace mp4v2::impl::qtff
187
188#endif // MP4V2_IMPL_QTTF_PICTUREAPSECTRATIOBOX_H
Definition PictureAspectRatioBox.h:72
Data object for pasp-box item.
Definition PictureAspectRatioBox.h:48
void reset()
reset to state of newly constructed object.
uint32_t vSpacing
an unsigned 32-bit integer specifying the horizontal spacing of pixels.
Definition PictureAspectRatioBox.h:69
uint32_t hSpacing
an unsigned 32-bit integer specifying the vertical spacing of pixels.
Definition PictureAspectRatioBox.h:66
Functional class for pasp-box (Picture Aspect Ratio Box) support.
Definition PictureAspectRatioBox.h:43
static bool remove(MP4FileHandle file, uint16_t trackIndex)
Remove pasp-box (Color Parameter Box) by track-index.
static bool add(MP4FileHandle file, MP4TrackId trackId, const Item &item)
Add pasp-box by track-id.
static bool get(MP4FileHandle file, MP4TrackId trackId, Item &item)
Fetch pasp-box (Color Parameter Box) properties by track-id.
static bool get(MP4FileHandle file, uint16_t trackIndex, Item &item)
Fetch pasp-box (Color Parameter Box) properties by track-index.
static bool add(MP4FileHandle file, uint16_t trackIndex, const Item &item)
Add pasp-box by track-index.
static bool set(MP4FileHandle file, uint16_t trackIndex, const Item &item)
Store pasp-box (Color Parameter Box) properties by track-index.
static bool set(MP4FileHandle file, MP4TrackId trackId, const Item &item)
Store pasp-box (Color Parameter Box) properties by track-id.
static bool remove(MP4FileHandle file, MP4TrackId trackId)
Remove pasp-box (Color Parameter Box) by track-id.