|
gavl
|
Data Structures | |
| struct | gavl_frame_table_t |
| frame table structure More... | |
Functions | |
| GAVL_PUBLIC gavl_frame_table_t * | gavl_frame_table_create () |
| Create a frame table. | |
| GAVL_PUBLIC gavl_frame_table_t * | gavl_frame_table_create_audio (int samplerate, int64_t offset, int64_t duration, gavl_timecode_format_t *fmt_ret) |
| Create a frame table for an audio stream. | |
| GAVL_PUBLIC gavl_frame_table_t * | gavl_frame_table_create_cfr (int64_t offset, int64_t frame_duration, int64_t num_frames, gavl_timecode_t start_timecode) |
| Create a frame table for constant framerate video. | |
| GAVL_PUBLIC gavl_frame_table_t * | gavl_frame_table_copy (const gavl_frame_table_t *tab) |
| Copy a frame table to another. | |
| GAVL_PUBLIC void | gavl_frame_table_destroy (gavl_frame_table_t *t) |
| Destroy a frame table and free all memory. | |
| GAVL_PUBLIC void | gavl_frame_table_append_entry (gavl_frame_table_t *t, int64_t duration) |
| Append an entry. | |
| GAVL_PUBLIC void | gavl_frame_table_append_timecode (gavl_frame_table_t *t, int64_t pts, gavl_timecode_t tc) |
| Append a timecodes. | |
| GAVL_PUBLIC int64_t | gavl_frame_table_frame_to_time (const gavl_frame_table_t *t, int64_t frame, int *duration) |
| Convert a frame index to a timestamp. | |
| GAVL_PUBLIC int64_t | gavl_frame_table_time_to_frame (const gavl_frame_table_t *t, int64_t time, int64_t *start_time) |
| Convert a timestamp to a frame index. | |
| GAVL_PUBLIC gavl_timecode_t | gavl_frame_table_time_to_timecode (const gavl_frame_table_t *t, int64_t time, int64_t *start_time, const gavl_timecode_format_t *fmt) |
| Convert a timestamp to a timecode. | |
| GAVL_PUBLIC int64_t | gavl_frame_table_timecode_to_time (const gavl_frame_table_t *t, gavl_timecode_t tc, const gavl_timecode_format_t *fmt) |
| Convert a timecode to a timestamp. | |
| GAVL_PUBLIC gavl_timecode_t | gavl_frame_table_frame_to_timecode (const gavl_frame_table_t *t, int64_t frame, int64_t *start_time, const gavl_timecode_format_t *fmt) |
| Convert a frame index to a timecode. | |
| GAVL_PUBLIC int64_t | gavl_frame_table_num_frames (const gavl_frame_table_t *t) |
| get the total number of frames | |
| GAVL_PUBLIC int64_t | gavl_frame_table_duration (const gavl_frame_table_t *t) |
| get the total duration of all frames | |
| GAVL_PUBLIC int64_t | gavl_frame_table_end_time (const gavl_frame_table_t *t) |
| get the end time of the last frame | |
| GAVL_PUBLIC int | gavl_frame_table_save (const gavl_frame_table_t *t, const char *filename) |
| Save a frame table to a file. | |
| GAVL_PUBLIC gavl_frame_table_t * | gavl_frame_table_load (const char *filename) |
| Load a frame table from a file. | |
| GAVL_PUBLIC void | gavl_frame_table_dump (const gavl_frame_table_t *t) |
| Dump a frame table to stderr for debugging. | |
This is a table, which tolds the complete timing information of a video sequence. If is meant for e.g. for editing applications, where the complete timing must be known in advance.
A frame table is always associated with a gavl_video_format_t, which must be passed to most functions.
| GAVL_PUBLIC gavl_frame_table_t * gavl_frame_table_create | ( | ) |
Create a frame table.
Since 1.1.2.
| GAVL_PUBLIC gavl_frame_table_t * gavl_frame_table_create_audio | ( | int | samplerate, |
| int64_t | offset, | ||
| int64_t | duration, | ||
| gavl_timecode_format_t * | fmt_ret ) |
Create a frame table for an audio stream.
| samplerate | Samplerate for this stream |
| offset | PTS offset of this stream in samples |
| duration | Sample count |
| fmt_ret | If non-null, returns the timecode format |
Since 1.1.2.
| GAVL_PUBLIC gavl_frame_table_t * gavl_frame_table_create_cfr | ( | int64_t | offset, |
| int64_t | frame_duration, | ||
| int64_t | num_frames, | ||
| gavl_timecode_t | start_timecode ) |
Create a frame table for constant framerate video.
| offset | Timestamp of the first frame |
| frame_duration | Duration of each frame |
| num_frames | Number of frames |
| start_timecode | Timecode of the first frame (or GAVL_TIMECODE_UNDEFINED) |
Since 1.1.2.
| GAVL_PUBLIC gavl_frame_table_t * gavl_frame_table_copy | ( | const gavl_frame_table_t * | tab | ) |
Copy a frame table to another.
| tab | A frame table |
Since 1.1.2.
| GAVL_PUBLIC void gavl_frame_table_destroy | ( | gavl_frame_table_t * | t | ) |
Destroy a frame table and free all memory.
| t | A frame table |
Since 1.1.2.
| GAVL_PUBLIC void gavl_frame_table_append_entry | ( | gavl_frame_table_t * | t, |
| int64_t | duration ) |
Append an entry.
| t | A frame table |
| duration | The duration of this frame |
Since 1.1.2.
| GAVL_PUBLIC void gavl_frame_table_append_timecode | ( | gavl_frame_table_t * | t, |
| int64_t | pts, | ||
| gavl_timecode_t | tc ) |
Append a timecodes.
| t | A frame table |
| pts | Presentation time of that frame |
| tc | Timecode of that frame |
Since 1.1.2.
| GAVL_PUBLIC int64_t gavl_frame_table_frame_to_time | ( | const gavl_frame_table_t * | t, |
| int64_t | frame, | ||
| int * | duration ) |
Convert a frame index to a timestamp.
| t | A frame table |
| frame | Frame index (starting with zero) |
| duration | If non NULL, returns the duration of that frame |
Since 1.1.2.
| GAVL_PUBLIC int64_t gavl_frame_table_time_to_frame | ( | const gavl_frame_table_t * | t, |
| int64_t | time, | ||
| int64_t * | start_time ) |
Convert a timestamp to a frame index.
| t | A frame table |
| time | Time in stream timescale |
| start_time | If non NULL, returns the start time of that frame |
Since 1.1.2.
| GAVL_PUBLIC gavl_timecode_t gavl_frame_table_time_to_timecode | ( | const gavl_frame_table_t * | t, |
| int64_t | time, | ||
| int64_t * | start_time, | ||
| const gavl_timecode_format_t * | fmt ) |
Convert a timestamp to a timecode.
| t | A frame table |
| time | Time in stream timescale |
| start_time | If non NULL, returns the start time of that frame |
| fmt | Timecode format |
Since 1.1.2.
| GAVL_PUBLIC int64_t gavl_frame_table_timecode_to_time | ( | const gavl_frame_table_t * | t, |
| gavl_timecode_t | tc, | ||
| const gavl_timecode_format_t * | fmt ) |
Convert a timecode to a timestamp.
| t | A frame table |
| tc | Timecode |
| fmt | Timecode format |
Since 1.1.2.
| GAVL_PUBLIC gavl_timecode_t gavl_frame_table_frame_to_timecode | ( | const gavl_frame_table_t * | t, |
| int64_t | frame, | ||
| int64_t * | start_time, | ||
| const gavl_timecode_format_t * | fmt ) |
Convert a frame index to a timecode.
| t | A frame table |
| frame | Frame index |
| start_time | If non NULL, returns the start time of that frame |
| fmt | Timecode format |
Since 1.1.2.
| GAVL_PUBLIC int64_t gavl_frame_table_num_frames | ( | const gavl_frame_table_t * | t | ) |
get the total number of frames
| t | A frame table |
Since 1.1.2.
| GAVL_PUBLIC int64_t gavl_frame_table_duration | ( | const gavl_frame_table_t * | t | ) |
get the total duration of all frames
| t | A frame table |
Since 1.1.2.
| GAVL_PUBLIC int64_t gavl_frame_table_end_time | ( | const gavl_frame_table_t * | t | ) |
get the end time of the last frame
| t | A frame table |
Since 1.1.2.
| GAVL_PUBLIC int gavl_frame_table_save | ( | const gavl_frame_table_t * | t, |
| const char * | filename ) |
Save a frame table to a file.
| t | Tab frame table |
| filename | Filename |
Since 1.1.2.
| GAVL_PUBLIC gavl_frame_table_t * gavl_frame_table_load | ( | const char * | filename | ) |
Load a frame table from a file.
| filename | Filename |
Since 1.1.2.
| GAVL_PUBLIC void gavl_frame_table_dump | ( | const gavl_frame_table_t * | t | ) |
Dump a frame table to stderr for debugging.
| t | A frame table |
Since 1.1.2.