Functions | |
long | quicktime_video_length (quicktime_t *file, int track) |
Get the video length. More... | |
long | quicktime_video_position (quicktime_t *file, int track) |
Get the video position. More... | |
int | quicktime_video_tracks (quicktime_t *file) |
Get the number of video tracks. More... | |
int | quicktime_has_video (quicktime_t *file) |
Check if a file has at least one video track. More... | |
int | quicktime_video_width (quicktime_t *file, int track) |
Get the width of a video track. More... | |
int | quicktime_video_height (quicktime_t *file, int track) |
Get the height of a video track. More... | |
int | quicktime_video_depth (quicktime_t *file, int track) |
Get the depth of a video track. More... | |
double | quicktime_frame_rate (quicktime_t *file, int track) |
Get the framerate of a video track. More... | |
char* | quicktime_video_compressor (quicktime_t *file, int track) |
Get the four character code of a video track. More... | |
long | quicktime_frame_size (quicktime_t *file, long frame, int track) |
Get the compressed size of frame in a video track. More... | |
int | quicktime_set_video_position (quicktime_t *file, int64_t frame, int track) |
Seek to a specific video frame. More... | |
long | quicktime_read_frame (quicktime_t *file, unsigned char *video_buffer, int track) |
Read a compressed video frame. More... | |
int | quicktime_supported_video (quicktime_t *file, int track) |
Check if a video track is supported by libquicktime. More... | |
int | quicktime_reads_cmodel (quicktime_t *file, int colormodel, int track) |
Check if a colormodel is supported for decoding. More... | |
int | quicktime_decode_video (quicktime_t *file, unsigned char **row_pointers, int track) |
Decode a video frame in BC_RGB888. More... | |
long | quicktime_decode_scaled (quicktime_t *file, int in_x, int in_y, int in_w, int in_h, int out_w, int out_h, int color_model, unsigned char **row_pointers, int track) |
Decode aand optionally scale a video frame. 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... | |
lqt_interlace_mode_t | lqt_get_interlace_mode (quicktime_t *file, int track) |
Get the interlace mode. More... | |
lqt_chroma_placement_t | lqt_get_chroma_placement (quicktime_t *file, int track) |
Get the chroma placement. More... | |
int | lqt_get_decoder_colormodel (quicktime_t *file, int track) |
Get the native colormodel of the decoder. 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_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_seek_video (quicktime_t *file, int track, int64_t time) |
Seek to a specific video time. More... |
The video API changed a lot during the last years (causing lot of confusion), so here is the preferred way: First get the number of video tracks with quicktime_video_tracks. Then for each track you want to decode, use quicktime_supported_video to verify that a codec is available. Then for each track, get the frame size with quicktime_video_width and quicktime_video_height . The framerate is only exact when handled as a rational number. Thus, you'll need 2 functions lqt_video_time_scale and lqt_frame_duration . The framerate in frames/sec becomes time_scale/frame_duration. Further format information can be obtained with lqt_get_pixel_aspect, lqt_get_interlace_mode and lqt_get_chroma_placement.
A very important thing is the colormodel (see Color handling): First obtain the colormodel used natively by the codec with lqt_get_cmodel. Your application might or might not support all colormodels, which exist in libquicktime. The more colormodels you can handle yourself, the better, since libquicktimes built in colormodel converter is not the best. Thus, it's the best idea to pack all colormodels you can handle yourself into an array, and call lqt_get_best_colormodel to get the best colormodel. After you figured out, which colormodel you use, tell this to libquicktime with lqt_set_cmodel.
When decoding frames, libquicktime by default assumes, that the frames you pass to it have no padding bytes between the scanlines. Some APIs however padd scanlines to certain boundaries. If this is the case, you must tell this to libquicktime by calling lqt_set_row_span and lqt_set_row_span_uv (for planar formats).
Then, for each frame, it's wise to get the timestamp with lqt_frame_time before decoding it. This will make sure, that you'll support tracks with nonconstant framerates. The actual decoding then should happen with lqt_decode_video.
|
Get the video length.
|
|
Get the video position.
|
|
Get the number of video tracks.
|
|
Check if a file has at least one video track.
|
|
Get the width of a video track.
|
|
Get the height of a video track.
|
|
Get the depth of a video track.
To get some better informations about the pixel format, a codec will deliver, use lqt_get_cmodel or (better) lqt_get_decoder_colormodel . |
|
Get the framerate of a video track.
To get the framerate as a rational number (and check if it's constant), use lqt_frame_duration and lqt_video_time_scale . |
|
Get the four character code of a video track.
|
|
Get the compressed size of frame in a video track.
|
|
Seek to a specific video frame.
|
|
Read a compressed video frame.
|
|
Check if a video track is supported by libquicktime.
|
|
Check if a colormodel is supported for decoding.
|
|
Decode a video frame in BC_RGB888.
|
|
Decode aand optionally scale a video frame.
|
|
Get the pixel aspect ratio of a video track.
|
|
Get the interlace mode.
|
|
Get the chroma placement.
|
|
Get the native colormodel of the decoder.
|
|
Get the timestamp of the next frame to be decoded.
|
|
Decode one video frame.
|
|
Read a compressed video frame.
|
|
Get the duration of the NEXT frame to be decoded.
|
|
Get the timescale of the track.
|
|
Get the duration of a video track.
|
|
Seek to a specific video time.
|