decklink: fix compilation on Linux

This commit is contained in:
David Schleef 2011-08-21 18:44:43 -07:00
parent e246d92bd5
commit 1c73e77e32
7 changed files with 20 additions and 22 deletions

View file

@ -17,13 +17,18 @@ libgstdecklink_la_SOURCES = \
gstdecklinksink.cpp \
gstdecklink.cpp \
capture.cpp \
DeckLinkAPIDispatch.cpp
linux/DeckLinkAPIDispatch.cpp
noinst_HEADERS = \
gstdecklink.h \
gstdecklinksrc.h \
gstdecklinksink.h \
capture.h \
DeckLinkAPI.h \
LinuxCOM.h
linux/DeckLinkAPI.h \
linux/LinuxCOM.h
EXTRA_DIST = \
win/DeckLinkAPI.h \
win/DeckLinkAPIDispatch.cpp \
win/DeckLinkAPI_i.c

View file

@ -33,7 +33,6 @@
#include "gstdecklinksrc.h"
#include "DeckLinkAPI.h"
#include "capture.h"
#define GST_CAT_DEFAULT gst_decklink_src_debug_category
@ -99,7 +98,7 @@ HRESULT
if (g_timecodeFormat != 0) {
IDeckLinkTimecode *timecode;
if (videoFrame->GetTimecode (g_timecodeFormat, &timecode) == S_OK) {
timecode->GetString ((COMSTR_T)&timecodeString);
timecode->GetString (&timecodeString);
CONVERT_COM_STRING (timecodeString);
}
}

View file

@ -1,11 +1,7 @@
#ifndef __CAPTURE_H__
#define __CAPTURE_H__
#include "DeckLinkAPI.h"
extern "C" {
IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
};
#include "gstdecklink.h"
class DeckLinkCaptureDelegate : public IDeckLinkInputCallback
{

View file

@ -21,9 +21,12 @@
#define _GST_DECKLINK_H_
#include <gst/gst.h>
#include "DeckLinkAPI.h"
#ifdef G_OS_UNIX
#include "linux/DeckLinkAPI.h"
#endif
#ifdef _MSC_VER
#ifdef G_OS_WIN32
#include "win/DeckLinkAPI.h"
#include <comutil.h>

View file

@ -40,9 +40,6 @@
#include "gstdecklinksink.h"
#include <string.h>
extern "C" {
IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
};
GST_DEBUG_CATEGORY_STATIC (gst_decklink_sink_debug_category);
#define GST_CAT_DEFAULT gst_decklink_sink_debug_category
@ -1086,10 +1083,8 @@ HRESULT Output::ScheduledPlaybackHasStopped ()
HRESULT Output::RenderAudioSamples (bool preroll)
{
unsigned long
samplesWritten;
GstBuffer *
buffer;
uint32_t samplesWritten;
GstBuffer * buffer;
// guint64 samplesToWrite;
@ -1099,7 +1094,9 @@ HRESULT Output::RenderAudioSamples (bool preroll)
// running = true;
} else {
g_mutex_lock (decklinksink->audio_mutex);
decklinksink->output->ScheduleAudioSamples (GST_BUFFER_DATA (decklinksink->audio_buffer), GST_BUFFER_SIZE (decklinksink->audio_buffer) / 4, // 2 bytes per sample, stereo
decklinksink->output->ScheduleAudioSamples (
GST_BUFFER_DATA (decklinksink->audio_buffer),
GST_BUFFER_SIZE (decklinksink->audio_buffer) / 4, // 2 bytes per sample, stereo
0, 0, &samplesWritten);
buffer =

View file

@ -22,7 +22,6 @@
#include <gst/gst.h>
#include "gstdecklink.h"
#include "DeckLinkAPI.h"
G_BEGIN_DECLS

View file

@ -22,7 +22,6 @@
#include <gst/gst.h>
#include "gstdecklink.h"
#include "DeckLinkAPI.h"
G_BEGIN_DECLS
GST_DEBUG_CATEGORY_EXTERN (gst_decklink_src_debug_category);