lqt.h File Reference
`#include "quicktime.h"`
`#include "lqt_atoms.h"`
`#include "compression.h"`
`#include "lqt_codecinfo.h"`
`#include "lqt_qtvr.h"`

Go to the source code of this file.

## Macros

#define | LQT_TIMECODE_DROP 0x0001
| Indicates whether the timecode is drop frame. More...
#define | LQT_TIMECODE_24HMAX 0x0002
| Indicates whether the timecode wraps after 24 hours. More...
#define | LQT_TIMECODE_NEG_OK 0x0004
| Indicates whether negative time values are allowed. More...
#define | LQT_TIMECODE_COUNTER 0x0008
| Indicates whether the time value corresponds to a tape counter value. More...
#define | LQT_COLORMODEL_NONE -1

## Functions

void * | lqt_bufalloc (size_t size)
void | lqt_set_log_callback (lqt_log_callback_t cb, void *data)
| Set callback for global logging. More...
int | lqt_fileno (quicktime_t *file)
| Return the raw filedescriptor associated with the file. More...
void | lqt_set_audio_parameter (quicktime_t *file, int track, const char *key, const void *value)
| Set a codec parameter for an audio track. More...
void | lqt_set_video_parameter (quicktime_t *file, int track, const char *key, const void *value)
| Set a codec parameter for a video track. More...
int | lqt_get_pixel_aspect (quicktime_t *file, int track, int *pixel_width, int *pixel_height)
| Get the pixel aspect ratio of a video track. More...
int | lqt_set_pixel_aspect (quicktime_t *file, int track, int pixel_width, int pixel_height)
| Set the pixel aspect ratio of a video track. More...
lqt_interlace_mode_t | lqt_get_interlace_mode (quicktime_t *file, int track)
| Get the interlace mode. More...
int | lqt_set_interlace_mode (quicktime_t *file, int track, lqt_interlace_mode_t mode)
| Set the interlace mode. More...
const char * | lqt_interlace_mode_to_string (lqt_interlace_mode_t mode)
| Convert an interlace mode to a human readable string. More...
lqt_chroma_placement_t | lqt_get_chroma_placement (quicktime_t *file, int track)
| Get the chroma placement. More...
const char * | lqt_chroma_placement_to_string (lqt_chroma_placement_t chroma_placement)
| Convert a chroma placement to a human readable string. More...
int | lqt_get_codec_api_version ()
| Get the codec API version. More...
const char * | lqt_channel_to_string (lqt_channel_t ch)
| Convert a channel identifier to a human readnable string. More...
void | lqt_set_channel_setup (quicktime_t *file, int track, lqt_channel_t *ch)
| Set a channel setup for an audio track. More...
const lqt_channel_t * | lqt_get_channel_setup (quicktime_t *file, int track)
| Get a channel setup from a file. More...
int | lqt_add_text_track (quicktime_t *file, int timescale)
| Add a text track. More...
void | lqt_set_text_language (quicktime_t *file, int track, const char *language)
| Set the language for a text track. More...
void | lqt_set_chapter_track (quicktime_t *file, int track)
| Make a text track a chapter track. More...
void | lqt_set_text_box (quicktime_t *file, int track, uint16_t top, uint16_t left, uint16_t bottom, uint16_t right)
| Set the text box of a text track. More...
void | lqt_set_text_fg_color (quicktime_t *file, int track, uint16_t r, uint16_t g, uint16_t b, uint16_t a)
| Set the foreground color of a text track. More...
void | lqt_set_text_bg_color (quicktime_t *file, int track, uint16_t r, uint16_t g, uint16_t b, uint16_t a)
| Set the background color of a text track. More...
int | lqt_write_text (quicktime_t *file, int track, const char *text, int64_t duration)
| Write a text sample. More...
int | lqt_text_tracks (quicktime_t *file)
| Get the number of text tracks. More...
int | lqt_get_text_language (quicktime_t *file, int track, char *language)
| Get the text language. More...
int | lqt_text_time_scale (quicktime_t *file, int track)
| Get the timescale for a text track. More...
void | lqt_get_text_box (quicktime_t *file, int track, uint16_t *top, uint16_t *left, uint16_t *bottom, uint16_t *right)
| Set the text box of a text track. More...
int | lqt_read_text (quicktime_t *file, int track, char **text, int *text_alloc, int64_t *timestamp, int64_t *duration)
| Read a text sample. More...
int | lqt_is_chapter_track (quicktime_t *file, int track)
| Check if a track is a chapter track. More...
int64_t | lqt_text_samples (quicktime_t *file, int track)
| Get the total number of text samples. More...
void | lqt_set_text_position (quicktime_t *file, int track, int64_t position)
| Go to a specific sample. More...
void | lqt_set_text_time (quicktime_t *file, int track, int64_t time)
| Go to a specific time. More...
void | lqt_get_text_fg_color (quicktime_t *file, int track, uint16_t *r, uint16_t *g, uint16_t *b, uint16_t *a)
| Get the foreground color of a text track. More...
void | lqt_get_text_bg_color (quicktime_t *file, int track, uint16_t *r, uint16_t *g, uint16_t *b, uint16_t *a)
| Get the background color of a text track. More...
void | lqt_add_timecode_track (quicktime_t *file, int track, uint32_t flags, int framerate)
| Attach a timecode track to a video track. More...
void | lqt_write_timecode (quicktime_t *file, int track, uint32_t timecode)
| Write a timecode for the next video frame to be encoded. More...
int | lqt_has_timecode_track (quicktime_t *file, int track, uint32_t *flags, int *framerate)
| Check, if a video track has timecodes. More...
int | lqt_read_timecode (quicktime_t *file, int track, uint32_t *timecode)
| Read the timecode for the next frame to be decoded. More...
const char * | lqt_get_timecode_tape_name (quicktime_t *file, int track)
| Get the tape name stored in a timecode track. More...
void | lqt_set_timecode_tape_name (quicktime_t *file, int track, const char *tapename)
| Set the tapename for a timecode track. More...
int | lqt_get_timecode_track_enabled (quicktime_t *file, int track)
| Get the enabled flag of a timecode track. More...
void | lqt_set_timecode_track_enabled (quicktime_t *file, int track, int enabled)
| Enable or disable a timecode track. More...
const char * | lqt_colormodel_to_string (int colormodel)
| Convert a colormodel to a human readable string. More...
int | lqt_string_to_colormodel (const char *str)
| Convert a description string to a colormodel. More...
int | lqt_colormodel_is_planar (int colormodel)
| Check if a colormodel is planar. More...
int | lqt_colormodel_has_alpha (int colormodel)
| Check if a colormodel has an alpha (transperency) channel. More...
int | lqt_colormodel_is_rgb (int colormodel)
| Check, if a colormodel is RGB based. More...
int | lqt_colormodel_is_yuv (int colormodel)
| Check, if a colormodel is YUV based. More...
void | lqt_colormodel_get_chroma_sub (int colormodel, int *sub_h, int *sub_v)
| Get the chroma subsampling factors. More...
void | lqt_get_default_rowspan (int colormodel, int width, int *rowspan, int *rowspan_uv)
| Get the default row span for a colormodel and an image width. More...
int | lqt_colormodel_has_conversion (int in_cmodel, int out_cmodel)
| Check if a colormodel conversion is supported by libquicktime. More...
int | lqt_num_colormodels ()
| Get number of supported colormodels. More...
const char * | lqt_get_colormodel_string (int index)
| Get a colormodel string. More...
int | lqt_get_colormodel (int index)
| Get a colormodel. More...
int | lqt_get_decoder_colormodel (quicktime_t *file, int track)
| Get the native colormodel of the decoder. More...
int | lqt_get_best_source_colormodel (int const *source_options, int target)
| Select a source colormodel from a provided list that is best for conversion into a specified target colormodel. More...
int | lqt_get_best_target_colormodel (int source, int const *target_options)
| Select a target colormodel from a provided list that is best for conversion from a specified source colormodel. More...
int | lqt_get_best_colormodel (quicktime_t *file, int track, int *supported)
| Get the best colormodel out of a list of supported colormodels. More...
int | lqt_get_cmodel (quicktime_t *file, int track)
| Get the colormodel, which will be valid for the next en-/decode call. More...
uint8_t ** | lqt_rows_alloc (int width, int height, int colormodel, int *rowspan, int *rowspan_uv)
| Allocate a frame buffer for use with libquicktime. More...
void | lqt_rows_copy (uint8_t **out_rows, uint8_t **in_rows, int width, int height, int in_rowspan, int in_rowspan_uv, int out_rowspan, int out_rowspan_uv, int colormodel)
| Copy a video frame. More...
void | lqt_rows_copy_sub (uint8_t **out_rows, uint8_t **in_rows, int width, int height, int in_rowspan, int in_rowspan_uv, int out_rowspan, int out_rowspan_uv, int colormodel, int src_x, int src_y, int dst_x, int dst_y)
| Copy a subrectangle video frame. More...
void | lqt_rows_clear (uint8_t **rows, int width, int height, int rowspan, int rowspan_uv, int colormodel)
| Clear a video frame. More...
void | lqt_rows_free (uint8_t **rows)
| Free a frame allocated by lqt_rows_alloc. More...
int | lqt_set_audio (quicktime_t *file, int channels, long sample_rate, int bits, lqt_codec_info_t *codec_info)
| Set up audio tracks for encoding. More...
int | lqt_set_video (quicktime_t *file, int tracks, int frame_w, int frame_h, int frame_duration, int timescale, lqt_codec_info_t *codec_info)
| Set up video tracks for encoding. More...
int | lqt_add_audio_track (quicktime_t *file, int channels, long sample_rate, int bits, lqt_codec_info_t *codec_info)
| Add an audio track for encoding. More...
int | lqt_set_audio_codec (quicktime_t *file, int track, lqt_codec_info_t *info)
| Set a codec for an audio track. More...
void | lqt_set_audio_language (quicktime_t *file, int track, const char *language)
| Set the audio language. More...
int | lqt_add_video_track (quicktime_t *file, int frame_w, int frame_h, int frame_duration, int timescale, lqt_codec_info_t *codec_info)
| Add a video track for encoding. More...
int | lqt_set_video_codec (quicktime_t *file, int track, lqt_codec_info_t *info)
| Set a codec for an audio track. More...
int | lqt_set_video_pass (quicktime_t *file, int pass, int total_passes, const char *stats_file, int track)
| Enable multipass encoding. More...
int64_t | lqt_get_frame_time (quicktime_t *file, int track, int frame)
| Get the timestamp of a given frame. More...
int64_t | lqt_frame_time (quicktime_t *file, int track)
| Get the timestamp of the next frame to be decoded. More...
int | lqt_decode_video (quicktime_t *file, unsigned char **row_pointers, int track)
| Decode one video frame. More...
int | lqt_read_video_frame (quicktime_t *file, uint8_t **buffer, int *buffer_alloc, int64_t frame, int64_t *time, int track)
| Read a compressed video frame. More...
int | lqt_encode_video (quicktime_t *file, unsigned char **row_pointers, int track, int64_t time)
| Encode one video frame. More...
int | lqt_encode_video_d (quicktime_t *file, unsigned char **row_pointers, int track, int64_t time, int duration)
| Encode one video frame. More...
int | lqt_frame_duration (quicktime_t *file, int track, int *constant)
| Get the duration of the NEXT frame to be decoded. More...
int | lqt_video_time_scale (quicktime_t *file, int track)
| Get the timescale of the track. More...
int64_t | lqt_video_duration (quicktime_t *file, int track)
| Get the duration of a video track. More...
void | lqt_set_cmodel (quicktime_t *file, int track, int colormodel)
| Set the colormodel for en-/decoding. More...
long | lqt_video_edit_list_total_entries (quicktime_t *file, int track)
| Get the number of video track edit segments. More...
long | lqt_video_edit_duration (quicktime_t *file, int track, int entry_index)
| Get the duration of a video track edit segment. More...
long | lqt_video_edit_time (quicktime_t *file, int track, int entry_index)
| Get the time offset of a video track edit segment. More...
float | lqt_video_edit_rate (quicktime_t *file, int track, int entry_index)
| Get the rate of a video track edit segment. More...
void | lqt_set_row_span (quicktime_t *file, int track, int row_span)
| Set the row span for the luma plane. More...
void | lqt_set_row_span_uv (quicktime_t *file, int track, int row_span_uv)
| Set the row span for the chroma planes. More...
int | lqt_decode_audio (quicktime_t *file, int16_t **output_i, float **output_f, long samples)
| Decode all channels from all tracks at once. More...
int64_t | lqt_last_audio_position (quicktime_t *file, int track)
| Get the position of the last decoded sample. More...
int | lqt_encode_audio_track (quicktime_t *file, int16_t **output_i, float **output_f, long samples, int track)
| Encode a number of audio samples for the first track. More...
int | lqt_decode_audio_track (quicktime_t *file, int16_t **output_i, float **output_f, long samples, int track)
| Decode a number of audio samples. More...
const char * | lqt_sample_format_to_string (lqt_sample_format_t sampleformat)
| Get a human readable description for a sample format. More...
lqt_sample_format_t | lqt_get_sample_format (quicktime_t *file, int track)
| Return the sample format used natively by the codec. More...
int | lqt_decode_audio_raw (quicktime_t *file, void *output, long samples, int track)
| Decode audio in the native sampleformat of the codec. More...
int | lqt_get_audio_language (quicktime_t *file, int track, char *language)
| Get the audio language. More...
int | lqt_encode_audio_raw (quicktime_t *file, void *input, long samples, int track)
| Encode audio in the native sampleformat of the codec. More...
void | lqt_seek_video (quicktime_t *file, int track, int64_t time)
| Seek to a specific video time. More...
long | lqt_audio_edit_list_total_entries (quicktime_t *file, int track)
| Get the number of audio track edit segments. More...
long | lqt_audio_edit_duration (quicktime_t *file, int track, int entry_index)
| Get the duration of a audio track edit segment. More...
long | lqt_audio_edit_time (quicktime_t *file, int track, int entry_index)
| Get the time offset of a audio track edit segment. More...
float | lqt_audio_edit_rate (quicktime_t *file, int track, int entry_index)
| Get the rate of a audio track edit segment. 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...
int | lqt_total_channels (quicktime_t *file)
| Get the total number of audio channels across all tracks. More...
void | lqt_set_album (quicktime_t *file, char *string)
| Set the album for the file. More...
void | lqt_set_artist (quicktime_t *file, char *string)
| Set the artist for the file. More...
void | lqt_set_genre (quicktime_t *file, char *string)
| Set the genre for the file. More...
void | lqt_set_track (quicktime_t *file, char *string)
| Set the track number for the file. More...
void | lqt_set_comment (quicktime_t *file, char *string)
| Set the comment for the file. More...
void | lqt_set_author (quicktime_t *file, char *string)
| Set the author for the file. More...
void | lqt_set_creation_time (quicktime_t *file, unsigned long time)
| Set the creation time for the file. More...
char * | lqt_get_album (quicktime_t *file)
| Get the album from the file. More...
char * | lqt_get_artist (quicktime_t *file)
| Get the artist from the file. More...
char * | lqt_get_genre (quicktime_t *file)
| Get the genre from the file. More...
char * | lqt_get_track (quicktime_t *file)
| Get the track number from the file. More...
char * | lqt_get_comment (quicktime_t *file)
| Get the comment from the file. More...
char * | lqt_get_author (quicktime_t *file)
| Get the author from the file. More...
unsigned long | lqt_get_creation_time (quicktime_t *file)
| Get the creation time from the file. More...
int | lqt_track_from_id (quicktime_t *file, int track_id)
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...
void | lqt_set_audio_pts_offset (quicktime_t *file, int track, int64_t offset)
| Set an audio pts offset. More...
int64_t | lqt_get_audio_pts_offset (quicktime_t *file, int track)
| Get an audio pts offset. More...
void | lqt_set_video_pts_offset (quicktime_t *file, int track, int64_t offset)
| Set an video pts offset. More...
int64_t | lqt_get_video_pts_offset (quicktime_t *file, int track)
| Get an video pts offset. More...
void | lqt_set_text_pts_offset (quicktime_t *file, int track, int64_t offset)
| Set an video pts offset. More...
int64_t | lqt_get_text_pts_offset (quicktime_t *file, int track)
| Get an video pts offset. More...

## Detailed Description

Public api header for libquicktime.