1 /******************************************************************************* 2 lqt_qtvr.h 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 #ifndef _LQT_QTVR_H_ 26 #define _LQT_QTVR_H_ 27 28 #ifdef __cplusplus 29 extern "C" { 30 #endif /* __cplusplus */ 31 32 #pragma GCC visibility push(default) 33 34 /* QTVR stuff */ 35 #define QTVR_PANO_HORZ 1 36 #define QTVR_PANO_VERT 2 37 38 #define QTVR_QTVR_OBJ 1 39 #define QTVR_QTVR_PAN 2 40 #define QTVR_OBJ 3 41 #define QTVR_PAN 4 42 43 /* check if the file is a qtvr file */ 44 /* return values: */ 45 /* QTVR_OBJ = file is object movie */ 46 /* QTVR_PAN = file is panorama */ 47 int lqt_is_qtvr(quicktime_t *file); 48 49 50 /* initialize qtvr atoms/track */ 51 /* type: QTVR_OBJ == object movie */ 52 /* QTVR_PAN == panorama movie */ 53 int lqt_qtvr_set_type(quicktime_t *file, 54 int type, 55 int width, 56 int height, 57 int duration, 58 int time_scale, 59 int scene_track); 60 61 62 /* return full dimensions of the movie*/ 63 int lqt_qtvr_get_width(quicktime_t *file); 64 int lqt_qtvr_get_height(quicktime_t *file); 65 66 /* get depth of the movie */ 67 int lqt_qtvr_get_depth(quicktime_t *file); 68 69 /* get number of rows/columns */ 70 int lqt_qtvr_get_rows(quicktime_t *file); 71 int lqt_qtvr_get_columns(quicktime_t *file); 72 73 /* set number of columns/rows */ 74 int lqt_qtvr_set_rows(quicktime_t *file, int rows); 75 int lqt_qtvr_set_columns(quicktime_t *file, int columns); 76 77 /* get initial frame to display */ 78 int lqt_qtvr_get_initial_position(quicktime_t *file); 79 80 /* panning, tilting, fov, movietype */ 81 /* optional parameters that define player behavior */ 82 83 /* Object movies: */ 84 /* get/set the panning/zoom settings */ 85 /* starthpan == 0 and endhpan == 360 means continous horiz. panning */ 86 /* Most (all?) object movies use these values: */ 87 /* starthpan = 0 (angle of thehorizontal starting position) */ 88 /* endhpan = 360 */ 89 /* startvpan = 90 */ 90 /* endvpan = -90 */ 91 /* minzoom/maxzoom are ignored */ 92 /* */ 93 /* Note: In Apples Player they affect the mouse sensivity. */ 94 95 /* Panoramas: */ 96 /* starthpan = 0 */ 97 /* endhpan = 360 */ 98 /* startvpan = ??? */ 99 /* endvpan = ??? */ 100 /* minzoom/maxzoom: restrict zoom levels (Panorama only) */ 101 /* */ 102 /* Note: For panoramas endvpan/startvpan have to be adjusted for every movie */ 103 104 /* To ignore a parameter set it to NULL */ 105 106 // TODO: update above 107 108 /* get/set panning */ 109 void lqt_qtvr_get_pan(quicktime_t *file, float *minpan, float *maxpan, float *defpan); 110 void lqt_qtvr_set_pan(quicktime_t *file, float minpan, float maxpan, float defpan); 111 112 /* get/set tilting */ 113 void lqt_qtvr_get_tilt(quicktime_t *file, float *mintilt, float *maxtilt, float *deftilt); 114 void lqt_qtvr_set_tilt(quicktime_t *file, float mintilt, float maxtilt, float deftilt); 115 116 /* get/set fov */ 117 void lqt_qtvr_get_fov(quicktime_t *file, float *minfov, float *maxfov, float *deffov); 118 void lqt_qtvr_set_fov(quicktime_t *file, float minfov, float maxfov, float deffov); 119 120 /* get number of loop frames */ 121 int lqt_qtvr_get_loop_frames(quicktime_t *file); 122 123 /* movietype 124 * get/set the controller type 125 * These controllers are possible: 126 * QTVR_GRABBER_SCROLLER_UI hand cursor, view rotates in movement direction 127 * rotation arrows 128 * QTVR_OLD_JOYSTICK_UI "Joystick interface", rotation against movement 129 * direction 130 * QTVR_JOYSTICK_UI "Joystick Interface", rotation in movement direction 131 * QTVR_GRABBER_UI hand cursor. no rotation arrows 132 * QTVR_ABSOLUTE_UI absolute interface 133 */ 134 int lqt_qtvr_get_movietype(quicktime_t *file); 135 int lqt_qtvr_set_movietype(quicktime_t *file, int movietype); 136 137 /* get object track*/ 138 int lqt_qtvr_get_object_track(quicktime_t *file); 139 140 141 /* get qtvr track*/ 142 int lqt_qtvr_get_qtvr_track(quicktime_t *file); 143 144 /* Panorama specific */ 145 146 /* get/set the dimensions of the player window */ 147 int lqt_qtvr_set_display_width(quicktime_t *file, int width); 148 int lqt_qtvr_set_display_height(quicktime_t *file, int height); 149 int lqt_qtvr_get_display_width(quicktime_t *file); 150 int lqt_qtvr_get_display_height(quicktime_t *file); 151 152 /* get panorama track */ 153 int lqt_qtvr_get_panorama_track(quicktime_t *file); 154 155 /* get the image track */ 156 int lqt_qtvr_get_image_track(quicktime_t *file); 157 158 /* set the scene track */ 159 int lqt_qtvr_set_image_track(quicktime_t *file, int track); 160 161 int lqt_qtvr_add_panorama_node(quicktime_t *file); 162 int lqt_qtvr_add_object_node(quicktime_t *file); 163 164 int lqt_qtvr_get_panotype(quicktime_t *file); 165 166 #pragma GCC visibility pop 167 168 #ifdef __cplusplus 169 } 170 #endif /* __cplusplus */ 171 172 173 174 #endif 175