|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef _QT_MOVIE_H_
|
|
Toshihiro Shimizu |
890ddd |
#define _QT_MOVIE_H_
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**************************************************************
|
|
Toshihiro Shimizu |
890ddd |
This APIs permit to handle MACINTOSH QUICKTIME movies.
|
|
Toshihiro Shimizu |
890ddd |
They are intended only for creation; viewing and updating movies
|
|
Toshihiro Shimizu |
890ddd |
is not currently supported.
|
|
Toshihiro Shimizu |
890ddd |
Moreover, image insertion is not permitted; only appending.
|
|
Toshihiro Shimizu |
890ddd |
To view .mov file, use quicktime tools present on both NT(movieplayer)
|
|
Toshihiro Shimizu |
890ddd |
and IRIX(movieplayer, moviemaker) platform.
|
|
Toshihiro Shimizu |
890ddd |
The .mov created are cross-platform
|
|
Toshihiro Shimizu |
890ddd |
**************************************************************/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "toonz4.6/toonz.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tsound.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef TNZAPI
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TNZ_IS_IMAGELIB
|
|
Toshihiro Shimizu |
890ddd |
#define TNZAPI TNZ_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define TNZAPI TNZ_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef TNZAPI2
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TNZ_IS_COMMONLIB
|
|
Toshihiro Shimizu |
890ddd |
#define TNZAPI2 TNZ_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define TNZAPI2 TNZ_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*opaque definition for the movie object*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
typedef struct TNZMOVIE_DATA *TNZMOVIE;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
typedef struct _RASTER *MY_RASTER; /*to avoid raster.h inclusion */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* Warning: TNZMOVIE_TYPE makes sense only on NT; on IRIX is always RGBX*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
typedef enum TNZMOVIE_TYPE {
|
|
Toshihiro Shimizu |
890ddd |
TM_RGBX_TYPE = 0,
|
|
Toshihiro Shimizu |
890ddd |
TM_RGB16_TYPE,
|
|
Toshihiro Shimizu |
890ddd |
TM_RGB8_TYPE,
|
|
Toshihiro Shimizu |
890ddd |
TM_BW_TYPE,
|
|
Toshihiro Shimizu |
890ddd |
TM_HOW_MANY_TYPE
|
|
Toshihiro Shimizu |
890ddd |
} TNZMOVIE_TYPE;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
typedef enum TNZMOVIE_QUALITY {
|
|
Toshihiro Shimizu |
890ddd |
TM_MIN_QUALITY = 0,
|
|
Toshihiro Shimizu |
890ddd |
TM_LOW_QUALITY,
|
|
Toshihiro Shimizu |
890ddd |
TM_NORMAL_QUALITY,
|
|
Toshihiro Shimizu |
890ddd |
TM_HIGH_QUALITY,
|
|
Toshihiro Shimizu |
890ddd |
TM_MAX_QUALITY,
|
|
Toshihiro Shimizu |
890ddd |
TM_LOSSLESS_QUALITY,
|
|
Toshihiro Shimizu |
890ddd |
TM_HOW_MANY_QUALITY
|
|
Toshihiro Shimizu |
890ddd |
} TNZMOVIE_QUALITY;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifdef WIN32
|
|
Toshihiro Shimizu |
890ddd |
typedef int TNZMOVIE_COMPRESSION;
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
typedef enum TNZMOVIE_COMPRESSION {
|
|
Toshihiro Shimizu |
890ddd |
TM_JPG_COMPRESSION = 0,
|
|
Toshihiro Shimizu |
890ddd |
TM_VIDEO_COMPRESSION,
|
|
Toshihiro Shimizu |
890ddd |
TM_ANIM_COMPRESSION,
|
|
Toshihiro Shimizu |
890ddd |
TM_CINEPAK_COMPRESSION,
|
|
Toshihiro Shimizu |
890ddd |
TM_HOW_MANY_COMPRESSION
|
|
Toshihiro Shimizu |
890ddd |
} TNZMOVIE_COMPRESSION;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
typedef unsigned long CodecQ;
|
|
Toshihiro Shimizu |
890ddd |
typedef unsigned long CodecType;
|
|
Toshihiro Shimizu |
890ddd |
/*---------------------------------------------------------------------------*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI2 TBOOL tnz_movies_available(void);
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI2 TBOOL tnz_avi_available(void);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI2 TBOOL get_movie_codec_info(char ***quality_string,
|
|
Toshihiro Shimizu |
890ddd |
int *numQ, int *defQ,
|
|
Toshihiro Shimizu |
890ddd |
char ***compression_string,
|
|
Toshihiro Shimizu |
890ddd |
int *numC, int *defC);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
#ifdef WIN32
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI2 TBOOL get_movie_codec_val(char *quality_string, ULONG *quality_val,
|
|
Toshihiro Shimizu |
890ddd |
char *compression_string, ULONG *compression_val);
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI2 TBOOL get_movie_codec_val(char *quality_string, TNZMOVIE_QUALITY *quality_val,
|
|
Toshihiro Shimizu |
890ddd |
char *compression_string, TNZMOVIE_COMPRESSION *compression_val);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef WIN32
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI2 TBOOL get_movie_codec_info(char ***quality_string,
|
|
Toshihiro Shimizu |
890ddd |
int *numQ, int *defQ,
|
|
Toshihiro Shimizu |
890ddd |
char ***compression_string,
|
|
Toshihiro Shimizu |
890ddd |
int *numC, int *defC);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI2 CodecQ tm_get_quality(int quality);
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI2 CodecType tm_get_compression(int compression);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**************************************************************
|
|
Toshihiro Shimizu |
890ddd |
This function creates and open a new movie, ready to append images;
|
|
Toshihiro Shimizu |
890ddd |
NIL is returned on error; Remember to use tm_close
|
|
Toshihiro Shimizu |
890ddd |
when finished!!!
|
|
Toshihiro Shimizu |
890ddd |
**************************************************************/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*---------------------------------------------------------------------------*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI TNZMOVIE tm_create(char *fullpathname,
|
|
Toshihiro Shimizu |
890ddd |
TBOOL do_overwrite_file,
|
|
Toshihiro Shimizu |
890ddd |
TNZMOVIE_TYPE type,
|
|
Toshihiro Shimizu |
890ddd |
int rate,
|
|
Toshihiro Shimizu |
890ddd |
int lx, int ly,
|
|
Toshihiro Shimizu |
890ddd |
TNZMOVIE_QUALITY quality,
|
|
Toshihiro Shimizu |
890ddd |
TNZMOVIE_COMPRESSION compression);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**************************************************************
|
|
Toshihiro Shimizu |
890ddd |
Warning: raster lx and ly must be the same of the movie.
|
|
Toshihiro Shimizu |
890ddd |
Raster is converted to the suitable format(cloning it)
|
|
Toshihiro Shimizu |
890ddd |
**************************************************************/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI TBOOL tm_append_raster(TNZMOVIE movie, MY_RASTER r);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**************************************************************
|
|
Toshihiro Shimizu |
890ddd |
Append a .wav(NT) or .aiff(IRIX) audio file to the movie.
|
|
Toshihiro Shimizu |
890ddd |
The lenght of the resulting movie is forced to be equal to the video track,
|
|
Toshihiro Shimizu |
890ddd |
so any overflowing audio is truncated. For this reason, is adviced to add
|
|
Toshihiro Shimizu |
890ddd |
the audio when the video part has been completely added.
|
|
Toshihiro Shimizu |
890ddd |
The position can be a negative value too;
|
|
Toshihiro Shimizu |
890ddd |
If 'position' is >0, the audio track is added beginning from video frame 'position'.
|
|
Toshihiro Shimizu |
890ddd |
If 'position' is <0, the audio is added starting from audio frame 'position',
|
|
Toshihiro Shimizu |
890ddd |
at the beginning of video track.
|
|
Toshihiro Shimizu |
890ddd |
**************************************************************/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI TBOOL tm_add_audio_track(TNZMOVIE movie,
|
|
Toshihiro Shimizu |
890ddd |
char *audiofullpathname,
|
|
Toshihiro Shimizu |
890ddd |
int img_offs, int audio_offs, int frames, TS_STRACK audioTrack);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI TBOOL tm_close(TNZMOVIE movie);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|