diff --git a/deps/libff/libff/ff-callbacks.h b/deps/libff/libff/ff-callbacks.h index 5e545d708..d51dca6ab 100644 --- a/deps/libff/libff/ff-callbacks.h +++ b/deps/libff/libff/ff-callbacks.h @@ -21,6 +21,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + typedef bool (*ff_callback_frame)(struct ff_frame *frame, void *opaque); typedef bool (*ff_callback_format)(AVCodecContext *codec_context, void *opaque); typedef bool (*ff_callback_initialize)(void *opaque); @@ -44,3 +48,7 @@ bool ff_callbacks_frame_initialize(struct ff_frame *frame, struct ff_callbacks *callbacks); bool ff_callbacks_frame_free(struct ff_frame *frame, struct ff_callbacks *callbacks); + +#ifdef __cplusplus +} +#endif diff --git a/deps/libff/libff/ff-circular-queue.h b/deps/libff/libff/ff-circular-queue.h index 3d6da7532..74dd90d67 100644 --- a/deps/libff/libff/ff-circular-queue.h +++ b/deps/libff/libff/ff-circular-queue.h @@ -16,6 +16,10 @@ #pragma once +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -48,3 +52,7 @@ void *ff_circular_queue_peek_write(struct ff_circular_queue *cq); void ff_circular_queue_advance_write(struct ff_circular_queue *cq, void *item); void *ff_circular_queue_peek_read(struct ff_circular_queue *cq); void ff_circular_queue_advance_read(struct ff_circular_queue *cq); + +#ifdef __cplusplus +} +#endif diff --git a/deps/libff/libff/ff-clock.h b/deps/libff/libff/ff-clock.h index 07c83d4ba..c6a3bb68c 100644 --- a/deps/libff/libff/ff-clock.h +++ b/deps/libff/libff/ff-clock.h @@ -23,6 +23,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + enum ff_av_sync_type { AV_SYNC_AUDIO_MASTER, AV_SYNC_VIDEO_MASTER, @@ -55,3 +59,7 @@ void ff_clock_release(struct ff_clock **clock); int64_t ff_clock_start_time(struct ff_clock *clock); bool ff_clock_start(struct ff_clock *clock, enum ff_av_sync_type sync_type, const bool *abort); + +#ifdef __cplusplus +} +#endif diff --git a/deps/libff/libff/ff-decoder.h b/deps/libff/libff/ff-decoder.h index 6fb2bf012..730484765 100644 --- a/deps/libff/libff/ff-decoder.h +++ b/deps/libff/libff/ff-decoder.h @@ -24,6 +24,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct ff_decoder { AVCodecContext *codec; AVStream *stream; @@ -73,3 +77,7 @@ double ff_decoder_get_best_effort_pts(struct ff_decoder *decoder, bool ff_decoder_set_frame_drop_state(struct ff_decoder *decoder, int64_t start_time, int64_t pts); + +#ifdef __cplusplus +} +#endif diff --git a/deps/libff/libff/ff-demuxer.h b/deps/libff/libff/ff-demuxer.h index d6b20703f..48192f9b9 100644 --- a/deps/libff/libff/ff-demuxer.h +++ b/deps/libff/libff/ff-demuxer.h @@ -27,6 +27,10 @@ #include "ff-callbacks.h" +#ifdef __cplusplus +extern "C" { +#endif + struct ff_demuxer_options { int audio_packet_queue_size; @@ -82,3 +86,7 @@ void ff_demuxer_set_callbacks(struct ff_callbacks *callbacks, void *opaque); void ff_demuxer_flush(struct ff_demuxer *demuxer); + +#ifdef __cplusplus +} +#endif diff --git a/deps/libff/libff/ff-frame.h b/deps/libff/libff/ff-frame.h index 4c7f91d1f..8c9c6c1af 100644 --- a/deps/libff/libff/ff-frame.h +++ b/deps/libff/libff/ff-frame.h @@ -20,6 +20,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct ff_frame { AVFrame *frame; struct ff_clock *clock; @@ -28,3 +32,7 @@ struct ff_frame { }; typedef struct ff_frame ff_frame_t; + +#ifdef __cplusplus +} +#endif diff --git a/deps/libff/libff/ff-packet-queue.h b/deps/libff/libff/ff-packet-queue.h index 2bbf8e2aa..981509c52 100644 --- a/deps/libff/libff/ff-packet-queue.h +++ b/deps/libff/libff/ff-packet-queue.h @@ -26,6 +26,10 @@ #define FF_PACKET_EMPTY 0 #define FF_PACKET_SUCCESS 1 +#ifdef __cplusplus +extern "C" { +#endif + struct ff_packet { AVPacket base; ff_clock_t *clock; @@ -58,3 +62,7 @@ int packet_queue_get(struct ff_packet_queue *q, struct ff_packet *packet, bool block); void packet_queue_flush(struct ff_packet_queue *q); + +#ifdef __cplusplus +} +#endif diff --git a/deps/libff/libff/ff-threading.h b/deps/libff/libff/ff-threading.h index c5f3fc693..70fdd3b73 100644 --- a/deps/libff/libff/ff-threading.h +++ b/deps/libff/libff/ff-threading.h @@ -16,5 +16,13 @@ #pragma once +#ifdef __cplusplus +extern "C" { +#endif + long ff_atomic_inc_long(volatile long *val); long ff_atomic_dec_long(volatile long *val); + +#ifdef __cplusplus +} +#endif diff --git a/deps/libff/libff/ff-timer.h b/deps/libff/libff/ff-timer.h index 7dd6f1a06..b7b24a501 100644 --- a/deps/libff/libff/ff-timer.h +++ b/deps/libff/libff/ff-timer.h @@ -20,6 +20,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + typedef void (*ff_timer_callback)(void *opaque); struct ff_timer { @@ -43,3 +47,7 @@ bool ff_timer_init(struct ff_timer *timer, ff_timer_callback callback, void *opaque); void ff_timer_free(struct ff_timer *timer); void ff_timer_schedule(struct ff_timer *timer, uint64_t microseconds); + +#ifdef __cplusplus +} +#endif