mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-23 17:14:23 +00:00
decklink: fix compilation on Linux
This commit is contained in:
parent
e246d92bd5
commit
1c73e77e32
7 changed files with 20 additions and 22 deletions
|
@ -17,13 +17,18 @@ libgstdecklink_la_SOURCES = \
|
||||||
gstdecklinksink.cpp \
|
gstdecklinksink.cpp \
|
||||||
gstdecklink.cpp \
|
gstdecklink.cpp \
|
||||||
capture.cpp \
|
capture.cpp \
|
||||||
DeckLinkAPIDispatch.cpp
|
linux/DeckLinkAPIDispatch.cpp
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
gstdecklink.h \
|
gstdecklink.h \
|
||||||
gstdecklinksrc.h \
|
gstdecklinksrc.h \
|
||||||
gstdecklinksink.h \
|
gstdecklinksink.h \
|
||||||
capture.h \
|
capture.h \
|
||||||
DeckLinkAPI.h \
|
linux/DeckLinkAPI.h \
|
||||||
LinuxCOM.h
|
linux/LinuxCOM.h
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
win/DeckLinkAPI.h \
|
||||||
|
win/DeckLinkAPIDispatch.cpp \
|
||||||
|
win/DeckLinkAPI_i.c
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
|
|
||||||
#include "gstdecklinksrc.h"
|
#include "gstdecklinksrc.h"
|
||||||
|
|
||||||
#include "DeckLinkAPI.h"
|
|
||||||
#include "capture.h"
|
#include "capture.h"
|
||||||
|
|
||||||
#define GST_CAT_DEFAULT gst_decklink_src_debug_category
|
#define GST_CAT_DEFAULT gst_decklink_src_debug_category
|
||||||
|
@ -99,7 +98,7 @@ HRESULT
|
||||||
if (g_timecodeFormat != 0) {
|
if (g_timecodeFormat != 0) {
|
||||||
IDeckLinkTimecode *timecode;
|
IDeckLinkTimecode *timecode;
|
||||||
if (videoFrame->GetTimecode (g_timecodeFormat, &timecode) == S_OK) {
|
if (videoFrame->GetTimecode (g_timecodeFormat, &timecode) == S_OK) {
|
||||||
timecode->GetString ((COMSTR_T)&timecodeString);
|
timecode->GetString (&timecodeString);
|
||||||
CONVERT_COM_STRING (timecodeString);
|
CONVERT_COM_STRING (timecodeString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
#ifndef __CAPTURE_H__
|
#ifndef __CAPTURE_H__
|
||||||
#define __CAPTURE_H__
|
#define __CAPTURE_H__
|
||||||
|
|
||||||
#include "DeckLinkAPI.h"
|
#include "gstdecklink.h"
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
|
|
||||||
};
|
|
||||||
|
|
||||||
class DeckLinkCaptureDelegate : public IDeckLinkInputCallback
|
class DeckLinkCaptureDelegate : public IDeckLinkInputCallback
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,9 +21,12 @@
|
||||||
#define _GST_DECKLINK_H_
|
#define _GST_DECKLINK_H_
|
||||||
|
|
||||||
#include <gst/gst.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>
|
#include <comutil.h>
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,6 @@
|
||||||
#include "gstdecklinksink.h"
|
#include "gstdecklinksink.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
|
|
||||||
};
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_decklink_sink_debug_category);
|
GST_DEBUG_CATEGORY_STATIC (gst_decklink_sink_debug_category);
|
||||||
#define GST_CAT_DEFAULT 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)
|
HRESULT Output::RenderAudioSamples (bool preroll)
|
||||||
{
|
{
|
||||||
unsigned long
|
uint32_t samplesWritten;
|
||||||
samplesWritten;
|
GstBuffer * buffer;
|
||||||
GstBuffer *
|
|
||||||
buffer;
|
|
||||||
|
|
||||||
// guint64 samplesToWrite;
|
// guint64 samplesToWrite;
|
||||||
|
|
||||||
|
@ -1099,7 +1094,9 @@ HRESULT Output::RenderAudioSamples (bool preroll)
|
||||||
// running = true;
|
// running = true;
|
||||||
} else {
|
} else {
|
||||||
g_mutex_lock (decklinksink->audio_mutex);
|
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);
|
0, 0, &samplesWritten);
|
||||||
|
|
||||||
buffer =
|
buffer =
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gstdecklink.h"
|
#include "gstdecklink.h"
|
||||||
#include "DeckLinkAPI.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gstdecklink.h"
|
#include "gstdecklink.h"
|
||||||
#include "DeckLinkAPI.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
GST_DEBUG_CATEGORY_EXTERN (gst_decklink_src_debug_category);
|
GST_DEBUG_CATEGORY_EXTERN (gst_decklink_src_debug_category);
|
||||||
|
|
Loading…
Reference in a new issue