libquicktime
|
General structures and functions. More...
Typedefs | |
typedef struct quicktime_s | quicktime_t |
Quicktime handle. More... | |
Functions | |
int | quicktime_major () |
Get the quicktime4linux major version. More... | |
int | quicktime_minor () |
Get the quicktime4linux minor version. More... | |
int | quicktime_release () |
Get the quicktime4linux release number. More... | |
int | quicktime_check_sig (char *path) |
Test file compatibility. More... | |
quicktime_t * | quicktime_open (const char *filename, int rd, int wr) |
Open a file. More... | |
int | quicktime_make_streamable (char *in_path, char *out_path) |
Make a file streamable. More... | |
int | quicktime_close (quicktime_t *file) |
Close a quicktime handle and free all associated memory. More... | |
int | quicktime_dump (quicktime_t *file) |
Dump the file structures to stdout. More... | |
int | quicktime_set_cpus (quicktime_t *file, int cpus) |
Set the number of CPUs. More... | |
void | quicktime_set_avi (quicktime_t *file, int value) |
Write an AVI file instead of quicktime. More... | |
int | lqt_fileno (quicktime_t *file) |
Return the raw filedescriptor associated with the file. More... | |
int | lqt_get_codec_api_version () |
Get the codec API version. More... | |
int | lqt_is_avi (quicktime_t *file) |
Query if the function is an AVI. More... | |
int | lqt_get_wav_id (quicktime_t *file, int track) |
Get the WAVE id of an audio track. More... | |
const char * | lqt_file_type_to_string (lqt_file_type_t type) |
Get a human readable filetype. More... | |
lqt_file_type_t | lqt_get_file_type (quicktime_t *file) |
Get the filetype. More... | |
quicktime_t * | lqt_open_read (const char *filename) |
Open a file for reading. More... | |
quicktime_t * | lqt_open_read_with_log (const char *filename, lqt_log_callback_t cb, void *log_data) |
Open a file for reading. More... | |
quicktime_t * | lqt_open_write (const char *filename, lqt_file_type_t type) |
Open a file for writing. More... | |
quicktime_t * | lqt_open_write_with_log (const char *filename, lqt_file_type_t type, lqt_log_callback_t cb, void *log_data) |
Open a file for writing. More... | |
void | lqt_set_max_riff_size (quicktime_t *file, int size) |
Set the segment size for ODML AVIs. More... | |
General structures and functions.
typedef struct quicktime_s quicktime_t |
Quicktime handle.
Opaque file handle used both for reading and writing. In quicktime4linux, this structure is public, resulting in programmers doing wrong things with it. In libquicktime, this is a private structure, which is accessed exclusively by functions.
int quicktime_major | ( | ) |
Get the quicktime4linux major version.
This returns the major quicktime4linux version. The complete version is 2.0.0, which was the last qt4l version from which we ported code. It's not usable for detecting the libquicktime version.
int quicktime_minor | ( | ) |
Get the quicktime4linux minor version.
This returns the minor quicktime4linux version. The complete version is 2.0.0, which was the last qt4l version from which we ported code. It's not usable for detecting the libquicktime version.
int quicktime_release | ( | ) |
Get the quicktime4linux release number.
This returns the release number of quicktime4linux. The complete version is 2.0.0, which was the last qt4l version from which we ported code. It's not usable for detecting the libquicktime version.
int quicktime_check_sig | ( | char * | path | ) |
Test file compatibility.
path | A path to a regular file |
Check the signature of a path and return 1 is the file is likely to ba decodable by libquicktime. This check might return false positives or false negatives. In general it's better (although slower) to check, if quicktime_open return NULL or not.
quicktime_t* quicktime_open | ( | const char * | filename, |
int | rd, | ||
int | wr | ||
) |
Open a file.
filename | A path to a regular file |
rd | 1 for open readonly, 0 else |
wr | 1 for open writeonly, 0 else |
Note, that files can never be opened read/write mode.
int quicktime_make_streamable | ( | char * | in_path, |
char * | out_path | ||
) |
Make a file streamable.
in_path | Existing non streamable file |
out_path | Output file |
This function makes a file streamable by placing the moov header at the beginning of the file. Note that you need approximately the twice the disk-space of the file. It is recommended, that this function is called only for files, which are encoded by libquicktime. Other files might not be correctly written.
int quicktime_close | ( | quicktime_t * | file | ) |
Close a quicktime handle and free all associated memory.
file | A quicktime handle |
int quicktime_dump | ( | quicktime_t * | file | ) |
Dump the file structures to stdout.
file | A quicktime handle |
This is used for debugging or by the qtdump utility
int quicktime_set_cpus | ( | quicktime_t * | file, |
int | cpus | ||
) |
Set the number of CPUs.
file | A quicktime handle |
cpus | Number of CPUs to use |
Libquicktime no longer does multithreaded en-/decoding. Therefore you can call this function if you like, but it will have no effect :)
void quicktime_set_avi | ( | quicktime_t * | file, |
int | value | ||
) |
Write an AVI file instead of quicktime.
file | A quicktime handle |
value | Set this to 1. If you want quicktime, simply don't call this function. |
This function must be called AFTER all tracks are set up and BEFORE anything is encoded.
int lqt_fileno | ( | quicktime_t * | file | ) |
Return the raw filedescriptor associated with the file.
file | A quicktime handle |
Use this of you want to call some low-level functions of the file. Note, that this routine should be used with care, since it's easy to screw things up.
int lqt_get_codec_api_version | ( | ) |
Get the codec API version.
Normally you don't need this function. It is used internally to detect codec modules, which were compiled with an incompatible libquicktime version.
int lqt_is_avi | ( | quicktime_t * | file | ) |
Query if the function is an AVI.
file | A quicktime handle |
int lqt_get_wav_id | ( | quicktime_t * | file, |
int | track | ||
) |
Get the WAVE id of an audio track.
file | A quicktime handle |
track | index (starting with 0) |
This is the counterpart of quicktime_audio_compressor for AVI files. It returns the 16 bit compression ID of the track.
const char* lqt_file_type_to_string | ( | lqt_file_type_t | type | ) |
Get a human readable filetype.
type | An lqt filetype |
lqt_file_type_t lqt_get_file_type | ( | quicktime_t * | file | ) |
Get the filetype.
file | A quicktime handle |
quicktime_t* lqt_open_read | ( | const char * | filename | ) |
Open a file for reading.
filename | A path to a regular file |
quicktime_t* lqt_open_read_with_log | ( | const char * | filename, |
lqt_log_callback_t | cb, | ||
void * | log_data | ||
) |
Open a file for reading.
filename | A path to a regular file |
cb | Log callback |
log_data | Data for log callback |
quicktime_t* lqt_open_write | ( | const char * | filename, |
lqt_file_type_t | type | ||
) |
Open a file for writing.
filename | A path to a regular file |
type | The type of the file, you want to create |
quicktime_t* lqt_open_write_with_log | ( | const char * | filename, |
lqt_file_type_t | type, | ||
lqt_log_callback_t | cb, | ||
void * | log_data | ||
) |
Open a file for writing.
filename | A path to a regular file |
type | The type of the file, you want to create |
cb | Log callback |
log_data | Data for log callback |
void lqt_set_max_riff_size | ( | quicktime_t * | file, |
int | size | ||
) |
Set the segment size for ODML AVIs.
file | A quicktime handle |
size | Maximum size of one RIFF in megabytes |
The actual sizes of the RIFFs will be slightly larger, therefore, you shouldn't set this to exactly to 2 GB. The default is 1 GB, which is reasonable, so there might be no reason to call this function at all.