Misc: Cleanup some includes

This commit is contained in:
Peter Keresztes Schmidt 2021-06-05 14:37:52 +02:00
parent 5c96eedac8
commit 0625f6ca1c
8 changed files with 15 additions and 45 deletions

View File

@ -26,15 +26,11 @@
#include "zm_storage.h"
#include "zm_stream.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
#ifdef __cplusplus
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavcodec/avcodec.h>
}
#endif
class EventStream : public StreamBase {
public:

View File

@ -24,7 +24,7 @@
#include "zm_utils.h"
extern "C" {
#include "libavutil/pixdesc.h"
#include <libavutil/pixdesc.h>
}
void log_libav_callback(void *ptr, int level, const char *fmt, va_list vargs) {

View File

@ -148,9 +148,7 @@ extern "C" {
( (LIBSWSCALE_VERSION_MICRO < 100 && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT(a, b, c) ) || \
(LIBSWSCALE_VERSION_MICRO >= 100 && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT(a, d, e) ) )
#ifdef __cplusplus
}
#endif
#if !LIBAVFORMAT_VERSION_CHECK(52, 107, 0, 107, 0)
#if defined(AVIO_WRONLY)
@ -197,8 +195,6 @@ enum _AVPIXELFORMAT GetFFMPEGPixelFormat(unsigned int p_colours, unsigned p_subp
* C++ friendly version of av_err2str taken from http://libav-users.943685.n4.nabble.com/Libav-user-g-4-7-2-fails-to-compile-av-err2str-td4656417.html.
* Newer g++ versions fail with "error: taking address of temporary array" when using native libav version.
*/
#ifdef __cplusplus
inline static const std::string av_make_error_string(int errnum) {
static char errbuf[AV_ERROR_MAX_STRING_SIZE];
#if LIBAVUTIL_VERSION_CHECK(50, 13, 0, 13, 0)
@ -220,8 +216,6 @@ enum _AVPIXELFORMAT GetFFMPEGPixelFormat(unsigned int p_colours, unsigned p_subp
int flags);
#endif
#endif // __cplusplus
#ifndef av_rescale_delta
/**
* Rescale a timestamp while preserving known durations.

View File

@ -26,12 +26,12 @@
#include "zm_utils.h"
extern "C" {
#include "libavutil/time.h"
#include <libavutil/time.h>
#if HAVE_LIBAVUTIL_HWCONTEXT_H
#include "libavutil/hwcontext.h"
#include <libavutil/hwcontext.h>
#endif
#include "libavutil/pixdesc.h"
#include <libavutil/pixdesc.h>
}
#include <string>

View File

@ -3,17 +3,11 @@
#include "zm_define.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
#ifdef __cplusplus
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavcodec/avcodec.h>
}
#endif
class FFmpeg_Input {

View File

@ -1,17 +1,11 @@
#ifndef ZM_FFMPEG_INPUT_H
#define ZM_FFMPEG_INPUT_H
#ifdef __cplusplus
extern "C" {
#endif
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
#ifdef __cplusplus
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavcodec/avcodec.h>
}
#endif
class FFmpeg_Output {

View File

@ -1,10 +1,6 @@
#ifndef ZM_SENDFILE_H
#define ZM_SENDFILE_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAVE_SENDFILE4_SUPPORT
#include <sys/sendfile.h>
int zm_sendfile(int out_fd, int in_fd, off_t *offset, size_t size) {
@ -37,8 +33,4 @@ int zm_sendfile(int out_fd, int in_fd, off_t *offset, off_t size) {
#error "Your platform does not support sendfile. Sorry."
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif // ZM_SENDFILE_H

View File

@ -24,7 +24,7 @@
#include "zm_monitor.h"
extern "C" {
#include "libavutil/time.h"
#include <libavutil/time.h>
}
/*