Functions | |
long | quicktime_audio_length (quicktime_t *file, int track) |
Get the audio length. | |
long | quicktime_audio_position (quicktime_t *file, int track) |
Get the audio position. | |
int | quicktime_audio_tracks (quicktime_t *file) |
Get the number of audio tracks. | |
int | quicktime_has_audio (quicktime_t *file) |
Check if a file has at least one audio track. | |
long | quicktime_sample_rate (quicktime_t *file, int track) |
Get the samplerate of an audio track. | |
int | quicktime_audio_bits (quicktime_t *file, int track) |
Get the bits per sample of an audio track. | |
int | quicktime_track_channels (quicktime_t *file, int track) |
Get the number of channels of an audio track. | |
char * | quicktime_audio_compressor (quicktime_t *file, int track) |
Get the four character code of an audio track. | |
int | quicktime_channel_location (quicktime_t *file, int *quicktime_track, int *quicktime_channel, int channel) |
int | quicktime_set_audio_position (quicktime_t *file, int64_t sample, int track) |
Seek to a specific audio position. | |
int | quicktime_supported_audio (quicktime_t *file, int track) |
Check if an audio track is supported by libquicktime. | |
int | quicktime_decode_audio (quicktime_t *file, int16_t *output_i, float *output_f, long samples, int channel) |
Decode a number of audio samples of a single channel. | |
int | lqt_decode_audio (quicktime_t *file, int16_t **output_i, float **output_f, long samples) |
Decode all channels from all tracks at once. | |
int64_t | lqt_last_audio_position (quicktime_t *file, int track) |
Get the position of the last decoded sample. | |
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. | |
int | lqt_decode_audio_raw (quicktime_t *file, void *output, long samples, int track) |
Decode audio in the native sampleformat of the codec. | |
int | lqt_get_audio_language (quicktime_t *file, int track, char *language) |
Get the audio language. | |
long | lqt_audio_edit_list_total_entries (quicktime_t *file, int track) |
Get the number of audio track edit segments. | |
long | lqt_audio_edit_duration (quicktime_t *file, int track, int entry_index) |
Get the duration of a audio track edit segment. | |
long | lqt_audio_edit_time (quicktime_t *file, int track, int entry_index) |
Get the time offset of a audio track edit segment. | |
float | lqt_audio_edit_rate (quicktime_t *file, int track, int entry_index) |
Get the rate of a audio track edit segment. | |
int | lqt_total_channels (quicktime_t *file) |
Get the total number of audio channels across all tracks. | |
int64_t | lqt_get_audio_pts_offset (quicktime_t *file, int track) |
Get an audio pts offset. |
The audio API changed a lot during the last years (causing lot of confusion), so here is the preferred way: First get the number of audio tracks with quicktime_audio_tracks. Then for each track you want to decode, use quicktime_supported_audio to verify that a codec is available. Then get the audio format with quicktime_track_channels and quicktime_sample_rate . Then use lqt_decode_audio_track to decode noninterleaved channels in either 16bit integer or floating point [-1.0..1.0] format. This method will convert all internally used formats to the datatypes you want, but won't output the full precision for 24/32 bit formats. If you want the samples as raw as possible (bypassing all internal sample format conversions), use lqt_get_sample_format to get the sampleformat natively used by the codec and lqt_decode_audio_raw to decode it.
long quicktime_audio_length | ( | quicktime_t * | file, | |
int | track | |||
) |
Get the audio length.
file | A quicktime handle | |
track | index (starting with 0) |
long quicktime_audio_position | ( | quicktime_t * | file, | |
int | track | |||
) |
Get the audio position.
file | A quicktime handle | |
track | index (starting with 0) |
int quicktime_audio_tracks | ( | quicktime_t * | file | ) |
Get the number of audio tracks.
file | A quicktime handle |
int quicktime_has_audio | ( | quicktime_t * | file | ) |
Check if a file has at least one audio track.
file | A quicktime handle |
long quicktime_sample_rate | ( | quicktime_t * | file, | |
int | track | |||
) |
Get the samplerate of an audio track.
file | A quicktime handle | |
track | index (starting with 0) |
int quicktime_audio_bits | ( | quicktime_t * | file, | |
int | track | |||
) |
Get the bits per sample of an audio track.
file | A quicktime handle | |
track | index (starting with 0) |
To get some better informations about the resolution, a codec will deliver, use lqt_get_sample_format
int quicktime_track_channels | ( | quicktime_t * | file, | |
int | track | |||
) |
Get the number of channels of an audio track.
file | A quicktime handle | |
track | index (starting with 0) |
char* quicktime_audio_compressor | ( | quicktime_t * | file, | |
int | track | |||
) |
Get the four character code of an audio track.
file | A quicktime handle | |
track | index (starting with 0) |
int quicktime_channel_location | ( | quicktime_t * | file, | |
int * | quicktime_track, | |||
int * | quicktime_channel, | |||
int | channel | |||
) |
file | A quicktime handle | |
quicktime_track | Returns the index of the quicktime track | |
quicktime_channel | Returns the channel index inside the quicktime track | |
channel | The channel to query |
int quicktime_set_audio_position | ( | quicktime_t * | file, | |
int64_t | sample, | |||
int | track | |||
) |
Seek to a specific audio position.
file | A quicktime handle | |
sample | The sample position (starting with 0) | |
track | index (starting with 0) |
int quicktime_supported_audio | ( | quicktime_t * | file, | |
int | track | |||
) |
Check if an audio track is supported by libquicktime.
file | A quicktime handle | |
track | index (starting with 0) |
int quicktime_decode_audio | ( | quicktime_t * | file, | |
int16_t * | output_i, | |||
float * | output_f, | |||
long | samples, | |||
int | channel | |||
) |
Decode a number of audio samples of a single channel.
file | A quicktime handle | |
output_i | 16 bit integer output buffer (or NULL) | |
output_f | floating point output buffer (or NULL) | |
samples | Number of samples to decode | |
channel | Channel to decode |
The number of actually decoded samples (and EOF) can be obtained with lqt_last_audio_position
int lqt_decode_audio | ( | quicktime_t * | file, | |
int16_t ** | output_i, | |||
float ** | output_f, | |||
long | samples | |||
) |
Decode all channels from all tracks at once.
file | A quicktime handle | |
output_i | 16 bit integer output buffer (or NULL) | |
output_f | floating point output buffer (or NULL) | |
samples | How many samples to decode |
Libquicktime supports an arbitrary number of audio tracks, which can even have completely different formats and codecs. Therefore you should always use lqt_decode_audio_track or lqt_decode_audio_raw to decode audio from a particular track.
The number of actually decoded samples (and EOF) can be obtained with lqt_last_audio_position
int64_t lqt_last_audio_position | ( | quicktime_t * | file, | |
int | track | |||
) |
Get the position of the last decoded sample.
file | A quicktime handle | |
track | index (starting with 0) |
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.
file | A quicktime handle | |
output_i | 16 bit integer output buffer (or NULL) | |
output_f | floating point output buffer (or NULL) | |
samples | Number of samples to decode | |
track | index (starting with 0) |
The number of actually decoded samples (and EOF) can be obtained with lqt_last_audio_position
int lqt_decode_audio_raw | ( | quicktime_t * | file, | |
void * | output, | |||
long | samples, | |||
int | track | |||
) |
Decode audio in the native sampleformat of the codec.
file | A quicktime handle | |
output | An array of interleaved samples | |
samples | Number of samples to decode | |
track | Track index (starting with 0) |
The number of actually decoded samples (and EOF) can be obtained with lqt_last_audio_position
int lqt_get_audio_language | ( | quicktime_t * | file, | |
int | track, | |||
char * | language | |||
) |
Get the audio language.
file | A quicktime handle | |
track | Track index (starting with 0) | |
language | Returns ISO-639 Language code |
long lqt_audio_edit_list_total_entries | ( | quicktime_t * | file, | |
int | track | |||
) |
Get the number of audio track edit segments.
file | A quicktime handle | |
track | Audio track index (starting with 0) |
long lqt_audio_edit_duration | ( | quicktime_t * | file, | |
int | track, | |||
int | entry_index | |||
) |
Get the duration of a audio track edit segment.
file | A quicktime handle | |
track | Audio track index (starting with 0) | |
entry_index | Index into the edit segments |
long lqt_audio_edit_time | ( | quicktime_t * | file, | |
int | track, | |||
int | entry_index | |||
) |
Get the time offset of a audio track edit segment.
file | A quicktime handle | |
track | Audio track index (starting with 0) | |
entry_index | Index into the edit segments |
float lqt_audio_edit_rate | ( | quicktime_t * | file, | |
int | track, | |||
int | entry_index | |||
) |
Get the rate of a audio track edit segment.
file | A quicktime handle | |
track | Audio track index (starting with 0) | |
entry_index | Index into the edit segments |
int lqt_total_channels | ( | quicktime_t * | file | ) |
Get the total number of audio channels across all tracks.
file | A quicktime handle |
int64_t lqt_get_audio_pts_offset | ( | quicktime_t * | file, | |
int | track | |||
) |
Get an audio pts offset.
file | A quicktime handle | |
track | Track index (starting with 0) |