New upstream version 24.0.1+dfsg1
This commit is contained in:
parent
b14f9eae6d
commit
5a730d6ec3
842 changed files with 42245 additions and 33385 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#define LOG(level, message, ...) blog(level, "%s: " message, "decklink", ##__VA_ARGS__)
|
||||
#define LOG(level, message, ...) \
|
||||
blog(level, "%s: " message, "decklink", ##__VA_ARGS__)
|
||||
|
||||
#include <obs-module.h>
|
||||
#include "decklink-device.hpp"
|
||||
|
|
@ -13,25 +14,25 @@ class DeckLinkDeviceInstance : public IDeckLinkInputCallback {
|
|||
protected:
|
||||
struct obs_source_frame2 currentFrame;
|
||||
struct obs_source_audio currentPacket;
|
||||
DecklinkBase *decklink = nullptr;
|
||||
DeckLinkDevice *device = nullptr;
|
||||
DeckLinkDeviceMode *mode = nullptr;
|
||||
BMDVideoConnection videoConnection;
|
||||
BMDAudioConnection audioConnection;
|
||||
BMDDisplayMode displayMode = bmdModeNTSC;
|
||||
BMDPixelFormat pixelFormat = bmdFormat8BitYUV;
|
||||
video_colorspace colorSpace = VIDEO_CS_DEFAULT;
|
||||
video_colorspace activeColorSpace = VIDEO_CS_DEFAULT;
|
||||
video_range_type colorRange = VIDEO_RANGE_DEFAULT;
|
||||
ComPtr<IDeckLinkInput> input;
|
||||
DecklinkBase *decklink = nullptr;
|
||||
DeckLinkDevice *device = nullptr;
|
||||
DeckLinkDeviceMode *mode = nullptr;
|
||||
BMDVideoConnection videoConnection;
|
||||
BMDAudioConnection audioConnection;
|
||||
BMDDisplayMode displayMode = bmdModeNTSC;
|
||||
BMDPixelFormat pixelFormat = bmdFormat8BitYUV;
|
||||
video_colorspace colorSpace = VIDEO_CS_DEFAULT;
|
||||
video_colorspace activeColorSpace = VIDEO_CS_DEFAULT;
|
||||
video_range_type colorRange = VIDEO_RANGE_DEFAULT;
|
||||
ComPtr<IDeckLinkInput> input;
|
||||
ComPtr<IDeckLinkOutput> output;
|
||||
volatile long refCount = 1;
|
||||
int64_t audioOffset = 0;
|
||||
uint64_t nextAudioTS = 0;
|
||||
uint64_t lastVideoTS = 0;
|
||||
AudioRepacker *audioRepacker = nullptr;
|
||||
speaker_layout channelFormat = SPEAKERS_STEREO;
|
||||
bool swap;
|
||||
volatile long refCount = 1;
|
||||
int64_t audioOffset = 0;
|
||||
uint64_t nextAudioTS = 0;
|
||||
uint64_t lastVideoTS = 0;
|
||||
AudioRepacker *audioRepacker = nullptr;
|
||||
speaker_layout channelFormat = SPEAKERS_STEREO;
|
||||
bool swap;
|
||||
|
||||
IDeckLinkMutableVideoFrame *decklinkOutputFrame = nullptr;
|
||||
|
||||
|
|
@ -39,45 +40,63 @@ protected:
|
|||
void SetupVideoFormat(DeckLinkDeviceMode *mode_);
|
||||
|
||||
void HandleAudioPacket(IDeckLinkAudioInputPacket *audioPacket,
|
||||
const uint64_t timestamp);
|
||||
const uint64_t timestamp);
|
||||
void HandleVideoFrame(IDeckLinkVideoInputFrame *videoFrame,
|
||||
const uint64_t timestamp);
|
||||
const uint64_t timestamp);
|
||||
|
||||
public:
|
||||
DeckLinkDeviceInstance(DecklinkBase *decklink, DeckLinkDevice *device);
|
||||
virtual ~DeckLinkDeviceInstance();
|
||||
|
||||
inline DeckLinkDevice *GetDevice() const {return device;}
|
||||
inline DeckLinkDevice *GetDevice() const { return device; }
|
||||
inline long long GetActiveModeId() const
|
||||
{
|
||||
return mode ? mode->GetId() : 0;
|
||||
}
|
||||
|
||||
inline BMDPixelFormat GetActivePixelFormat() const {return pixelFormat;}
|
||||
inline video_colorspace GetActiveColorSpace() const {return colorSpace;}
|
||||
inline video_range_type GetActiveColorRange() const {return colorRange;}
|
||||
inline speaker_layout GetActiveChannelFormat() const {return channelFormat;}
|
||||
inline bool GetActiveSwapState() const {return swap;}
|
||||
inline BMDVideoConnection GetVideoConnection() const {return videoConnection;}
|
||||
inline BMDAudioConnection GetAudioConnection() const {return audioConnection;}
|
||||
inline BMDPixelFormat GetActivePixelFormat() const
|
||||
{
|
||||
return pixelFormat;
|
||||
}
|
||||
inline video_colorspace GetActiveColorSpace() const
|
||||
{
|
||||
return colorSpace;
|
||||
}
|
||||
inline video_range_type GetActiveColorRange() const
|
||||
{
|
||||
return colorRange;
|
||||
}
|
||||
inline speaker_layout GetActiveChannelFormat() const
|
||||
{
|
||||
return channelFormat;
|
||||
}
|
||||
inline bool GetActiveSwapState() const { return swap; }
|
||||
inline BMDVideoConnection GetVideoConnection() const
|
||||
{
|
||||
return videoConnection;
|
||||
}
|
||||
inline BMDAudioConnection GetAudioConnection() const
|
||||
{
|
||||
return audioConnection;
|
||||
}
|
||||
|
||||
inline DeckLinkDeviceMode *GetMode() const {return mode;}
|
||||
inline DeckLinkDeviceMode *GetMode() const { return mode; }
|
||||
|
||||
bool StartCapture(DeckLinkDeviceMode *mode,
|
||||
BMDVideoConnection bmdVideoConnection,
|
||||
BMDAudioConnection bmdAudioConnection);
|
||||
BMDVideoConnection bmdVideoConnection,
|
||||
BMDAudioConnection bmdAudioConnection);
|
||||
bool StopCapture(void);
|
||||
|
||||
bool StartOutput(DeckLinkDeviceMode *mode_);
|
||||
bool StopOutput(void);
|
||||
|
||||
HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(
|
||||
IDeckLinkVideoInputFrame *videoFrame,
|
||||
IDeckLinkAudioInputPacket *audioPacket);
|
||||
HRESULT STDMETHODCALLTYPE
|
||||
VideoInputFrameArrived(IDeckLinkVideoInputFrame *videoFrame,
|
||||
IDeckLinkAudioInputPacket *audioPacket);
|
||||
HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(
|
||||
BMDVideoInputFormatChangedEvents events,
|
||||
IDeckLinkDisplayMode *newMode,
|
||||
BMDDetectedVideoInputFormatFlags detectedSignalFlags);
|
||||
BMDVideoInputFormatChangedEvents events,
|
||||
IDeckLinkDisplayMode *newMode,
|
||||
BMDDetectedVideoInputFormatFlags detectedSignalFlags);
|
||||
|
||||
ULONG STDMETHODCALLTYPE AddRef(void);
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue