From 61fb70c3866b19dccf473ad4e5ede79d117e8e1c Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Tue, 1 Dec 2015 20:58:51 -0800
Subject: [PATCH] decklink: Header cleanup

This commit cleans up the decklink files' header usage so that they pass
checkheaders.
---
 libavdevice/decklink_common.cpp | 4 ----
 libavdevice/decklink_common.h   | 8 +++++++-
 libavdevice/decklink_common_c.h | 2 ++
 libavdevice/decklink_dec.cpp    | 4 ----
 libavdevice/decklink_dec.h      | 2 ++
 libavdevice/decklink_enc.cpp    | 4 ----
 libavdevice/decklink_enc.h      | 2 ++
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index ac7964cd171..58502eecece 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -26,11 +26,7 @@
 #include <DeckLinkAPIDispatch.cpp>
 #endif
 
-#include <pthread.h>
-#include <semaphore.h>
-
 extern "C" {
-#include "libavformat/avformat.h"
 #include "libavformat/internal.h"
 #include "libavutil/imgutils.h"
 }
diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index 3bc30f062ce..c7e3ef2e395 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -19,9 +19,15 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <DeckLinkAPIVersion.h>
+#include <pthread.h>
+#include <semaphore.h>
+#include <DeckLinkAPI.h>
+
+extern "C" {
+#include "libavformat/avformat.h"
 
 #include "decklink_common_c.h"
+}
 
 class decklink_output_callback;
 class decklink_input_callback;
diff --git a/libavdevice/decklink_common_c.h b/libavdevice/decklink_common_c.h
index fb2b788628d..3644fb4dd89 100644
--- a/libavdevice/decklink_common_c.h
+++ b/libavdevice/decklink_common_c.h
@@ -19,6 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/log.h"
+
 struct decklink_cctx {
     const AVClass *cclass;
 
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 6c5bc5dbed2..4bbc92edea8 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -21,11 +21,7 @@
 
 #include <DeckLinkAPI.h>
 
-#include <pthread.h>
-#include <semaphore.h>
-
 extern "C" {
-#include "libavformat/avformat.h"
 #include "libavformat/internal.h"
 #include "libavutil/imgutils.h"
 }
diff --git a/libavdevice/decklink_dec.h b/libavdevice/decklink_dec.h
index 6bd9226cd0e..c499bc9adfd 100644
--- a/libavdevice/decklink_dec.h
+++ b/libavdevice/decklink_dec.h
@@ -23,6 +23,8 @@
 extern "C" {
 #endif
 
+#include "libavformat/avformat.h"
+
 int ff_decklink_read_header(AVFormatContext *avctx);
 int ff_decklink_read_packet(AVFormatContext *avctx, AVPacket *pkt);
 int ff_decklink_read_close(AVFormatContext *avctx);
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index 6c5450f4ec5..334c3dcd33e 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -21,11 +21,7 @@
 
 #include <DeckLinkAPI.h>
 
-#include <pthread.h>
-#include <semaphore.h>
-
 extern "C" {
-#include "libavformat/avformat.h"
 #include "libavformat/internal.h"
 #include "libavutil/imgutils.h"
 }
diff --git a/libavdevice/decklink_enc.h b/libavdevice/decklink_enc.h
index 6086947e6c0..23c59a2041d 100644
--- a/libavdevice/decklink_enc.h
+++ b/libavdevice/decklink_enc.h
@@ -23,6 +23,8 @@
 extern "C" {
 #endif
 
+#include "libavformat/avformat.h"
+
 int ff_decklink_write_header(AVFormatContext *avctx);
 int ff_decklink_write_packet(AVFormatContext *avctx, AVPacket *pkt);
 int ff_decklink_write_trailer(AVFormatContext *avctx);
-- 
GitLab