diff options
| author | Victor Nova <lostfreeman@gmail.com> | 2026-01-27 10:27:36 -0500 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2026-01-27 17:43:41 +0100 |
| commit | 144b4815262e86eb521776123d5ff9b7f7f4750d (patch) | |
| tree | e18e92e908ba0cf26b6eb0cb81a32a0f2fc6b091 /include/encoder | |
| parent | f4ee71a094f9c6e0739199704268b79d6f3177ef (diff) | |
Add -write-first-frame-ts switch
Add -write-first-frame-ts switch that creates a .ts file next to the output
file with values from CLOCK_MONOTONIC and CLOCK_REALTIME corresponding to the
first frame to be able to synchronize video with other timestamped data.
Diffstat (limited to 'include/encoder')
| -rw-r--r-- | include/encoder/encoder.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/encoder/encoder.h b/include/encoder/encoder.h index 22f8e9d..7a808cc 100644 --- a/include/encoder/encoder.h +++ b/include/encoder/encoder.h @@ -20,6 +20,8 @@ typedef struct { AVStream *stream; int64_t start_pts; bool has_received_keyframe; + char *first_frame_ts_filepath; + bool first_frame_ts_written; } gsr_encoder_recording_destination; typedef struct { @@ -43,5 +45,6 @@ void gsr_encoder_receive_packets(gsr_encoder *self, AVCodecContext *codec_contex /* Returns the id to the recording destination, or -1 on error */ size_t gsr_encoder_add_recording_destination(gsr_encoder *self, AVCodecContext *codec_context, AVFormatContext *format_context, AVStream *stream, int64_t start_pts); bool gsr_encoder_remove_recording_destination(gsr_encoder *self, size_t id); +bool gsr_encoder_set_recording_destination_first_frame_ts_filepath(gsr_encoder *self, size_t id, const char *filepath); #endif /* GSR_ENCODER_H */ |
