mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 13:40:21 +00:00
Silenced some compiler warnings
This commit is contained in:
@@ -4,9 +4,10 @@ CC = @CC@
|
||||
CXX = @CXX@
|
||||
QMAKE = @QMAKE@
|
||||
LINKER = @LINKER@
|
||||
CFLAGS = -g @DEFS@ @CFLAGS@ @X_CFLAGS@ -DPATH_PREFIX=@prefix@ -DLIB_DIR=@libdir@ -msse2
|
||||
COMMON_FLAGS = -g @DEFS@ -DPATH_PREFIX=@prefix@ -DLIB_DIR=@libdir@ -Wall -Wextra -Wpointer-arith -msse2
|
||||
CFLAGS = @CFLAGS@ @X_CFLAGS@ $(COMMON_FLAGS)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXXFLAGS = -g @DEFS@ @CXXFLAGS@ -DPATH_PREFIX=@prefix@ -DLIB_DIR=@libdir@ -Wextra -Wpointer-arith -msse2
|
||||
CXXFLAGS = @CXXFLAGS@ $(COMMON_FLAGS)
|
||||
NVCCFLAGS = @NVCCFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS += @LIBS@ @JACK_TRANS_LIB@ @MATHLIBS@ @COREAUDIO_LIB@ \
|
||||
|
||||
@@ -158,7 +158,7 @@ static int blackmagic_api_version_check(STRING *current_version)
|
||||
#ifdef WIN32
|
||||
result = CoCreateInstance(CLSID_CDeckLinkAPIInformation, NULL, CLSCTX_ALL,
|
||||
IID_IDeckLinkAPIInformation, (void **) &APIInformation);
|
||||
|
||||
if(FAILED(result))
|
||||
#else
|
||||
APIInformation = CreateDeckLinkAPIInformationInstance();
|
||||
if(APIInformation == NULL)
|
||||
@@ -167,9 +167,8 @@ static int blackmagic_api_version_check(STRING *current_version)
|
||||
return FALSE;
|
||||
}
|
||||
int64_t value;
|
||||
HRESULT res;
|
||||
res = APIInformation->GetInt(BMDDeckLinkAPIVersion, &value);
|
||||
if(res != S_OK) {
|
||||
result = APIInformation->GetInt(BMDDeckLinkAPIVersion, &value);
|
||||
if(result != S_OK) {
|
||||
APIInformation->Release();
|
||||
return FALSE;
|
||||
}
|
||||
@@ -259,7 +258,7 @@ void *decklink_playback_init(char *index_str)
|
||||
HRESULT result;
|
||||
IDeckLinkConfiguration* deckLinkConfiguration = NULL;
|
||||
// for Decklink Studio which has switchable XLR - analog 3 and 4 or AES/EBU 3,4 and 5,6
|
||||
BMDAudioOutputAnalogAESSwitch audioConnection = (BMDAudioOutputAnalogAESSwitch) 0;
|
||||
//BMDAudioOutputAnalogAESSwitch audioConnection = (BMDAudioOutputAnalogAESSwitch) 0;
|
||||
int cardIdx = 0;
|
||||
int dnum = 0;
|
||||
|
||||
@@ -373,7 +372,7 @@ void *decklink_playback_init(char *index_str)
|
||||
|
||||
IDeckLinkDisplayModeIterator *displayModeIterator;
|
||||
IDeckLinkDisplayMode* deckLinkDisplayMode;
|
||||
BMDDisplayMode displayMode = bmdModeUnknown;
|
||||
//BMDDisplayMode displayMode = bmdModeUnknown;
|
||||
int width, height;
|
||||
|
||||
// Populate the display mode combo with a list of display modes supported by the installed DeckLink card
|
||||
@@ -383,11 +382,15 @@ void *decklink_playback_init(char *index_str)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// pick first display mode, no matter which it is
|
||||
if(displayModeIterator->Next(&deckLinkDisplayMode) == S_OK)
|
||||
{
|
||||
width = deckLinkDisplayMode->GetWidth();
|
||||
height = deckLinkDisplayMode->GetHeight();
|
||||
deckLinkDisplayMode->GetFrameRate(&s->frameRateDuration, &s->frameRateScale);
|
||||
} else {
|
||||
fprintf(stderr, "[decklink] Fatal: cannot get any display mode.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
s->frames = 0;
|
||||
|
||||
@@ -139,34 +139,37 @@ static const struct bluefish_frame_mode_t bluefish_frame_modes[] = {
|
||||
static const int bluefish_frame_modes_count = sizeof(bluefish_frame_modes) /
|
||||
sizeof(struct bluefish_frame_mode_t);
|
||||
|
||||
static void *page_aligned_alloc(size_t size);
|
||||
static void page_aligned_free(void *ptr);
|
||||
static uint32_t GetNumberOfAudioSamplesPerFrame(uint32_t VideoMode, uint32_t FrameNumber);
|
||||
static void *page_aligned_alloc(size_t size) __attribute__((unused));
|
||||
static void page_aligned_free(void *ptr) __attribute__((unused));
|
||||
static uint32_t GetNumberOfAudioSamplesPerFrame(uint32_t VideoMode, uint32_t FrameNumber)
|
||||
__attribute__((unused));
|
||||
|
||||
#ifdef HAVE_LINUX
|
||||
typedef void OVERLAPPED;
|
||||
|
||||
static void bfcDestroy(CBLUEVELVET_H pSDK);
|
||||
static int bfcQueryCardProperty32(CBLUEVELVET_H pSDK, int property, uint32_t &value);
|
||||
static int bfcSetCardProperty32(CBLUEVELVET_H pSDK, int property, uint32_t &value);
|
||||
static int bfcEnumerate(CBLUEVELVET_H pSDK, int &iDevices);
|
||||
static int bfcAttach(CBLUEVELVET_H pSDK, int &iDeviceId);
|
||||
static int bfcDetach(CBLUEVELVET_H pSDK);
|
||||
static int bfcVideoCaptureStart(CBLUEVELVET_H pSDK);
|
||||
static int bfcVideoCaptureStop(CBLUEVELVET_H pSDK);
|
||||
static int bfcVideoPlaybackStart(CBLUEVELVET_H pSDK, int iStep, int iLoop);
|
||||
static int bfcVideoPlaybackStop(CBLUEVELVET_H pSDK, int iWait, int iFlush);
|
||||
static int bfcWaitVideoInputSync(CBLUEVELVET_H pSDK, unsigned long ulUpdateType, unsigned long& ulFieldCount);
|
||||
static int bfcWaitVideoOutputSync(CBLUEVELVET_H pSDK, unsigned long ulUpdateType, unsigned long& ulFieldCount);
|
||||
static int bfcQueryCardType(CBLUEVELVET_H pSDK);
|
||||
static void bfcDestroy(CBLUEVELVET_H pSDK) __attribute__((unused));
|
||||
static int bfcQueryCardProperty32(CBLUEVELVET_H pSDK, int property, uint32_t &value) __attribute__((unused));
|
||||
static int bfcSetCardProperty32(CBLUEVELVET_H pSDK, int property, uint32_t &value) __attribute__((unused));
|
||||
static int bfcEnumerate(CBLUEVELVET_H pSDK, int &iDevices) __attribute__((unused));
|
||||
static int bfcAttach(CBLUEVELVET_H pSDK, int &iDeviceId) __attribute__((unused));
|
||||
static int bfcDetach(CBLUEVELVET_H pSDK) __attribute__((unused));
|
||||
static int bfcVideoCaptureStart(CBLUEVELVET_H pSDK) __attribute__((unused));
|
||||
static int bfcVideoCaptureStop(CBLUEVELVET_H pSDK) __attribute__((unused));
|
||||
static int bfcVideoPlaybackStart(CBLUEVELVET_H pSDK, int iStep, int iLoop) __attribute__((unused));
|
||||
static int bfcVideoPlaybackStop(CBLUEVELVET_H pSDK, int iWait, int iFlush) __attribute__((unused));
|
||||
static int bfcWaitVideoInputSync(CBLUEVELVET_H pSDK, unsigned long ulUpdateType, unsigned long& ulFieldCount)
|
||||
__attribute__((unused));
|
||||
static int bfcWaitVideoOutputSync(CBLUEVELVET_H pSDK, unsigned long ulUpdateType, unsigned long& ulFieldCount)
|
||||
__attribute__((unused));
|
||||
static int bfcQueryCardType(CBLUEVELVET_H pSDK) __attribute__((unused));
|
||||
#ifdef HAVE_BLUE_AUDIO
|
||||
static int bfcDecodeHancFrameEx(CBLUEVELVET_H pHandle, unsigned int nCardType, unsigned int* pHancBuffer, struct hanc_decode_struct* pHancDecodeInfo);
|
||||
static int bfcEncodeHancFrameEx(CBLUEVELVET_H pHandle, unsigned int nCardType, struct hanc_stream_info_struct* pHancEncodeInfo, void *pAudioBuffer, unsigned int nAudioChannels, unsigned int nAudioSamples, unsigned int nSampleType, unsigned int nAudioFlags);
|
||||
static int bfcDecodeHancFrameEx(CBLUEVELVET_H pHandle, unsigned int nCardType, unsigned int* pHancBuffer, struct hanc_decode_struct* pHancDecodeInfo) __attribute__((unused));
|
||||
static int bfcEncodeHancFrameEx(CBLUEVELVET_H pHandle, unsigned int nCardType, struct hanc_stream_info_struct* pHancEncodeInfo, void *pAudioBuffer, unsigned int nAudioChannels, unsigned int nAudioSamples, unsigned int nSampleType, unsigned int nAudioFlags) __attribute__((unused));
|
||||
#endif
|
||||
static int bfcSystemBufferReadAsync(CBLUEVELVET_H pHandle, unsigned char* pPixels, unsigned long ulSize, OVERLAPPED* pOverlap, unsigned long ulBufferID, unsigned long ulOffset=0);
|
||||
static int bfcSystemBufferWriteAsync(CBLUEVELVET_H pHandle, unsigned char *pPixels, unsigned long ulSize, OVERLAPPED *pOverlap, unsigned long ulBufferID, unsigned long ulOFfset=0);
|
||||
static int bfcRenderBufferUpdate(CBLUEVELVET_H pHandle, unsigned long ulBufferID);
|
||||
static int bfcRenderBufferCapture(CBLUEVELVET_H pHandle, unsigned long ulBufferID);
|
||||
static int bfcSystemBufferReadAsync(CBLUEVELVET_H pHandle, unsigned char* pPixels, unsigned long ulSize, OVERLAPPED* pOverlap, unsigned long ulBufferID, unsigned long ulOffset=0) __attribute__((unused));
|
||||
static int bfcSystemBufferWriteAsync(CBLUEVELVET_H pHandle, unsigned char *pPixels, unsigned long ulSize, OVERLAPPED *pOverlap, unsigned long ulBufferID, unsigned long ulOFfset=0) __attribute__((unused));
|
||||
static int bfcRenderBufferUpdate(CBLUEVELVET_H pHandle, unsigned long ulBufferID) __attribute__((unused));
|
||||
static int bfcRenderBufferCapture(CBLUEVELVET_H pHandle, unsigned long ulBufferID) __attribute__((unused));
|
||||
|
||||
static void bfcDestroy(CBLUEVELVET_H pSDK)
|
||||
{
|
||||
@@ -299,13 +302,15 @@ static void page_aligned_free(void *ptr)
|
||||
static uint32_t GetNumberOfAudioSamplesPerFrame(uint32_t VideoMode, uint32_t FrameNumber)
|
||||
{
|
||||
uint32_t NTSC_frame_seq[]={ 1602,1601,1602,1601,1602};
|
||||
uint32_t p59_frame_seq[]={ 801,800,801,801,801,801,800,801,801,801};
|
||||
#if 0
|
||||
uint32_t p23_frame_seq[]={ 2002,2002,2002,2002};
|
||||
uint32_t NTSC_frame_offset[]={0,
|
||||
1602,
|
||||
1602+1601,
|
||||
1602+1601+1602,
|
||||
1602+1601+1602+1601};
|
||||
|
||||
uint32_t p59_frame_seq[]={ 801,800,801,801,801,801,800,801,801,801};
|
||||
uint32_t p59_frame_offset[]={ 0,
|
||||
801,
|
||||
801+800,
|
||||
@@ -317,11 +322,11 @@ static uint32_t GetNumberOfAudioSamplesPerFrame(uint32_t VideoMode, uint32_t Fra
|
||||
801+800+801+801+801+801+800+801,
|
||||
801+800+801+801+801+801+800+801+801};
|
||||
|
||||
uint32_t p23_frame_seq[]={ 2002,2002,2002,2002};
|
||||
uint32_t p23_frame_offset[]={ 0,
|
||||
2002,
|
||||
2002+2002,
|
||||
2002+2002+2002};
|
||||
#endif
|
||||
|
||||
switch(VideoMode)
|
||||
{
|
||||
|
||||
@@ -99,7 +99,6 @@ static void hd_rum_receive_pkt(struct rtp *session, rtp_event *e);
|
||||
static void receive_packet(struct state_decompress *s, rtp_packet *pckt_rtp);
|
||||
static bool decode_header(uint32_t *hdr, struct packet_desc *desc, int *buffer_len, int *substream);
|
||||
static bool decode_video_header(uint32_t *hdr, struct video_desc *desc, int *buffer_len, int *substream);
|
||||
static void decode_packet(char *frame_buffer, rtp_packet *pckt_rtp);
|
||||
static void *worker(void *arg);
|
||||
static int find_best_decompress(codec_t in_codec, codec_t out_codec,
|
||||
int prio_min, int prio_max, uint32_t *magic);
|
||||
@@ -635,7 +634,6 @@ static void receive_packet(struct state_decompress *s, rtp_packet *pckt_rtp)
|
||||
|
||||
static void hd_rum_receive_pkt(struct rtp *session, rtp_event *e)
|
||||
{
|
||||
rtcp_app *pckt_app = (rtcp_app *) e->data;
|
||||
rtp_packet *pckt_rtp = (rtp_packet *) e->data;
|
||||
struct state_decompress *s = (struct state_decompress *)rtp_get_userdata(session);
|
||||
|
||||
|
||||
@@ -243,41 +243,8 @@ void recompress_assign_ssrc(void *state, uint32_t ssrc)
|
||||
|
||||
static void recompress_rtp_callback(struct rtp *session, rtp_event *e)
|
||||
{
|
||||
rtcp_app *pckt_app = (rtcp_app *) e->data;
|
||||
rtp_packet *pckt_rtp = (rtp_packet *) e->data;
|
||||
struct state_recompress *s = (struct state_recompress *)rtp_get_userdata(session);
|
||||
|
||||
switch (e->type) {
|
||||
case RX_RTP:
|
||||
break;
|
||||
case RX_TFRC_RX:
|
||||
/* compute TCP friendly data rate */
|
||||
break;
|
||||
case RX_RTCP_START:
|
||||
break;
|
||||
case RX_RTCP_FINISH:
|
||||
break;
|
||||
case RX_SR:
|
||||
break;
|
||||
case RX_RR:
|
||||
break;
|
||||
case RX_RR_EMPTY:
|
||||
break;
|
||||
case RX_SDES:
|
||||
break;
|
||||
case RX_APP:
|
||||
break;
|
||||
case RX_BYE:
|
||||
break;
|
||||
case SOURCE_DELETED:
|
||||
break;
|
||||
case SOURCE_CREATED:
|
||||
break;
|
||||
case RR_TIMEOUT:
|
||||
break;
|
||||
default:
|
||||
debug_msg("Unknown RTP event (type=%d)\n", e->type);
|
||||
}
|
||||
UNUSED(session);
|
||||
UNUSED(e);
|
||||
}
|
||||
|
||||
void recompress_done(void *state)
|
||||
|
||||
@@ -119,8 +119,6 @@ const char *response_status_to_text(int status)
|
||||
|
||||
struct message *check_message(struct module *mod)
|
||||
{
|
||||
struct message *ret;
|
||||
|
||||
lock_guard guard(mod->lock);
|
||||
|
||||
if(simple_linked_list_size(mod->msg_queue) > 0) {
|
||||
|
||||
@@ -357,8 +357,8 @@ int decode_audio_frame(struct coded_data *cdata, void *data)
|
||||
const int pt = cdata->data->pt;
|
||||
|
||||
if(pt == PT_ENCRYPT_AUDIO) {
|
||||
encryption_hdr = (uint32_t *)((void *) cdata->data->data +
|
||||
sizeof(audio_payload_hdr_t));
|
||||
encryption_hdr = (uint32_t *)((void *) (cdata->data->data +
|
||||
sizeof(audio_payload_hdr_t)));
|
||||
if(!decoder->decrypt) {
|
||||
fprintf(stderr, "Receiving encrypted audio data but "
|
||||
"no decryption key entered!\n");
|
||||
|
||||
@@ -231,10 +231,8 @@ struct ldgm_state_encoder {
|
||||
|
||||
private:
|
||||
LDGM_session_cpu coding_session;
|
||||
char *buffer;
|
||||
unsigned int k, m, c;
|
||||
unsigned int seed;
|
||||
char *left_matrix;
|
||||
};
|
||||
|
||||
struct ldgm_state_decoder {
|
||||
@@ -298,7 +296,6 @@ struct ldgm_state_decoder {
|
||||
|
||||
private:
|
||||
LDGM_session_cpu coding_session;
|
||||
char *buffer;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ using namespace std;
|
||||
struct stats {
|
||||
public:
|
||||
stats(string name, struct control_state *control)
|
||||
: m_control(control), m_name(name), m_val(0) {
|
||||
: m_name(name), m_val(0), m_control(control) {
|
||||
platform_spin_init(&m_spin);
|
||||
control_add_stats(control, this);
|
||||
}
|
||||
@@ -43,7 +43,6 @@ struct stats {
|
||||
private:
|
||||
string m_name;
|
||||
int64_t m_val;
|
||||
void *m_messaging_subscribtion;
|
||||
struct control_state *m_control;
|
||||
platform_spin_t m_spin;
|
||||
};
|
||||
|
||||
@@ -113,8 +113,8 @@ class singleton_opts : public options_t {
|
||||
m_init(init), m_init_data(data), m_done(done) {}
|
||||
private:
|
||||
singleton_initializer_t m_init;
|
||||
singleton_deleter_t m_done;
|
||||
void *m_init_data;
|
||||
singleton_deleter_t m_done;
|
||||
friend class singleton;
|
||||
};
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ struct worker_state_observer {
|
||||
|
||||
struct task_data {
|
||||
task_data(task_t task, void *data, worker *w) : m_task(task), m_data(data),
|
||||
m_result(0), m_w(w), m_returned(false) {}
|
||||
m_result(0), m_returned(false), m_w(w) {}
|
||||
task_t m_task;
|
||||
void *m_data;
|
||||
void *m_result;
|
||||
|
||||
@@ -458,13 +458,11 @@ static void *worker(void *arg)
|
||||
while(!should_exit_worker) {
|
||||
unsigned int val32;
|
||||
UINT SubFieldIrqs = 0;
|
||||
unsigned int FifoSize = 0;
|
||||
uint32_t VideoMode = VID_FMT_INVALID;
|
||||
unsigned int DroppedFrameCount, NoFilledFrame, audioChannelMask,
|
||||
unsigned int DroppedFrameCount, NoFilledFrame,
|
||||
frame_timestamp, frame_signal;
|
||||
int BufferId = -1;
|
||||
static int field1_hanc_buffer_id=-1;
|
||||
int audioSampleType,audio_samples_per_frame,samples_read,hanc_buffer_id=-1; // flags required for starting audio capture
|
||||
int samples_read,hanc_buffer_id=-1; // flags required for starting audio capture
|
||||
|
||||
#if defined WIN32
|
||||
blue_videoframe_info_ex FrameInfo;
|
||||
@@ -606,6 +604,7 @@ static void *worker(void *arg)
|
||||
|
||||
if(s->VideoEngine == VIDEO_ENGINE_DUPLEX) {
|
||||
#ifdef WIN32
|
||||
unsigned int FifoSize = 0;
|
||||
if(BLUE_FAIL(bfcGetCaptureVideoFrameInfoEx(s->pSDK[0], &s->OverlapChA, FrameInfo,
|
||||
0, &FifoSize))) {
|
||||
cerr << "Capture frame failed!" << endl;
|
||||
|
||||
@@ -148,7 +148,6 @@ class VideoDelegate : public IDeckLinkInputCallback
|
||||
{
|
||||
private:
|
||||
int32_t mRefCount;
|
||||
double lastTime;
|
||||
|
||||
public:
|
||||
int newFrameReady;
|
||||
@@ -1237,12 +1236,9 @@ vidcap_decklink_grab(void *state, struct audio_frame **audio)
|
||||
debug_msg("vidcap_decklink_grab\n"); /* TO REMOVE */
|
||||
|
||||
struct vidcap_decklink_state *s = (struct vidcap_decklink_state *) state;
|
||||
struct video_frame *vf;
|
||||
int tiles_total = 0;
|
||||
int i;
|
||||
bool frame_ready = true;
|
||||
|
||||
HRESULT result;
|
||||
|
||||
int rc;
|
||||
struct timespec ts;
|
||||
@@ -1301,6 +1297,7 @@ vidcap_decklink_grab(void *state, struct audio_frame **audio)
|
||||
|
||||
// try to restart stream
|
||||
/*
|
||||
HRESULT result;
|
||||
debug_msg("Try to restart DeckLink stream!\n");
|
||||
result = s->deckLinkInput->StopStreams();
|
||||
if (result != S_OK)
|
||||
@@ -1440,7 +1437,6 @@ print_output_modes (IDeckLink* deckLink)
|
||||
|
||||
if (result == S_OK)
|
||||
{
|
||||
char modeName[64];
|
||||
int modeWidth;
|
||||
int modeHeight;
|
||||
BMDDisplayModeFlags flags;
|
||||
|
||||
@@ -330,9 +330,6 @@ vidcap_deltacast_init(char *init_fmt, unsigned int flags)
|
||||
struct vidcap_deltacast_state *s;
|
||||
ULONG Result,DllVersion,NbBoards,ChnType;
|
||||
ULONG BrdId = 0;
|
||||
ULONG Status = 0;
|
||||
|
||||
int i;
|
||||
|
||||
printf("vidcap_deltacast_init\n");
|
||||
|
||||
|
||||
@@ -101,12 +101,11 @@ struct vidcap_deltacast_dvi_state {
|
||||
|
||||
static void usage(void);
|
||||
static BOOL CheckEEDID(BYTE pEEDIDBuffer[256]);
|
||||
static const char * GetErrorDescription(ULONG CodeError);
|
||||
static const char * GetErrorDescription(ULONG CodeError) __attribute__((unused));
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
ULONG Result,DllVersion,NbBoards;
|
||||
int i;
|
||||
printf("-t deltacast[:board=<index>][:channel=<channel>][:codec=<color_spec>]"
|
||||
"[:edid=<edid>|preset=<format>]\n");
|
||||
Result = VHD_GetApiInfo(&DllVersion,&NbBoards);
|
||||
@@ -446,7 +445,6 @@ vidcap_deltacast_dvi_init(char *init_fmt, unsigned int flags)
|
||||
ULONG Result = VHDERR_NOERROR,DllVersion,NbBoards,BoardType;
|
||||
ULONG BrdId = 0;
|
||||
ULONG Packing;
|
||||
ULONG Status = 0;
|
||||
int edid = -1;
|
||||
BYTE pEEDIDBuffer[256];
|
||||
ULONG pEEDIDBufferSize=256;
|
||||
@@ -479,7 +477,6 @@ vidcap_deltacast_dvi_init(char *init_fmt, unsigned int flags)
|
||||
{
|
||||
char *save_ptr = NULL;
|
||||
char *tok;
|
||||
int pos = 0;
|
||||
|
||||
while((tok = strtok_r(init_fmt, ":", &save_ptr)) != NULL) {
|
||||
if(strncasecmp(tok, "board=", strlen("board=")) == 0) {
|
||||
|
||||
@@ -172,8 +172,6 @@ static void show_help(void);
|
||||
static void *master_worker(void *arg);
|
||||
static void *slave_worker(void *arg);
|
||||
static char *get_config_name(void);
|
||||
static bool parse(struct vidcap_swmix_state *s, struct video_desc *desc, char *fmt,
|
||||
FILE **config_file, unsigned int flags);
|
||||
static bool get_slave_param_from_file(FILE* config, char *slave_name, int *x, int *y,
|
||||
int *width, int *height);
|
||||
static bool get_device_config_from_file(FILE* config_file, char *slave_name,
|
||||
|
||||
@@ -129,7 +129,6 @@ struct display_bluefish444_state {
|
||||
private:
|
||||
uint32_t m_magic;
|
||||
|
||||
struct timeval m_tv;
|
||||
struct video_frame *m_frame;
|
||||
|
||||
int m_deviceId;
|
||||
@@ -169,15 +168,15 @@ display_bluefish444_state::display_bluefish444_state(unsigned int flags,
|
||||
int deviceId) throw(runtime_error) :
|
||||
m_magic(BLUEFISH444_MAGIC),
|
||||
m_frame(NULL),
|
||||
m_deviceId(deviceId),
|
||||
m_AttachedDevicesCount(0),
|
||||
m_GoldenSize(0),
|
||||
m_pPlayingBuffer(NULL),
|
||||
m_LastFieldCount(0),
|
||||
m_pPlayingBuffer(NULL),
|
||||
#ifdef HAVE_BLUE_AUDIO
|
||||
m_AudioRingBuffer(ring_buffer_init(48000*4*16*8)),
|
||||
#endif
|
||||
m_PlayAudio(false),
|
||||
m_AttachedDevicesCount(0),
|
||||
m_deviceId(deviceId)
|
||||
m_PlayAudio(false)
|
||||
{
|
||||
int iDevices = 0;
|
||||
uint32_t val32;
|
||||
@@ -232,6 +231,7 @@ display_bluefish444_state::display_bluefish444_state(unsigned int flags,
|
||||
|
||||
display_bluefish444_state::~display_bluefish444_state() throw()
|
||||
{
|
||||
assert(m_magic == BLUEFISH444_MAGIC);
|
||||
// Kill thread
|
||||
pthread_mutex_lock(&m_lock);
|
||||
m_ReadyFrameQueue.push(NULL);
|
||||
@@ -312,8 +312,6 @@ void *display_bluefish444_state::playback_loop() throw()
|
||||
|
||||
for(int i = 0; i < m_AttachedDevicesCount; ++i) {
|
||||
unsigned char *videoBuffer;
|
||||
int size;
|
||||
int offset;
|
||||
#ifdef WIN32
|
||||
OVERLAPPED *OverlapCh = &Overlapped[i];
|
||||
#else
|
||||
@@ -622,7 +620,7 @@ void display_bluefish444_state::reconfigure(struct video_desc desc)
|
||||
bfcSetCardProperty32(m_pSDK[0], MR2_ROUTING, val32);
|
||||
|
||||
val32 = blue_emb_audio_group1_enable | blue_emb_audio_enable | blue_enable_hanc_timestamp_pkt;
|
||||
int err = bfcSetCardProperty32(m_pSDK[0], EMBEDDED_AUDIO_OUTPUT, val32);
|
||||
bfcSetCardProperty32(m_pSDK[0], EMBEDDED_AUDIO_OUTPUT, val32);
|
||||
}
|
||||
|
||||
//Set the required video mode
|
||||
|
||||
@@ -114,12 +114,7 @@ static int blackmagic_api_version_check(STRING *current_version);
|
||||
|
||||
class PlaybackDelegate : public IDeckLinkVideoOutputCallback // , public IDeckLinkAudioOutputCallback
|
||||
{
|
||||
struct state_decklink * s;
|
||||
int i;
|
||||
|
||||
public:
|
||||
PlaybackDelegate (struct state_decklink* owner, int index);
|
||||
|
||||
// IUnknown needs only a dummy implementation
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID , LPVOID *) { return E_NOINTERFACE;}
|
||||
virtual ULONG STDMETHODCALLTYPE AddRef () {return 1;}
|
||||
@@ -166,8 +161,6 @@ class DeckLinkTimecode : public IDeckLinkTimecode{
|
||||
class DeckLinkFrame;
|
||||
class DeckLinkFrame : public IDeckLinkMutableVideoFrame
|
||||
{
|
||||
long ref;
|
||||
|
||||
long width;
|
||||
long height;
|
||||
long rawBytes;
|
||||
@@ -176,6 +169,8 @@ class DeckLinkFrame : public IDeckLinkMutableVideoFrame
|
||||
|
||||
IDeckLinkTimecode *timecode;
|
||||
|
||||
long ref;
|
||||
|
||||
protected:
|
||||
DeckLinkFrame(long w, long h, long rb, BMDPixelFormat pf);
|
||||
virtual ~DeckLinkFrame();
|
||||
@@ -213,12 +208,6 @@ class DeckLink3DFrame : public DeckLinkFrame, public IDeckLinkVideoFrame3DExtens
|
||||
DeckLink3DFrame(long w, long h, long rb, BMDPixelFormat pf);
|
||||
~DeckLink3DFrame();
|
||||
|
||||
long ref;
|
||||
|
||||
long width;
|
||||
long height;
|
||||
long rawBytes;
|
||||
BMDPixelFormat pixelFormat;
|
||||
DeckLinkFrame *rightEye;
|
||||
|
||||
public:
|
||||
@@ -404,7 +393,6 @@ display_decklink_getf(void *state)
|
||||
static void update_timecode(DeckLinkTimecode *tc, double fps)
|
||||
{
|
||||
const float epsilon = 0.005;
|
||||
int shifted;
|
||||
uint8_t hours, minutes, seconds, frames;
|
||||
BMDTimecodeBCD bcd;
|
||||
bool dropFrame = false;
|
||||
@@ -444,7 +432,6 @@ static void update_timecode(DeckLinkTimecode *tc, double fps)
|
||||
|
||||
int display_decklink_putf(void *state, struct video_frame *frame, int nonblock)
|
||||
{
|
||||
int tmp;
|
||||
struct state_decklink *s = (struct state_decklink *)state;
|
||||
struct timeval tv;
|
||||
|
||||
@@ -570,10 +557,8 @@ display_decklink_reconfigure(void *state, struct video_desc desc)
|
||||
{
|
||||
struct state_decklink *s = (struct state_decklink *)state;
|
||||
|
||||
bool modeFound = false;
|
||||
BMDDisplayMode displayMode;
|
||||
BMDDisplayModeSupport supported;
|
||||
int h_align = 0;
|
||||
|
||||
assert(s->magic == DECKLINK_MAGIC);
|
||||
|
||||
@@ -711,9 +696,8 @@ static int blackmagic_api_version_check(STRING *current_version)
|
||||
return FALSE;
|
||||
}
|
||||
int64_t value;
|
||||
HRESULT res;
|
||||
res = APIInformation->GetInt(BMDDeckLinkAPIVersion, &value);
|
||||
if(res != S_OK) {
|
||||
result = APIInformation->GetInt(BMDDeckLinkAPIVersion, &value);
|
||||
if(result != S_OK) {
|
||||
APIInformation->Release();
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1005,7 +989,7 @@ void *display_decklink_init(char *fmt, unsigned int flags)
|
||||
}
|
||||
}
|
||||
|
||||
s->state[i].delegate = new PlaybackDelegate(s, i);
|
||||
s->state[i].delegate = new PlaybackDelegate();
|
||||
// Provide this class as a delegate to the audio and video output interfaces
|
||||
#ifndef DECKLINK_LOW_LATENCY
|
||||
if(!s->fast) {
|
||||
@@ -1138,11 +1122,6 @@ int display_decklink_get_property(void *state, int property, void *val, size_t *
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
PlaybackDelegate::PlaybackDelegate (struct state_decklink * owner, int index)
|
||||
: s(owner), i(index)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* AUDIO
|
||||
*/
|
||||
@@ -1369,7 +1348,7 @@ HRESULT DeckLinkFrame::SetTimecodeUserBits (/* in */ BMDTimecodeFormat, /* in */
|
||||
|
||||
|
||||
DeckLink3DFrame::DeckLink3DFrame(long w, long h, long rb, BMDPixelFormat pf)
|
||||
: DeckLinkFrame(w, h, rb, pf), ref(1l)
|
||||
: DeckLinkFrame(w, h, rb, pf)
|
||||
{
|
||||
rightEye = DeckLinkFrame::Create(w, h, rb, pf);
|
||||
}
|
||||
|
||||
@@ -167,7 +167,6 @@ display_deltacast_getf(void *state)
|
||||
|
||||
int display_deltacast_putf(void *state, struct video_frame *frame, int nonblock)
|
||||
{
|
||||
int tmp;
|
||||
struct state_deltacast *s = (struct state_deltacast *)state;
|
||||
struct timeval tv;
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user