call C header file from cpp

dev
xufulong 3 years ago
parent ad7bfddc9e
commit 015e310d6a
  1. 8
      app/src/main/cpp/ffmpeg/cmdutils.cpp
  2. 6
      app/src/main/cpp/ffmpeg/ffmpeg.h
  3. 8
      app/src/main/cpp/ffmpeg/ffmpeg_filter.cpp
  4. 8
      app/src/main/cpp/ffmpeg/ffmpeg_hw.cpp
  5. 8
      app/src/main/cpp/ffmpeg/ffmpeg_opt.cpp

@ -28,7 +28,9 @@
/* Include only the enabled headers since some compilers (namely, Sun /* Include only the enabled headers since some compilers (namely, Sun
Studio) will not omit unused inline functions and create undefined Studio) will not omit unused inline functions and create undefined
references to libraries that are not being built. */ references to libraries that are not being built. */
#ifdef __cplusplus
extern "C" {
#endif
#include "config.h" #include "config.h"
#include "compat/va_copy.h" #include "compat/va_copy.h"
#include "libavformat/avformat.h" #include "libavformat/avformat.h"
@ -53,6 +55,10 @@
#include "libavutil/ffversion.h" #include "libavutil/ffversion.h"
#include "libavutil/version.h" #include "libavutil/version.h"
#include "cmdutils.h" #include "cmdutils.h"
#ifdef __cplusplus
}
#endif
#if CONFIG_NETWORK #if CONFIG_NETWORK
#include "libavformat/network.h" #include "libavformat/network.h"
#endif #endif

@ -22,6 +22,9 @@
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "cmdutils.h" #include "cmdutils.h"
#include "config.h" #include "config.h"
@ -45,6 +48,9 @@
#include "libswresample/swresample.h" #include "libswresample/swresample.h"
#ifdef __cplusplus
}
#endif
#define VSYNC_AUTO -1 #define VSYNC_AUTO -1
#define VSYNC_PASSTHROUGH 0 #define VSYNC_PASSTHROUGH 0
#define VSYNC_CFR 1 #define VSYNC_CFR 1

@ -21,7 +21,9 @@
#include <stdint.h> #include <stdint.h>
#include "ffmpeg.h" #include "ffmpeg.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "libavfilter/avfilter.h" #include "libavfilter/avfilter.h"
#include "libavfilter/buffersink.h" #include "libavfilter/buffersink.h"
#include "libavfilter/buffersrc.h" #include "libavfilter/buffersrc.h"
@ -36,7 +38,9 @@
#include "libavutil/pixfmt.h" #include "libavutil/pixfmt.h"
#include "libavutil/imgutils.h" #include "libavutil/imgutils.h"
#include "libavutil/samplefmt.h" #include "libavutil/samplefmt.h"
#ifdef __cplusplus
}
#endif
static const enum AVPixelFormat *get_compliance_unofficial_pix_fmts(enum AVCodecID codec_id, const enum AVPixelFormat default_formats[]) static const enum AVPixelFormat *get_compliance_unofficial_pix_fmts(enum AVCodecID codec_id, const enum AVPixelFormat default_formats[])
{ {
static const enum AVPixelFormat mjpeg_formats[] = static const enum AVPixelFormat mjpeg_formats[] =

@ -17,9 +17,13 @@
*/ */
#include <string.h> #include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "libavutil/avstring.h" #include "libavutil/avstring.h"
#ifdef __cplusplus
}
#endif
#include "ffmpeg.h" #include "ffmpeg.h"
static int nb_hw_devices; static int nb_hw_devices;

@ -22,7 +22,9 @@
#include "ffmpeg.h" #include "ffmpeg.h"
#include "cmdutils.h" #include "cmdutils.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "libavformat/avformat.h" #include "libavformat/avformat.h"
#include "libavcodec/avcodec.h" #include "libavcodec/avcodec.h"
@ -40,7 +42,9 @@
#include "libavutil/parseutils.h" #include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h" #include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h" #include "libavutil/pixfmt.h"
#ifdef __cplusplus
}
#endif
#define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass" #define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass"
#define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)\ #define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)\

Loading…
Cancel
Save