History

avdevice/decklink: fix MSVC build issues

Purpose: Made minor changes to get the decklink avdevice code to build using Visual C++. Notes: Made changes to configure per Hendrik Leppkes's review of first and second versions of patch. Also made slight alterations per Marton Balint's reviews. Comments: -- configure: Added if enabled decklink section and setting decklink_indev_extralibs and decklink_outdev_extralibs here for both mingw and Windows. Also eliminated the setting of these variables in the mingw section earlier in the file. -- libavdevice/decklink_common.cpp: Switched the order of the include of libavformat/internal.h to workaround build issues with Visual C++. See comment in file for more details. -- libavdevice/decklink_dec.cpp: a) Rearranged the include of libavformat/internal.h (for reasons as described above). b) Made slight alteration to an argument for call to av_rescale_q() to workaround a compiler error with Visual C++. This appears to only be an issue when building C++ files with Visual C++. See comment in code for more details. -- libavdevice/decklink_enc.cpp: Rearranged the include of libavformat/internal.h (for reasons as described above).

Aaron Levinson committed 9 years ago

Commit 7f7ee861 parent f089e024 files · +35 −6Browse files

Showing the changes to libavdevice/decklink_common.cpp (1 of 4 files). Show all

Unified · Split

libavdevice/decklink_common.cpp+6−1
@@ -19,6 +19,12 @@ · 18 unmodified lines
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */20 */
21 21
22/* Include internal.h first to avoid conflict between winsock.h (used by
23 * DeckLink headers) and winsock2.h (used by libavformat) in MSVC++ builds */
24extern "C" {
25#include "libavformat/internal.h"
26}
27
22#include <DeckLinkAPI.h>28#include <DeckLinkAPI.h>
23#ifdef _WIN3229#ifdef _WIN32
24#include <DeckLinkAPI_i.c>30#include <DeckLinkAPI_i.c>
@@ -28,7 +34,6 @@ · 3 unmodified lines
28 34
29extern "C" {35extern "C" {
30#include "libavformat/avformat.h"36#include "libavformat/avformat.h"
31#include "libavformat/internal.h"
32#include "libavutil/imgutils.h"37#include "libavutil/imgutils.h"
33#include "libavutil/intreadwrite.h"38#include "libavutil/intreadwrite.h"
34#include "libavutil/bswap.h"39#include "libavutil/bswap.h"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t