1 /*******************************************************************************
2 vrni.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_vrni_init(quicktime_vrni_t * vrnp)27 int quicktime_vrni_init(quicktime_vrni_t *vrnp)
28 {
29 vrnp->ID = 1;
30 quicktime_nloc_init(&vrnp->nloc);
31 return 0;
32 }
33
quicktime_vrni_delete(quicktime_vrni_t * vrni)34 int quicktime_vrni_delete(quicktime_vrni_t *vrni)
35 {
36 return 0;
37 }
38
quicktime_vrni_dump(quicktime_vrni_t * vrni)39 void quicktime_vrni_dump(quicktime_vrni_t *vrni)
40 {
41 lqt_dump(" node id (vrni)\n");
42 lqt_dump(" id %i\n", vrni->ID);
43 quicktime_nloc_dump(&vrni->nloc);
44 }
45
quicktime_read_vrni(quicktime_t * file,quicktime_vrni_t * vrni,quicktime_qtatom_t * vrni_atom)46 int quicktime_read_vrni(quicktime_t *file, quicktime_vrni_t *vrni, quicktime_qtatom_t *vrni_atom)
47 {
48 quicktime_qtatom_t leaf_atom;
49 int result = 0;
50
51 quicktime_qtatom_read_header(file, &leaf_atom);
52
53 quicktime_read_nloc(file, &vrni->nloc, &leaf_atom);
54
55 return result;
56 }
57
quicktime_write_vrni(quicktime_t * file,quicktime_vrni_t * vrni)58 void quicktime_write_vrni(quicktime_t *file, quicktime_vrni_t *vrni )
59 {
60 quicktime_qtatom_t atom;
61 quicktime_qtatom_write_header(file, &atom, "vrni", 1);
62 quicktime_write_nloc(file, &vrni->nloc);
63 atom.child_count = 1;
64 quicktime_qtatom_write_footer(file, &atom);
65
66 }
67
68