1 /*******************************************************************************
2 nmhd.c
3
4 libquicktime - A library for reading and writing quicktime/avi/mp4 files.
5 http://libquicktime.sourceforge.net
6
7 Copyright (C) 2002 Heroine Virtual Ltd.
8 Copyright (C) 2002-2011 Members of the libquicktime project.
9
10 This library is free software; you can redistribute it and/or modify it under
11 the terms of the GNU Lesser General Public License as published by the Free
12 Software Foundation; either version 2.1 of the License, or (at your option)
13 any later version.
14
15 This library is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
18 details.
19
20 You should have received a copy of the GNU Lesser General Public License along
21 with this library; if not, write to the Free Software Foundation, Inc., 51
22 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 *******************************************************************************/
24
25 #include "lqt_private.h"
26
quicktime_nmhd_init(quicktime_nmhd_t * nmhd)27 int quicktime_nmhd_init(quicktime_nmhd_t *nmhd)
28 {
29 return 0;
30 }
31
quicktime_nmhd_delete(quicktime_nmhd_t * nmhd)32 int quicktime_nmhd_delete(quicktime_nmhd_t *nmhd)
33 {
34 return 0;
35 }
36
quicktime_nmhd_dump(quicktime_nmhd_t * nmhd)37 void quicktime_nmhd_dump(quicktime_nmhd_t *nmhd)
38 {
39 lqt_dump(" null media header (nmhd)\n");
40 lqt_dump(" version %d\n", nmhd->version);
41 lqt_dump(" flags %ld\n", nmhd->flags);
42 }
43
quicktime_read_nmhd(quicktime_t * file,quicktime_nmhd_t * nmhd)44 int quicktime_read_nmhd(quicktime_t *file, quicktime_nmhd_t *nmhd)
45 {
46 nmhd->version = quicktime_read_char(file);
47 nmhd->flags = quicktime_read_int24(file);
48 return 0;
49 }
50
quicktime_write_nmhd(quicktime_t * file,quicktime_nmhd_t * nmhd)51 void quicktime_write_nmhd(quicktime_t *file, quicktime_nmhd_t *nmhd)
52 {
53 quicktime_atom_t atom;
54 quicktime_atom_write_header(file, &atom, "nmhd");
55 quicktime_write_char(file, nmhd->version);
56 quicktime_write_int24(file, nmhd->flags);
57 quicktime_atom_write_footer(file, &atom);
58 }
59