From 9dc66776eaffe8b8b678c6b7dcb142fa6c7b5dc1 Mon Sep 17 00:00:00 2001 From: ronag Date: Sat, 7 May 2011 15:53:36 +0000 Subject: [PATCH] 2.0.0.2: - mem-cpy/clr: Added support for non power by 128 sizes. - frame_consumer_device: Reduced buffering to 1 frame. - frame_mixer_device: Reduced buffer-size to 1 frame. - decklink_consumer: Added support for low latency configuration.hpp - flash_producer: Reduced buffer-size to 2 frames. - ffmpeg_producer: Added more file-extensions Current estimated frame-latency is ~300ms. flash_producer: 2 mixer_device: 2 consumer_device: 1 decklink: 2 git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@686 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d --- common/memory/memclr.h | 9 +- common/memory/memcpy.h | 17 +- core/consumer/frame_consumer_device.cpp | 2 +- core/mixer/frame_mixer_device.cpp | 2 +- .../decklink/consumer/decklink_consumer.cpp | 74 ++- modules/decklink/consumer/decklink_consumer.h | 16 +- modules/decklink/decklink.vcxproj | 5 +- modules/decklink/decklink.vcxproj.filters | 15 +- modules/decklink/interop/DeckLinkAPI.idl | 63 ++- modules/decklink/interop/DeckLinkAPIVersion.h | 37 ++ modules/decklink/interop/DeckLinkAPI_h.h | 514 +++++++++++++++++- modules/decklink/interop/DeckLinkAPI_i.c | 10 +- modules/decklink/interop/DeckLinkAPI_v7_9.idl | 69 +++ modules/ffmpeg/producer/ffmpeg_producer.cpp | 4 +- modules/flash/producer/flash_producer.cpp | 2 +- shell/caspar.config | 3 +- shell/server.cpp | 16 +- 17 files changed, 781 insertions(+), 77 deletions(-) create mode 100644 modules/decklink/interop/DeckLinkAPIVersion.h create mode 100644 modules/decklink/interop/DeckLinkAPI_v7_9.idl diff --git a/common/memory/memclr.h b/common/memory/memclr.h index 76a3bf368..c3ee149a8 100644 --- a/common/memory/memclr.h +++ b/common/memory/memclr.h @@ -25,8 +25,13 @@ namespace caspar { static void* fast_memclr(void* dest, size_t count) { - assert(count % 128 == 0); + if(count < 2048) + return memset(dest, 0, count); + assert(dest != nullptr); + + size_t rest = count % 128; + count -= rest; __asm { @@ -51,7 +56,7 @@ static void* fast_memclr(void* dest, size_t count) dec ebx; jnz clr; } - return dest; + return memset(reinterpret_cast(dest)+count, 0, rest); } } \ No newline at end of file diff --git a/common/memory/memcpy.h b/common/memory/memcpy.h index 094b874c1..68323039a 100644 --- a/common/memory/memcpy.h +++ b/common/memory/memcpy.h @@ -29,7 +29,6 @@ namespace internal { static void* fast_memcpy(void* dest, const void* source, size_t count) { - assert(count % 128 == 0); assert(dest != nullptr); assert(source != nullptr); @@ -72,17 +71,21 @@ static void* fast_memcpy(void* dest, const void* source, size_t count) } -static void* fast_memcpy(void* dest, const void* source, size_t num) +static void* fast_memcpy(void* dest, const void* source, size_t count) { - if(num < 2048) - return memcpy(dest, source, num); + if(count < 2048) + return memcpy(dest, source, count); + + size_t rest = count % 128; + count -= rest; tbb::affinity_partitioner ap; - tbb::parallel_for(tbb::blocked_range(0, num/128), [&](const tbb::blocked_range& r) + tbb::parallel_for(tbb::blocked_range(0, count/128), [&](const tbb::blocked_range& r) { internal::fast_memcpy(reinterpret_cast(dest) + r.begin()*128, reinterpret_cast(source) + r.begin()*128, r.size()*128); - }, ap); - return dest; + }, ap); + + return memcpy(reinterpret_cast(dest)+count, reinterpret_cast(source)+count, rest); } diff --git a/core/consumer/frame_consumer_device.cpp b/core/consumer/frame_consumer_device.cpp index c69ba3fa4..daa2861ef 100644 --- a/core/consumer/frame_consumer_device.cpp +++ b/core/consumer/frame_consumer_device.cpp @@ -51,7 +51,7 @@ public: : format_desc_(format_desc) , executor_(L"frame_consumer_device") { - executor_.set_capacity(2); + executor_.set_capacity(1); executor_.start(); } diff --git a/core/mixer/frame_mixer_device.cpp b/core/mixer/frame_mixer_device.cpp index af789e3d6..224364582 100644 --- a/core/mixer/frame_mixer_device.cpp +++ b/core/mixer/frame_mixer_device.cpp @@ -113,7 +113,7 @@ public: diag_->set_color("frame-time", diagnostics::color(1.0f, 0.0f, 0.0f)); diag_->set_color("tick-time", diagnostics::color(0.1f, 0.7f, 0.8f)); diag_->set_color("input-buffer", diagnostics::color(1.0f, 1.0f, 0.0f)); - executor_.set_capacity(2); + executor_.set_capacity(1); executor_.start(); CASPAR_LOG(info) << print() << L" Successfully initialized."; } diff --git a/modules/decklink/consumer/decklink_consumer.cpp b/modules/decklink/consumer/decklink_consumer.cpp index 86019eb4c..91515150c 100644 --- a/modules/decklink/consumer/decklink_consumer.cpp +++ b/modules/decklink/consumer/decklink_consumer.cpp @@ -62,9 +62,7 @@ struct decklink_output : public IDeckLinkVideoOutputCallback, public IDeckLinkAu ~co_init(){CoUninitialize();} } co_; - const size_t device_index_; - const bool embed_audio_; - const decklink_consumer::key key_; + const decklink_consumer::configuration config_; std::wstring model_name_; tbb::atomic is_running_; @@ -75,8 +73,9 @@ struct decklink_output : public IDeckLinkVideoOutputCallback, public IDeckLinkAu std::array>, 3> reserved_frames_; boost::circular_buffer> audio_container_; - CComPtr decklink_; - CComQIPtr output_; + CComPtr decklink_; + CComQIPtr output_; + CComQIPtr configuration_; core::video_format_desc format_desc_; @@ -89,12 +88,10 @@ struct decklink_output : public IDeckLinkVideoOutputCallback, public IDeckLinkAu tbb::concurrent_bounded_queue> audio_frame_buffer_; public: - decklink_output(const core::video_format_desc& format_desc,size_t device_index, bool embed_audio, decklink_consumer::key key) + decklink_output(const decklink_consumer::configuration& config, const core::video_format_desc& format_desc) : model_name_(L"DECKLINK") - , device_index_(device_index) + , config_(config) , audio_container_(5) - , embed_audio_(embed_audio) - , key_(key) , frames_scheduled_(0) , audio_scheduled_(0) , format_desc_(format_desc) @@ -106,10 +103,10 @@ public: BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " No Decklink drivers installed.")); size_t n = 0; - while(n < device_index_ && pDecklinkIterator->Next(&decklink_) == S_OK){++n;} + while(n < config_.device_index && pDecklinkIterator->Next(&decklink_) == S_OK){++n;} - if(n != device_index_ || !decklink_) - BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Decklink card not found.") << arg_name_info("device_index") << arg_value_info(boost::lexical_cast(device_index_))); + if(n != config_.device_index || !decklink_) + BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Decklink card not found.") << arg_name_info("device_index") << arg_value_info(boost::lexical_cast(config_.device_index))); BSTR pModelName; decklink_->GetModelName(&pModelName); @@ -120,6 +117,7 @@ public: graph_->set_color("tick-time", diagnostics::color(0.1f, 0.7f, 0.8f)); output_ = decklink_; + configuration_ = decklink_; auto display_mode = get_display_mode(output_.p, format_desc_.format); if(display_mode == nullptr) @@ -131,7 +129,7 @@ public: if(FAILED(output_->DoesSupportVideoMode(display_mode->GetDisplayMode(), bmdFormat8BitBGRA, bmdVideoOutputFlagDefault, &displayModeSupport, nullptr))) BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Card does not support requested videoformat.")); - if(embed_audio_) + if(config_.embed_audio) { if(FAILED(output_->EnableAudioOutput(bmdAudioSampleRate48kHz, bmdAudioSampleType16bitInteger, 2, bmdAudioOutputStreamTimestamped))) BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Could not enable audio output.")); @@ -142,14 +140,17 @@ public: CASPAR_LOG(info) << print() << L" Enabled embedded-audio."; } + if(config_.low_latency) + configuration_->SetFlag(bmdDeckLinkConfigLowLatencyVideoOutput, true); + if(FAILED(output_->EnableVideoOutput(display_mode->GetDisplayMode(), bmdVideoOutputFlagDefault))) BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Could not enable video output.")); - + if(FAILED(output_->SetScheduledFrameCompletionCallback(this))) BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Failed to set playback completion callback.")); CComQIPtr keyer = decklink_; - if(key_ == decklink_consumer::internal_key) + if(config_.keyer == decklink_consumer::internal_key) { if(FAILED(keyer->Enable(FALSE))) CASPAR_LOG(error) << print() << L" Failed to enable internal keyer."; @@ -158,7 +159,7 @@ public: else CASPAR_LOG(info) << print() << L" Successfully configured internal keyer."; } - else if(key_ == decklink_consumer::external_key) + else if(config.keyer == decklink_consumer::external_key) { if(FAILED(keyer->Enable(TRUE))) CASPAR_LOG(error) << print() << L" Failed to enable external keyer."; @@ -189,7 +190,7 @@ public: for(size_t n = 0; n < std::max(2, buffer_size-2); ++n) { video_frame_buffer_.try_push(core::read_frame::empty()); - if(embed_audio_) + if(config_.embed_audio) audio_frame_buffer_.try_push(core::read_frame::empty()); } @@ -208,7 +209,7 @@ public: if(output_ != nullptr) { output_->StopScheduledPlayback(0, nullptr, 0); - if(embed_audio_) + if(config_.embed_audio) output_->DisableAudioOutput(); output_->DisableVideoOutput(); } @@ -280,31 +281,27 @@ public: void send(const safe_ptr& frame) { video_frame_buffer_.push(frame); - if(embed_audio_) + if(config_.embed_audio) audio_frame_buffer_.push(frame); } std::wstring print() const { - return model_name_ + L" [" + boost::lexical_cast(device_index_) + L"]"; + return model_name_ + L" [" + boost::lexical_cast(config_.device_index) + L"]"; } }; struct decklink_consumer::implementation { std::unique_ptr input_; - size_t device_index_; - bool embed_audio_; - decklink_consumer::key key_; + decklink_consumer::configuration config_; executor executor_; public: - implementation(size_t device_index, bool embed_audio, decklink_consumer::key key) - : device_index_(device_index) - , embed_audio_(embed_audio) - , key_(key) - , executor_(L"DECKLINK[" + boost::lexical_cast(device_index) + L"]") + implementation(const decklink_consumer::configuration& config) + : config_(config) + , executor_(L"DECKLINK[" + boost::lexical_cast(config.device_index) + L"]") { executor_.start(); } @@ -321,7 +318,7 @@ public: { executor_.invoke([&] { - input_.reset(new decklink_output(format_desc, device_index_, embed_audio_, key_)); + input_.reset(new decklink_output(config_, format_desc)); }); } @@ -341,38 +338,35 @@ public: } }; -decklink_consumer::decklink_consumer(size_t device_index, bool embed_audio, key key) : impl_(new implementation(device_index, embed_audio, key)){} +decklink_consumer::decklink_consumer(const configuration& config) : impl_(new implementation(config)){} decklink_consumer::decklink_consumer(decklink_consumer&& other) : impl_(std::move(other.impl_)){} void decklink_consumer::initialize(const core::video_format_desc& format_desc){impl_->initialize(format_desc);} void decklink_consumer::send(const safe_ptr& frame){impl_->send(frame);} size_t decklink_consumer::buffer_depth() const{return impl_->buffer_depth();} std::wstring decklink_consumer::print() const{return impl_->print();} -safe_ptr create_decklink_consumer(const std::vector& params) +safe_ptr create_decklink_consumer(const std::vector& params) { if(params.size() < 1 || params[0] != L"DECKLINK") return core::frame_consumer::empty(); - int device_index = 1; - bool embed_audio = false; - auto key = decklink_consumer::default_key; + decklink_consumer::configuration config; if(params.size() > 1) - device_index = lexical_cast_or_default(params[2], device_index); + config.device_index = lexical_cast_or_default(params[2], config.device_index); if(params.size() > 2) - embed_audio = lexical_cast_or_default(params[3], embed_audio); + config.embed_audio = lexical_cast_or_default(params[3], config.embed_audio); - if(params.size() > 3) { if(params[4] == L"INTERNAL_KEY") - key = decklink_consumer::internal_key; + config.keyer = decklink_consumer::internal_key; else if(params[4] == L"EXTERNAL_KEY") - key = decklink_consumer::external_key; + config.keyer = decklink_consumer::external_key; } - return make_safe(device_index, embed_audio, key); + return make_safe(config); } } \ No newline at end of file diff --git a/modules/decklink/consumer/decklink_consumer.h b/modules/decklink/consumer/decklink_consumer.h index 8db428447..1da23a7bb 100644 --- a/modules/decklink/consumer/decklink_consumer.h +++ b/modules/decklink/consumer/decklink_consumer.h @@ -39,7 +39,21 @@ public: default_key }; - explicit decklink_consumer(size_t device_index, bool embed_audio = false, key key = default_key); + struct configuration + { + size_t device_index; + bool embed_audio; + key keyer; + bool low_latency; + + configuration() + : device_index(1) + , embed_audio(false) + , keyer(default_key) + , low_latency(false){} + }; + + explicit decklink_consumer(const configuration& config); decklink_consumer(decklink_consumer&& other); virtual void initialize(const core::video_format_desc& format_desc); diff --git a/modules/decklink/decklink.vcxproj b/modules/decklink/decklink.vcxproj index 52672adc2..02bbbd9a5 100644 --- a/modules/decklink/decklink.vcxproj +++ b/modules/decklink/decklink.vcxproj @@ -227,8 +227,8 @@ - NotUsing NotUsing + NotUsing NotUsing NotUsing @@ -248,6 +248,7 @@ + @@ -260,9 +261,9 @@ interop\ interop\ true - true true true + true true diff --git a/modules/decklink/decklink.vcxproj.filters b/modules/decklink/decklink.vcxproj.filters index e53966d67..b9fad37b0 100644 --- a/modules/decklink/decklink.vcxproj.filters +++ b/modules/decklink/decklink.vcxproj.filters @@ -15,9 +15,6 @@ - - interop - consumer @@ -26,11 +23,11 @@ + + interop + - - interop - consumer @@ -42,6 +39,12 @@ util + + interop + + + interop + diff --git a/modules/decklink/interop/DeckLinkAPI.idl b/modules/decklink/interop/DeckLinkAPI.idl index a22b50471..abe52476c 100644 --- a/modules/decklink/interop/DeckLinkAPI.idl +++ b/modules/decklink/interop/DeckLinkAPI.idl @@ -1,5 +1,5 @@ /* -LICENSE-START- -** Copyright (c) 2009 Blackmagic Design +** Copyright (c) 2011 Blackmagic Design ** ** Permission is hereby granted, free of charge, to any person or organization ** obtaining a copy of the software and accompanying documentation covered by @@ -241,7 +241,9 @@ typedef [v1_enum] enum _BMDDisplayModeSupport { typedef [v1_enum] enum _BMDTimecodeFormat { bmdTimecodeRP188 = /* 'rp18' */ 0x72703138, + bmdTimecodeRP188Field2 = /* 'rp12' */ 0x72703132, bmdTimecodeVITC = /* 'vitc' */ 0x76697463, + bmdTimecodeVITCField2 = /* 'vit2' */ 0x76697432, bmdTimecodeSerial = /* 'seri' */ 0x73657269 } BMDTimecodeFormat; @@ -336,10 +338,22 @@ typedef [v1_enum] enum _BMDVideo3DPackingFormat { } BMDVideo3DPackingFormat; +/* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */ + +typedef [v1_enum] enum _BMDIdleVideoOutputOperation { + bmdIdleVideoOutputBlack = /* 'blac' */ 0x626C6163, + bmdIdleVideoOutputLastFrame = /* 'lafa' */ 0x6C616661 +} BMDIdleVideoOutputOperation; + + /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ typedef [v1_enum] enum _BMDDeckLinkConfigurationID { + /* Serial port Flags */ + + bmdDeckLinkConfigSwapSerialRxTx = /* 'ssrt' */ 0x73737274, + /* Video Input/Output Flags */ bmdDeckLinkConfigUse1080pNotPsF = /* 'fpro' */ 0x6670726F, @@ -347,6 +361,7 @@ typedef [v1_enum] enum _BMDDeckLinkConfigurationID { /* Video Input/Output Integers */ bmdDeckLinkConfigHDMI3DPackingFormat = /* '3dpf' */ 0x33647066, + bmdDeckLinkConfigBypass = /* 'byps' */ 0x62797073, /* Audio Input/Output Flags */ @@ -367,6 +382,17 @@ typedef [v1_enum] enum _BMDDeckLinkConfigurationID { bmdDeckLinkConfigVideoOutputConversionMode = /* 'vocm' */ 0x766F636D, bmdDeckLinkConfigAnalogVideoOutputFlags = /* 'avof' */ 0x61766F66, bmdDeckLinkConfigReferenceInputTimingOffset = /* 'glot' */ 0x676C6F74, + bmdDeckLinkConfigVideoOutputIdleOperation = /* 'voio' */ 0x766F696F, + + /* Video Output Floats */ + + bmdDeckLinkConfigVideoOutputComponentLumaGain = /* 'oclg' */ 0x6F636C67, + bmdDeckLinkConfigVideoOutputComponentChromaBlueGain = /* 'occb' */ 0x6F636362, + bmdDeckLinkConfigVideoOutputComponentChromaRedGain = /* 'occr' */ 0x6F636372, + bmdDeckLinkConfigVideoOutputCompositeLumaGain = /* 'oilg' */ 0x6F696C67, + bmdDeckLinkConfigVideoOutputCompositeChromaGain = /* 'oicg' */ 0x6F696367, + bmdDeckLinkConfigVideoOutputSVideoLumaGain = /* 'oslg' */ 0x6F736C67, + bmdDeckLinkConfigVideoOutputSVideoChromaGain = /* 'oscg' */ 0x6F736367, /* Video Input Integers */ @@ -378,6 +404,16 @@ typedef [v1_enum] enum _BMDDeckLinkConfigurationID { bmdDeckLinkConfigVANCSourceLine2Mapping = /* 'vsl2' */ 0x76736C32, bmdDeckLinkConfigVANCSourceLine3Mapping = /* 'vsl3' */ 0x76736C33, + /* Video Input Floats */ + + bmdDeckLinkConfigVideoInputComponentLumaGain = /* 'iclg' */ 0x69636C67, + bmdDeckLinkConfigVideoInputComponentChromaBlueGain = /* 'iccb' */ 0x69636362, + bmdDeckLinkConfigVideoInputComponentChromaRedGain = /* 'iccr' */ 0x69636372, + bmdDeckLinkConfigVideoInputCompositeLumaGain = /* 'iilg' */ 0x69696C67, + bmdDeckLinkConfigVideoInputCompositeChromaGain = /* 'iicg' */ 0x69696367, + bmdDeckLinkConfigVideoInputSVideoLumaGain = /* 'islg' */ 0x69736C67, + bmdDeckLinkConfigVideoInputSVideoChromaGain = /* 'iscg' */ 0x69736367, + /* Audio Input Integers */ bmdDeckLinkConfigAudioInputConnection = /* 'aicn' */ 0x6169636E, @@ -416,6 +452,10 @@ typedef [v1_enum] enum _BMDDeckLinkAttributeID { BMDDeckLinkSupportsInputFormatDetection = /* 'infd' */ 0x696E6664, BMDDeckLinkHasReferenceInput = /* 'hrin' */ 0x6872696E, BMDDeckLinkHasSerialPort = /* 'hspt' */ 0x68737074, + BMDDeckLinkHasAnalogVideoOutputGain = /* 'avog' */ 0x61766F67, + BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = /* 'ovog' */ 0x6F766F67, + BMDDeckLinkHasVideoInputAntiAliasingFilter = /* 'aafl' */ 0x6161666C, + BMDDeckLinkHasBypass = /* 'byps' */ 0x62797073, /* Integers */ @@ -425,6 +465,13 @@ typedef [v1_enum] enum _BMDDeckLinkAttributeID { BMDDeckLinkVideoOutputConnections = /* 'vocn' */ 0x766F636E, BMDDeckLinkVideoInputConnections = /* 'vicn' */ 0x7669636E, + /* Floats */ + + BMDDeckLinkVideoInputGainMinimum = /* 'vigm' */ 0x7669676D, + BMDDeckLinkVideoInputGainMaximum = /* 'vigx' */ 0x76696778, + BMDDeckLinkVideoOutputGainMinimum = /* 'vogm' */ 0x766F676D, + BMDDeckLinkVideoOutputGainMaximum = /* 'vogx' */ 0x766F6778, + /* Strings */ BMDDeckLinkSerialPortDeviceName = /* 'slpn' */ 0x736C706E @@ -526,6 +573,8 @@ typedef [v1_enum] enum _BMDDeckControlError { bmdDeckControlNoTapeInDeckError = /* 'nter' */ 0x6E746572, bmdDeckControlNoVideoFromCardError = /* 'nvfc' */ 0x6E766663, bmdDeckControlNoCommunicationError = /* 'ncom' */ 0x6E636F6D, + bmdDeckControlBufferTooSmallError = /* 'btsm' */ 0x6274736D, + bmdDeckControlBadChecksumError = /* 'chks' */ 0x63686B73, bmdDeckControlUnknownError = /* 'uner' */ 0x756E6572 } BMDDeckControlError; @@ -1025,7 +1074,7 @@ interface IDeckLinkDeckControl; [ object, - uuid(A4D81043-0619-42B7-8ED6-602D29041DF7), + uuid(522A9E39-0F3C-4742-94EE-D80DE335DA1D), helpstring("Deck Control main interface") ] interface IDeckLinkDeckControl : IUnknown { @@ -1033,6 +1082,7 @@ interface IDeckLinkDeckControl; HRESULT Close([in] BOOL standbyOn); HRESULT GetCurrentState([out] BMDDeckControlMode *mode, [out] BMDDeckControlVTRControlState *vtrControlState, [out] BMDDeckControlStatusFlags *flags); HRESULT SetStandby([in] BOOL standbyOn); + HRESULT SendCommand([in] unsigned char *inBuffer, [in] unsigned long inBufferSize, [out] unsigned char *outBuffer, [out] unsigned long *outDataSize, [in] unsigned long outBufferSize, [out] BMDDeckControlError *error); HRESULT Play([out] BMDDeckControlError *error); HRESULT Stop([out] BMDDeckControlError *error); HRESULT TogglePlayStop([out] BMDDeckControlError *error); @@ -1076,6 +1126,14 @@ importlib("stdole2.tlb"); [default] interface IDeckLinkIterator; }; +[ + uuid(263CA19F-ED09-482E-9F9D-84005783A237), + helpstring("CDeckLinkAPIInformation Class") +] coclass CDeckLinkAPIInformation +{ + [default] interface IDeckLinkAPIInformation; +}; + [ uuid(F63E77C7-B655-4A4A-9AD0-3CA85D394343), helpstring("CDeckLinkGLScreenPreviewHelper Class") @@ -1094,6 +1152,7 @@ importlib("stdole2.tlb"); // import deprecated interfaces +#include "DeckLinkAPI_v7_9.idl" #include "DeckLinkAPI_v7_6.idl" #include "DeckLinkAPI_v7_3.idl" #include "DeckLinkAPI_v7_1.idl" diff --git a/modules/decklink/interop/DeckLinkAPIVersion.h b/modules/decklink/interop/DeckLinkAPIVersion.h new file mode 100644 index 000000000..e79957064 --- /dev/null +++ b/modules/decklink/interop/DeckLinkAPIVersion.h @@ -0,0 +1,37 @@ +/* -LICENSE-START- + * ** Copyright (c) 2011 Blackmagic Design + * ** + * ** Permission is hereby granted, free of charge, to any person or organization + * ** obtaining a copy of the software and accompanying documentation covered by + * ** this license (the "Software") to use, reproduce, display, distribute, + * ** execute, and transmit the Software, and to prepare derivative works of the + * ** Software, and to permit third-parties to whom the Software is furnished to + * ** do so, all subject to the following: + * ** + * ** The copyright notices in the Software and this entire statement, including + * ** the above license grant, this restriction and the following disclaimer, + * ** must be included in all copies of the Software, in whole or in part, and + * ** all derivative works of the Software, unless such copies or derivative + * ** works are solely in the form of machine-executable object code generated by + * ** a source language processor. + * ** + * ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT + * ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE + * ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, + * ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * ** DEALINGS IN THE SOFTWARE. + * ** -LICENSE-END- + * */ + +/* DeckLinkAPIVersion.h */ + +#ifndef __DeckLink_API_Verison_h__ +#define __DeckLink_API_Version_h__ + +#define BLACKMAGIC_DECKLINK_API_VERSION 0x08000000 +#define BLACKMAGIC_DECKLINK_API_VERSION_STRING "8.0" + +#endif // __DeckLink_API_Version_h__ + diff --git a/modules/decklink/interop/DeckLinkAPI_h.h b/modules/decklink/interop/DeckLinkAPI_h.h index 97e1cb32a..5778702c1 100644 --- a/modules/decklink/interop/DeckLinkAPI_h.h +++ b/modules/decklink/interop/DeckLinkAPI_h.h @@ -4,7 +4,7 @@ /* File created by MIDL compiler version 7.00.0555 */ -/* at Wed Mar 09 22:31:19 2011 +/* at Sat May 07 17:24:25 2011 */ /* Compiler settings for interop\DeckLinkAPI.idl: Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 @@ -209,6 +209,18 @@ typedef struct CDeckLinkIterator CDeckLinkIterator; #endif /* __CDeckLinkIterator_FWD_DEFINED__ */ +#ifndef __CDeckLinkAPIInformation_FWD_DEFINED__ +#define __CDeckLinkAPIInformation_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class CDeckLinkAPIInformation CDeckLinkAPIInformation; +#else +typedef struct CDeckLinkAPIInformation CDeckLinkAPIInformation; +#endif /* __cplusplus */ + +#endif /* __CDeckLinkAPIInformation_FWD_DEFINED__ */ + + #ifndef __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__ #define __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__ @@ -233,6 +245,12 @@ typedef struct CDeckLinkVideoConversion CDeckLinkVideoConversion; #endif /* __CDeckLinkVideoConversion_FWD_DEFINED__ */ +#ifndef __IDeckLinkDeckControl_v7_9_FWD_DEFINED__ +#define __IDeckLinkDeckControl_v7_9_FWD_DEFINED__ +typedef interface IDeckLinkDeckControl_v7_9 IDeckLinkDeckControl_v7_9; +#endif /* __IDeckLinkDeckControl_v7_9_FWD_DEFINED__ */ + + #ifndef __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__ #define __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__ typedef interface IDeckLinkDisplayModeIterator_v7_6 IDeckLinkDisplayModeIterator_v7_6; @@ -595,7 +613,9 @@ enum _BMDDisplayModeSupport typedef /* [v1_enum] */ enum _BMDTimecodeFormat { bmdTimecodeRP188 = 0x72703138, + bmdTimecodeRP188Field2 = 0x72703132, bmdTimecodeVITC = 0x76697463, + bmdTimecodeVITCField2 = 0x76697432, bmdTimecodeSerial = 0x73657269 } BMDTimecodeFormat; @@ -671,10 +691,18 @@ enum _BMDVideo3DPackingFormat bmdVideo3DPackingRightOnly = 0x72696768 } BMDVideo3DPackingFormat; +typedef /* [v1_enum] */ +enum _BMDIdleVideoOutputOperation + { bmdIdleVideoOutputBlack = 0x626c6163, + bmdIdleVideoOutputLastFrame = 0x6c616661 + } BMDIdleVideoOutputOperation; + typedef /* [v1_enum] */ enum _BMDDeckLinkConfigurationID - { bmdDeckLinkConfigUse1080pNotPsF = 0x6670726f, + { bmdDeckLinkConfigSwapSerialRxTx = 0x73737274, + bmdDeckLinkConfigUse1080pNotPsF = 0x6670726f, bmdDeckLinkConfigHDMI3DPackingFormat = 0x33647066, + bmdDeckLinkConfigBypass = 0x62797073, bmdDeckLinkConfigAnalogAudioConsumerLevels = 0x6161636c, bmdDeckLinkConfigFieldFlickerRemoval = 0x66646672, bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion = 0x746f3539, @@ -686,6 +714,14 @@ enum _BMDDeckLinkConfigurationID bmdDeckLinkConfigVideoOutputConversionMode = 0x766f636d, bmdDeckLinkConfigAnalogVideoOutputFlags = 0x61766f66, bmdDeckLinkConfigReferenceInputTimingOffset = 0x676c6f74, + bmdDeckLinkConfigVideoOutputIdleOperation = 0x766f696f, + bmdDeckLinkConfigVideoOutputComponentLumaGain = 0x6f636c67, + bmdDeckLinkConfigVideoOutputComponentChromaBlueGain = 0x6f636362, + bmdDeckLinkConfigVideoOutputComponentChromaRedGain = 0x6f636372, + bmdDeckLinkConfigVideoOutputCompositeLumaGain = 0x6f696c67, + bmdDeckLinkConfigVideoOutputCompositeChromaGain = 0x6f696367, + bmdDeckLinkConfigVideoOutputSVideoLumaGain = 0x6f736c67, + bmdDeckLinkConfigVideoOutputSVideoChromaGain = 0x6f736367, bmdDeckLinkConfigVideoInputConnection = 0x7669636e, bmdDeckLinkConfigAnalogVideoInputFlags = 0x61766966, bmdDeckLinkConfigVideoInputConversionMode = 0x7669636d, @@ -693,6 +729,13 @@ enum _BMDDeckLinkConfigurationID bmdDeckLinkConfigVANCSourceLine1Mapping = 0x76736c31, bmdDeckLinkConfigVANCSourceLine2Mapping = 0x76736c32, bmdDeckLinkConfigVANCSourceLine3Mapping = 0x76736c33, + bmdDeckLinkConfigVideoInputComponentLumaGain = 0x69636c67, + bmdDeckLinkConfigVideoInputComponentChromaBlueGain = 0x69636362, + bmdDeckLinkConfigVideoInputComponentChromaRedGain = 0x69636372, + bmdDeckLinkConfigVideoInputCompositeLumaGain = 0x69696c67, + bmdDeckLinkConfigVideoInputCompositeChromaGain = 0x69696367, + bmdDeckLinkConfigVideoInputSVideoLumaGain = 0x69736c67, + bmdDeckLinkConfigVideoInputSVideoChromaGain = 0x69736367, bmdDeckLinkConfigAudioInputConnection = 0x6169636e, bmdDeckLinkConfigAnalogAudioInputScaleChannel1 = 0x61697331, bmdDeckLinkConfigAnalogAudioInputScaleChannel2 = 0x61697332, @@ -715,11 +758,19 @@ enum _BMDDeckLinkAttributeID BMDDeckLinkSupportsInputFormatDetection = 0x696e6664, BMDDeckLinkHasReferenceInput = 0x6872696e, BMDDeckLinkHasSerialPort = 0x68737074, + BMDDeckLinkHasAnalogVideoOutputGain = 0x61766f67, + BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = 0x6f766f67, + BMDDeckLinkHasVideoInputAntiAliasingFilter = 0x6161666c, + BMDDeckLinkHasBypass = 0x62797073, BMDDeckLinkMaximumAudioChannels = 0x6d616368, BMDDeckLinkNumberOfSubDevices = 0x6e736264, BMDDeckLinkSubDeviceIndex = 0x73756269, BMDDeckLinkVideoOutputConnections = 0x766f636e, BMDDeckLinkVideoInputConnections = 0x7669636e, + BMDDeckLinkVideoInputGainMinimum = 0x7669676d, + BMDDeckLinkVideoInputGainMaximum = 0x76696778, + BMDDeckLinkVideoOutputGainMinimum = 0x766f676d, + BMDDeckLinkVideoOutputGainMaximum = 0x766f6778, BMDDeckLinkSerialPortDeviceName = 0x736c706e } BMDDeckLinkAttributeID; @@ -797,6 +848,8 @@ enum _BMDDeckControlError bmdDeckControlNoTapeInDeckError = 0x6e746572, bmdDeckControlNoVideoFromCardError = 0x6e766663, bmdDeckControlNoCommunicationError = 0x6e636f6d, + bmdDeckControlBufferTooSmallError = 0x6274736d, + bmdDeckControlBadChecksumError = 0x63686b73, bmdDeckControlUnknownError = 0x756e6572 } BMDDeckControlError; @@ -4025,7 +4078,7 @@ EXTERN_C const IID IID_IDeckLinkDeckControl; #if defined(__cplusplus) && !defined(CINTERFACE) - MIDL_INTERFACE("A4D81043-0619-42B7-8ED6-602D29041DF7") + MIDL_INTERFACE("522A9E39-0F3C-4742-94EE-D80DE335DA1D") IDeckLinkDeckControl : public IUnknown { public: @@ -4046,6 +4099,14 @@ EXTERN_C const IID IID_IDeckLinkDeckControl; virtual HRESULT STDMETHODCALLTYPE SetStandby( /* [in] */ BOOL standbyOn) = 0; + virtual HRESULT STDMETHODCALLTYPE SendCommand( + /* [in] */ unsigned char *inBuffer, + /* [in] */ unsigned long inBufferSize, + /* [out] */ unsigned char *outBuffer, + /* [out] */ unsigned long *outDataSize, + /* [in] */ unsigned long outBufferSize, + /* [out] */ BMDDeckControlError *error) = 0; + virtual HRESULT STDMETHODCALLTYPE Play( /* [out] */ BMDDeckControlError *error) = 0; @@ -4185,6 +4246,15 @@ EXTERN_C const IID IID_IDeckLinkDeckControl; IDeckLinkDeckControl * This, /* [in] */ BOOL standbyOn); + HRESULT ( STDMETHODCALLTYPE *SendCommand )( + IDeckLinkDeckControl * This, + /* [in] */ unsigned char *inBuffer, + /* [in] */ unsigned long inBufferSize, + /* [out] */ unsigned char *outBuffer, + /* [out] */ unsigned long *outDataSize, + /* [in] */ unsigned long outBufferSize, + /* [out] */ BMDDeckControlError *error); + HRESULT ( STDMETHODCALLTYPE *Play )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlError *error); @@ -4346,6 +4416,9 @@ EXTERN_C const IID IID_IDeckLinkDeckControl; #define IDeckLinkDeckControl_SetStandby(This,standbyOn) \ ( (This)->lpVtbl -> SetStandby(This,standbyOn) ) +#define IDeckLinkDeckControl_SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error) \ + ( (This)->lpVtbl -> SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error) ) + #define IDeckLinkDeckControl_Play(This,error) \ ( (This)->lpVtbl -> Play(This,error) ) @@ -4449,6 +4522,14 @@ class DECLSPEC_UUID("D9EDA3B3-2887-41FA-B724-017CF1EB1D37") CDeckLinkIterator; #endif +EXTERN_C const CLSID CLSID_CDeckLinkAPIInformation; + +#ifdef __cplusplus + +class DECLSPEC_UUID("263CA19F-ED09-482E-9F9D-84005783A237") +CDeckLinkAPIInformation; +#endif + EXTERN_C const CLSID CLSID_CDeckLinkGLScreenPreviewHelper; #ifdef __cplusplus @@ -4465,6 +4546,433 @@ class DECLSPEC_UUID("7DBBBB11-5B7B-467D-AEA4-CEA468FD368C") CDeckLinkVideoConversion; #endif +#ifndef __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__ +#define __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__ + +/* interface IDeckLinkDeckControl_v7_9 */ +/* [helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IDeckLinkDeckControl_v7_9; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A4D81043-0619-42B7-8ED6-602D29041DF7") + IDeckLinkDeckControl_v7_9 : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Open( + /* [in] */ BMDTimeScale timeScale, + /* [in] */ BMDTimeValue timeValue, + /* [in] */ BOOL timecodeIsDropFrame, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE Close( + /* [in] */ BOOL standbyOn) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentState( + /* [out] */ BMDDeckControlMode *mode, + /* [out] */ BMDDeckControlVTRControlState *vtrControlState, + /* [out] */ BMDDeckControlStatusFlags *flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetStandby( + /* [in] */ BOOL standbyOn) = 0; + + virtual HRESULT STDMETHODCALLTYPE Play( + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE TogglePlayStop( + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE Eject( + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE GoToTimecode( + /* [in] */ BMDTimecodeBCD timecode, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE FastForward( + /* [in] */ BOOL viewTape, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE Rewind( + /* [in] */ BOOL viewTape, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE StepForward( + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE StepBack( + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE Jog( + /* [in] */ double rate, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE Shuttle( + /* [in] */ double rate, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimecodeString( + /* [out] */ BSTR *currentTimeCode, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimecode( + /* [out] */ IDeckLinkTimecode **currentTimecode, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimecodeBCD( + /* [out] */ BMDTimecodeBCD *currentTimecode, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPreroll( + /* [in] */ unsigned long prerollSeconds) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPreroll( + /* [out] */ unsigned long *prerollSeconds) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetExportOffset( + /* [in] */ long exportOffsetFields) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetExportOffset( + /* [out] */ long *exportOffsetFields) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetManualExportOffset( + /* [out] */ long *deckManualExportOffsetFields) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetCaptureOffset( + /* [in] */ long captureOffsetFields) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCaptureOffset( + /* [out] */ long *captureOffsetFields) = 0; + + virtual HRESULT STDMETHODCALLTYPE StartExport( + /* [in] */ BMDTimecodeBCD inTimecode, + /* [in] */ BMDTimecodeBCD outTimecode, + /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE StartCapture( + /* [in] */ BOOL useVITC, + /* [in] */ BMDTimecodeBCD inTimecode, + /* [in] */ BMDTimecodeBCD outTimecode, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceID( + /* [out] */ unsigned short *deviceId, + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CrashRecordStart( + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE CrashRecordStop( + /* [out] */ BMDDeckControlError *error) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetCallback( + /* [in] */ IDeckLinkDeckControlStatusCallback *callback) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDeckLinkDeckControl_v7_9Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDeckLinkDeckControl_v7_9 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDeckLinkDeckControl_v7_9 * This); + + HRESULT ( STDMETHODCALLTYPE *Open )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ BMDTimeScale timeScale, + /* [in] */ BMDTimeValue timeValue, + /* [in] */ BOOL timecodeIsDropFrame, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *Close )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ BOOL standbyOn); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDDeckControlMode *mode, + /* [out] */ BMDDeckControlVTRControlState *vtrControlState, + /* [out] */ BMDDeckControlStatusFlags *flags); + + HRESULT ( STDMETHODCALLTYPE *SetStandby )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ BOOL standbyOn); + + HRESULT ( STDMETHODCALLTYPE *Play )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *Eject )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ BMDTimecodeBCD timecode, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *FastForward )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ BOOL viewTape, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *Rewind )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ BOOL viewTape, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *StepForward )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *StepBack )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *Jog )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ double rate, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *Shuttle )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ double rate, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BSTR *currentTimeCode, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *GetTimecode )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ IDeckLinkTimecode **currentTimecode, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDTimecodeBCD *currentTimecode, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *SetPreroll )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ unsigned long prerollSeconds); + + HRESULT ( STDMETHODCALLTYPE *GetPreroll )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ unsigned long *prerollSeconds); + + HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ long exportOffsetFields); + + HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ long *exportOffsetFields); + + HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ long *deckManualExportOffsetFields); + + HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ long captureOffsetFields); + + HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ long *captureOffsetFields); + + HRESULT ( STDMETHODCALLTYPE *StartExport )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ BMDTimecodeBCD inTimecode, + /* [in] */ BMDTimecodeBCD outTimecode, + /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *StartCapture )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ BOOL useVITC, + /* [in] */ BMDTimecodeBCD inTimecode, + /* [in] */ BMDTimecodeBCD outTimecode, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ unsigned short *deviceId, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *Abort )( + IDeckLinkDeckControl_v7_9 * This); + + HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( + IDeckLinkDeckControl_v7_9 * This, + /* [out] */ BMDDeckControlError *error); + + HRESULT ( STDMETHODCALLTYPE *SetCallback )( + IDeckLinkDeckControl_v7_9 * This, + /* [in] */ IDeckLinkDeckControlStatusCallback *callback); + + END_INTERFACE + } IDeckLinkDeckControl_v7_9Vtbl; + + interface IDeckLinkDeckControl_v7_9 + { + CONST_VTBL struct IDeckLinkDeckControl_v7_9Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDeckLinkDeckControl_v7_9_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDeckLinkDeckControl_v7_9_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDeckLinkDeckControl_v7_9_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDeckLinkDeckControl_v7_9_Open(This,timeScale,timeValue,timecodeIsDropFrame,error) \ + ( (This)->lpVtbl -> Open(This,timeScale,timeValue,timecodeIsDropFrame,error) ) + +#define IDeckLinkDeckControl_v7_9_Close(This,standbyOn) \ + ( (This)->lpVtbl -> Close(This,standbyOn) ) + +#define IDeckLinkDeckControl_v7_9_GetCurrentState(This,mode,vtrControlState,flags) \ + ( (This)->lpVtbl -> GetCurrentState(This,mode,vtrControlState,flags) ) + +#define IDeckLinkDeckControl_v7_9_SetStandby(This,standbyOn) \ + ( (This)->lpVtbl -> SetStandby(This,standbyOn) ) + +#define IDeckLinkDeckControl_v7_9_Play(This,error) \ + ( (This)->lpVtbl -> Play(This,error) ) + +#define IDeckLinkDeckControl_v7_9_Stop(This,error) \ + ( (This)->lpVtbl -> Stop(This,error) ) + +#define IDeckLinkDeckControl_v7_9_TogglePlayStop(This,error) \ + ( (This)->lpVtbl -> TogglePlayStop(This,error) ) + +#define IDeckLinkDeckControl_v7_9_Eject(This,error) \ + ( (This)->lpVtbl -> Eject(This,error) ) + +#define IDeckLinkDeckControl_v7_9_GoToTimecode(This,timecode,error) \ + ( (This)->lpVtbl -> GoToTimecode(This,timecode,error) ) + +#define IDeckLinkDeckControl_v7_9_FastForward(This,viewTape,error) \ + ( (This)->lpVtbl -> FastForward(This,viewTape,error) ) + +#define IDeckLinkDeckControl_v7_9_Rewind(This,viewTape,error) \ + ( (This)->lpVtbl -> Rewind(This,viewTape,error) ) + +#define IDeckLinkDeckControl_v7_9_StepForward(This,error) \ + ( (This)->lpVtbl -> StepForward(This,error) ) + +#define IDeckLinkDeckControl_v7_9_StepBack(This,error) \ + ( (This)->lpVtbl -> StepBack(This,error) ) + +#define IDeckLinkDeckControl_v7_9_Jog(This,rate,error) \ + ( (This)->lpVtbl -> Jog(This,rate,error) ) + +#define IDeckLinkDeckControl_v7_9_Shuttle(This,rate,error) \ + ( (This)->lpVtbl -> Shuttle(This,rate,error) ) + +#define IDeckLinkDeckControl_v7_9_GetTimecodeString(This,currentTimeCode,error) \ + ( (This)->lpVtbl -> GetTimecodeString(This,currentTimeCode,error) ) + +#define IDeckLinkDeckControl_v7_9_GetTimecode(This,currentTimecode,error) \ + ( (This)->lpVtbl -> GetTimecode(This,currentTimecode,error) ) + +#define IDeckLinkDeckControl_v7_9_GetTimecodeBCD(This,currentTimecode,error) \ + ( (This)->lpVtbl -> GetTimecodeBCD(This,currentTimecode,error) ) + +#define IDeckLinkDeckControl_v7_9_SetPreroll(This,prerollSeconds) \ + ( (This)->lpVtbl -> SetPreroll(This,prerollSeconds) ) + +#define IDeckLinkDeckControl_v7_9_GetPreroll(This,prerollSeconds) \ + ( (This)->lpVtbl -> GetPreroll(This,prerollSeconds) ) + +#define IDeckLinkDeckControl_v7_9_SetExportOffset(This,exportOffsetFields) \ + ( (This)->lpVtbl -> SetExportOffset(This,exportOffsetFields) ) + +#define IDeckLinkDeckControl_v7_9_GetExportOffset(This,exportOffsetFields) \ + ( (This)->lpVtbl -> GetExportOffset(This,exportOffsetFields) ) + +#define IDeckLinkDeckControl_v7_9_GetManualExportOffset(This,deckManualExportOffsetFields) \ + ( (This)->lpVtbl -> GetManualExportOffset(This,deckManualExportOffsetFields) ) + +#define IDeckLinkDeckControl_v7_9_SetCaptureOffset(This,captureOffsetFields) \ + ( (This)->lpVtbl -> SetCaptureOffset(This,captureOffsetFields) ) + +#define IDeckLinkDeckControl_v7_9_GetCaptureOffset(This,captureOffsetFields) \ + ( (This)->lpVtbl -> GetCaptureOffset(This,captureOffsetFields) ) + +#define IDeckLinkDeckControl_v7_9_StartExport(This,inTimecode,outTimecode,exportModeOps,error) \ + ( (This)->lpVtbl -> StartExport(This,inTimecode,outTimecode,exportModeOps,error) ) + +#define IDeckLinkDeckControl_v7_9_StartCapture(This,useVITC,inTimecode,outTimecode,error) \ + ( (This)->lpVtbl -> StartCapture(This,useVITC,inTimecode,outTimecode,error) ) + +#define IDeckLinkDeckControl_v7_9_GetDeviceID(This,deviceId,error) \ + ( (This)->lpVtbl -> GetDeviceID(This,deviceId,error) ) + +#define IDeckLinkDeckControl_v7_9_Abort(This) \ + ( (This)->lpVtbl -> Abort(This) ) + +#define IDeckLinkDeckControl_v7_9_CrashRecordStart(This,error) \ + ( (This)->lpVtbl -> CrashRecordStart(This,error) ) + +#define IDeckLinkDeckControl_v7_9_CrashRecordStop(This,error) \ + ( (This)->lpVtbl -> CrashRecordStop(This,error) ) + +#define IDeckLinkDeckControl_v7_9_SetCallback(This,callback) \ + ( (This)->lpVtbl -> SetCallback(This,callback) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__ */ + + #ifndef __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__ #define __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__ diff --git a/modules/decklink/interop/DeckLinkAPI_i.c b/modules/decklink/interop/DeckLinkAPI_i.c index 8405ab011..77ea1d9c6 100644 --- a/modules/decklink/interop/DeckLinkAPI_i.c +++ b/modules/decklink/interop/DeckLinkAPI_i.c @@ -6,7 +6,7 @@ /* File created by MIDL compiler version 7.00.0555 */ -/* at Wed Mar 09 22:31:19 2011 +/* at Sat May 07 17:24:25 2011 */ /* Compiler settings for interop\DeckLinkAPI.idl: Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 @@ -145,18 +145,24 @@ MIDL_DEFINE_GUID(IID, IID_IDeckLinkVideoConversion,0x3BBCB8A2,0xDA2C,0x42D9,0xB5 MIDL_DEFINE_GUID(IID, IID_IDeckLinkDeckControlStatusCallback,0xE5F693C1,0x4283,0x4716,0xB1,0x8F,0xC1,0x43,0x15,0x21,0x95,0x5B); -MIDL_DEFINE_GUID(IID, IID_IDeckLinkDeckControl,0xA4D81043,0x0619,0x42B7,0x8E,0xD6,0x60,0x2D,0x29,0x04,0x1D,0xF7); +MIDL_DEFINE_GUID(IID, IID_IDeckLinkDeckControl,0x522A9E39,0x0F3C,0x4742,0x94,0xEE,0xD8,0x0D,0xE3,0x35,0xDA,0x1D); MIDL_DEFINE_GUID(CLSID, CLSID_CDeckLinkIterator,0xD9EDA3B3,0x2887,0x41FA,0xB7,0x24,0x01,0x7C,0xF1,0xEB,0x1D,0x37); +MIDL_DEFINE_GUID(CLSID, CLSID_CDeckLinkAPIInformation,0x263CA19F,0xED09,0x482E,0x9F,0x9D,0x84,0x00,0x57,0x83,0xA2,0x37); + + MIDL_DEFINE_GUID(CLSID, CLSID_CDeckLinkGLScreenPreviewHelper,0xF63E77C7,0xB655,0x4A4A,0x9A,0xD0,0x3C,0xA8,0x5D,0x39,0x43,0x43); MIDL_DEFINE_GUID(CLSID, CLSID_CDeckLinkVideoConversion,0x7DBBBB11,0x5B7B,0x467D,0xAE,0xA4,0xCE,0xA4,0x68,0xFD,0x36,0x8C); +MIDL_DEFINE_GUID(IID, IID_IDeckLinkDeckControl_v7_9,0xA4D81043,0x0619,0x42B7,0x8E,0xD6,0x60,0x2D,0x29,0x04,0x1D,0xF7); + + MIDL_DEFINE_GUID(IID, IID_IDeckLinkDisplayModeIterator_v7_6,0x455D741F,0x1779,0x4800,0x86,0xF5,0x0B,0x5D,0x13,0xD7,0x97,0x51); diff --git a/modules/decklink/interop/DeckLinkAPI_v7_9.idl b/modules/decklink/interop/DeckLinkAPI_v7_9.idl new file mode 100644 index 000000000..5e57b1472 --- /dev/null +++ b/modules/decklink/interop/DeckLinkAPI_v7_9.idl @@ -0,0 +1,69 @@ +/* -LICENSE-START- +** Copyright (c) 2010 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ +/* DeckLinkAPI_v7_9.idl */ + +/* Interface IDeckLinkDeckControl_v7_9 - Deck Control main interface */ + +[ + object, + uuid(A4D81043-0619-42B7-8ED6-602D29041DF7), + helpstring("Deck Control main interface") +] interface IDeckLinkDeckControl_v7_9 : IUnknown +{ + HRESULT Open([in] BMDTimeScale timeScale, [in] BMDTimeValue timeValue, [in] BOOL timecodeIsDropFrame, [out] BMDDeckControlError *error); + HRESULT Close([in] BOOL standbyOn); + HRESULT GetCurrentState([out] BMDDeckControlMode *mode, [out] BMDDeckControlVTRControlState *vtrControlState, [out] BMDDeckControlStatusFlags *flags); + HRESULT SetStandby([in] BOOL standbyOn); + HRESULT Play([out] BMDDeckControlError *error); + HRESULT Stop([out] BMDDeckControlError *error); + HRESULT TogglePlayStop([out] BMDDeckControlError *error); + HRESULT Eject([out] BMDDeckControlError *error); + HRESULT GoToTimecode([in] BMDTimecodeBCD timecode, [out] BMDDeckControlError *error); + HRESULT FastForward([in] BOOL viewTape, [out] BMDDeckControlError *error); + HRESULT Rewind([in] BOOL viewTape, [out] BMDDeckControlError *error); + HRESULT StepForward([out] BMDDeckControlError *error); + HRESULT StepBack([out] BMDDeckControlError *error); + HRESULT Jog([in] double rate, [out] BMDDeckControlError *error); + HRESULT Shuttle([in] double rate, [out] BMDDeckControlError *error); + HRESULT GetTimecodeString([out] BSTR *currentTimeCode, [out] BMDDeckControlError *error); + HRESULT GetTimecode([out] IDeckLinkTimecode **currentTimecode, [out] BMDDeckControlError *error); + HRESULT GetTimecodeBCD([out] BMDTimecodeBCD *currentTimecode, [out] BMDDeckControlError *error); + HRESULT SetPreroll([in] unsigned long prerollSeconds); + HRESULT GetPreroll([out] unsigned long *prerollSeconds); + HRESULT SetExportOffset([in] long exportOffsetFields); + HRESULT GetExportOffset([out] long *exportOffsetFields); + HRESULT GetManualExportOffset([out] long *deckManualExportOffsetFields); + HRESULT SetCaptureOffset([in] long captureOffsetFields); + HRESULT GetCaptureOffset([out] long *captureOffsetFields); + HRESULT StartExport([in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [in] BMDDeckControlExportModeOpsFlags exportModeOps, [out] BMDDeckControlError *error); + HRESULT StartCapture([in] BOOL useVITC, [in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [out] BMDDeckControlError *error); + HRESULT GetDeviceID([out] unsigned short *deviceId, [out] BMDDeckControlError *error); + HRESULT Abort(void); + HRESULT CrashRecordStart([out] BMDDeckControlError *error); + HRESULT CrashRecordStop([out] BMDDeckControlError *error); + HRESULT SetCallback([in] IDeckLinkDeckControlStatusCallback *callback); +}; diff --git a/modules/ffmpeg/producer/ffmpeg_producer.cpp b/modules/ffmpeg/producer/ffmpeg_producer.cpp index 019c53e91..c4cf3df07 100644 --- a/modules/ffmpeg/producer/ffmpeg_producer.cpp +++ b/modules/ffmpeg/producer/ffmpeg_producer.cpp @@ -200,9 +200,9 @@ public: }; safe_ptr create_ffmpeg_producer(const safe_ptr& frame_factory, const std::vector& params) -{ +{ static const std::vector extensions = boost::assign::list_of - (L"mpg")(L"mpeg")(L"avi")(L"mov")(L"qt")(L"webm")(L"dv")(L"mp4")(L"f4v")(L"flv")(L"mkv")(L"mka")(L"wmw")(L"wma")(L"ogg")(L"divx")(L"wav")(L"mp3"); + (L"mpg")(L"mpeg")(L"avi")(L"mov")(L"qt")(L"webm")(L"dv")(L"mp4")(L"f4v")(L"flv")(L"mkv")(L"mka")(L"wmv")(L"wma")(L"ogg")(L"divx")(L"xvid")(L"wav")(L"mp3")(L"m2v"); std::wstring filename = env::media_folder() + L"\\" + params[0]; auto ext = std::find_if(extensions.begin(), extensions.end(), [&](const std::wstring& ex) -> bool diff --git a/modules/flash/producer/flash_producer.cpp b/modules/flash/producer/flash_producer.cpp index 7891c8f68..bf4813bae 100644 --- a/modules/flash/producer/flash_producer.cpp +++ b/modules/flash/producer/flash_producer.cpp @@ -218,7 +218,7 @@ public: if(!boost::filesystem::exists(filename)) BOOST_THROW_EXCEPTION(file_not_found() << boost::errinfo_file_name(narrow(filename))); - frame_buffer_.set_capacity(3); + frame_buffer_.set_capacity(2); graph_ = diagnostics::create_graph([this]{return print();}); graph_->set_color("output-buffer", diagnostics::color(0.0f, 1.0f, 0.0f)); diff --git a/shell/caspar.config b/shell/caspar.config index f374a208f..6c9680d51 100644 --- a/shell/caspar.config +++ b/shell/caspar.config @@ -17,6 +17,7 @@ 1 true + true external @@ -24,7 +25,7 @@ uniform true -