|
Shinya Kitaoka |
810553 |
#pragma once
|
|
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
|
|
Shinya Kitaoka |
120a6e |
is not currently supported.
|
|
Toshihiro Shimizu |
890ddd |
Moreover, image insertion is not permitted; only appending.
|
|
Shinya Kitaoka |
120a6e |
To view .mov file, use quicktime tools present on both NT(movieplayer)
|
|
Shinya Kitaoka |
120a6e |
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 {
|
|
Shinya Kitaoka |
120a6e |
TM_RGBX_TYPE = 0,
|
|
Shinya Kitaoka |
120a6e |
TM_RGB16_TYPE,
|
|
Shinya Kitaoka |
120a6e |
TM_RGB8_TYPE,
|
|
Shinya Kitaoka |
120a6e |
TM_BW_TYPE,
|
|
Shinya Kitaoka |
120a6e |
TM_HOW_MANY_TYPE
|
|
Toshihiro Shimizu |
890ddd |
} TNZMOVIE_TYPE;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
typedef enum TNZMOVIE_QUALITY {
|
|
Shinya Kitaoka |
120a6e |
TM_MIN_QUALITY = 0,
|
|
Shinya Kitaoka |
120a6e |
TM_LOW_QUALITY,
|
|
Shinya Kitaoka |
120a6e |
TM_NORMAL_QUALITY,
|
|
Shinya Kitaoka |
120a6e |
TM_HIGH_QUALITY,
|
|
Shinya Kitaoka |
120a6e |
TM_MAX_QUALITY,
|
|
Shinya Kitaoka |
120a6e |
TM_LOSSLESS_QUALITY,
|
|
Shinya Kitaoka |
120a6e |
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 {
|
|
Shinya Kitaoka |
120a6e |
TM_JPG_COMPRESSION = 0,
|
|
Shinya Kitaoka |
120a6e |
TM_VIDEO_COMPRESSION,
|
|
Shinya Kitaoka |
120a6e |
TM_ANIM_COMPRESSION,
|
|
Shinya Kitaoka |
120a6e |
TM_CINEPAK_COMPRESSION,
|
|
Shinya Kitaoka |
120a6e |
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 |
|
|
Shinya Kitaoka |
120a6e |
TNZAPI2 TBOOL get_movie_codec_info(char ***quality_string, int *numQ, int *defQ,
|
|
Shinya Kitaoka |
120a6e |
char ***compression_string, int *numC,
|
|
Shinya Kitaoka |
120a6e |
int *defC);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
#ifdef WIN32
|
|
Shinya Kitaoka |
120a6e |
TNZAPI2 TBOOL get_movie_codec_val(char *quality_string, ULONG *quality_val,
|
|
Shinya Kitaoka |
120a6e |
char *compression_string, ULONG
|
|
Shinya Kitaoka |
120a6e |
*compression_val);
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Shinya Kitaoka |
120a6e |
TNZAPI2 TBOOL get_movie_codec_val(char *quality_string,
|
|
Shinya Kitaoka |
120a6e |
TNZMOVIE_QUALITY *quality_val,
|
|
Shinya Kitaoka |
120a6e |
char *compression_string,
|
|
Shinya Kitaoka |
120a6e |
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
|
|
Shinya Kitaoka |
120a6e |
TNZAPI2 TBOOL get_movie_codec_info(char ***quality_string, int *numQ, int *defQ,
|
|
Shinya Kitaoka |
120a6e |
char ***compression_string, int *numC,
|
|
Shinya Kitaoka |
120a6e |
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 |
|
|
Shinya Kitaoka |
120a6e |
TNZAPI TNZMOVIE tm_create(char *fullpathname, TBOOL do_overwrite_file,
|
|
Shinya Kitaoka |
120a6e |
TNZMOVIE_TYPE type, int rate, int lx, int ly,
|
|
Shinya Kitaoka |
120a6e |
TNZMOVIE_QUALITY quality,
|
|
Shinya Kitaoka |
120a6e |
TNZMOVIE_COMPRESSION compression);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**************************************************************
|
|
Shinya Kitaoka |
120a6e |
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 |
/**************************************************************
|
|
Shinya Kitaoka |
120a6e |
Append a .wav(NT) or .aiff(IRIX) audio file to the movie.
|
|
MCCCS |
a0ce32 |
The length 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;
|
|
Shinya Kitaoka |
120a6e |
If 'position' is >0, the audio track is added beginning from video frame
|
|
Shinya Kitaoka |
120a6e |
'position'.
|
|
Shinya Kitaoka |
120a6e |
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 |
|
|
Shinya Kitaoka |
120a6e |
TNZAPI TBOOL tm_add_audio_track(TNZMOVIE movie, char *audiofullpathname,
|
|
Shinya Kitaoka |
120a6e |
int img_offs, int audio_offs, int frames,
|
|
Shinya Kitaoka |
120a6e |
TS_STRACK audioTrack);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TNZAPI TBOOL tm_close(TNZMOVIE movie);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|