\r
static void* fast_memclr(void* dest, size_t count)\r
{\r
- assert(count % 128 == 0);\r
+ if(count < 2048)\r
+ return memset(dest, 0, count);\r
+\r
assert(dest != nullptr);\r
+ \r
+ size_t rest = count % 128;\r
+ count -= rest;\r
\r
__asm \r
{ \r
dec ebx; \r
jnz clr; \r
} \r
- return dest;\r
+ return memset(reinterpret_cast<char*>(dest)+count, 0, rest);\r
}\r
\r
}
\ No newline at end of file
\r
static void* fast_memcpy(void* dest, const void* source, size_t count)\r
{\r
- assert(count % 128 == 0);\r
assert(dest != nullptr);\r
assert(source != nullptr);\r
\r
\r
}\r
\r
-static void* fast_memcpy(void* dest, const void* source, size_t num)\r
+static void* fast_memcpy(void* dest, const void* source, size_t count)\r
{ \r
- if(num < 2048)\r
- return memcpy(dest, source, num);\r
+ if(count < 2048)\r
+ return memcpy(dest, source, count);\r
+\r
+ size_t rest = count % 128;\r
+ count -= rest;\r
\r
tbb::affinity_partitioner ap;\r
- tbb::parallel_for(tbb::blocked_range<size_t>(0, num/128), [&](const tbb::blocked_range<size_t>& r)\r
+ tbb::parallel_for(tbb::blocked_range<size_t>(0, count/128), [&](const tbb::blocked_range<size_t>& r)\r
{ \r
internal::fast_memcpy(reinterpret_cast<char*>(dest) + r.begin()*128, reinterpret_cast<const char*>(source) + r.begin()*128, r.size()*128); \r
- }, ap); \r
- return dest;\r
+ }, ap);\r
+\r
+ return memcpy(reinterpret_cast<char*>(dest)+count, reinterpret_cast<const char*>(source)+count, rest);\r
}\r
\r
\r
: format_desc_(format_desc)\r
, executor_(L"frame_consumer_device")\r
{ \r
- executor_.set_capacity(2);\r
+ executor_.set_capacity(1);\r
executor_.start();\r
}\r
\r
diag_->set_color("frame-time", diagnostics::color(1.0f, 0.0f, 0.0f));\r
diag_->set_color("tick-time", diagnostics::color(0.1f, 0.7f, 0.8f));\r
diag_->set_color("input-buffer", diagnostics::color(1.0f, 1.0f, 0.0f)); \r
- executor_.set_capacity(2); \r
+ executor_.set_capacity(1); \r
executor_.start();\r
CASPAR_LOG(info) << print() << L" Successfully initialized."; \r
}\r
~co_init(){CoUninitialize();}\r
} co_;\r
\r
- const size_t device_index_;\r
- const bool embed_audio_;\r
- const decklink_consumer::key key_;\r
+ const decklink_consumer::configuration config_;\r
\r
std::wstring model_name_;\r
tbb::atomic<bool> is_running_;\r
std::array<std::pair<void*, CComPtr<IDeckLinkMutableVideoFrame>>, 3> reserved_frames_;\r
boost::circular_buffer<std::vector<short>> audio_container_;\r
\r
- CComPtr<IDeckLink> decklink_;\r
- CComQIPtr<IDeckLinkOutput> output_;\r
+ CComPtr<IDeckLink> decklink_;\r
+ CComQIPtr<IDeckLinkOutput> output_;\r
+ CComQIPtr<IDeckLinkConfiguration> configuration_;\r
\r
core::video_format_desc format_desc_;\r
\r
tbb::concurrent_bounded_queue<std::shared_ptr<const core::read_frame>> audio_frame_buffer_;\r
\r
public:\r
- decklink_output(const core::video_format_desc& format_desc,size_t device_index, bool embed_audio, decklink_consumer::key key) \r
+ decklink_output(const decklink_consumer::configuration& config, const core::video_format_desc& format_desc) \r
: model_name_(L"DECKLINK")\r
- , device_index_(device_index)\r
+ , config_(config)\r
, audio_container_(5)\r
- , embed_audio_(embed_audio)\r
- , key_(key)\r
, frames_scheduled_(0)\r
, audio_scheduled_(0)\r
, format_desc_(format_desc)\r
BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " No Decklink drivers installed."));\r
\r
size_t n = 0;\r
- while(n < device_index_ && pDecklinkIterator->Next(&decklink_) == S_OK){++n;} \r
+ while(n < config_.device_index && pDecklinkIterator->Next(&decklink_) == S_OK){++n;} \r
\r
- if(n != device_index_ || !decklink_)\r
- BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Decklink card not found.") << arg_name_info("device_index") << arg_value_info(boost::lexical_cast<std::string>(device_index_)));\r
+ if(n != config_.device_index || !decklink_)\r
+ BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Decklink card not found.") << arg_name_info("device_index") << arg_value_info(boost::lexical_cast<std::string>(config_.device_index)));\r
\r
BSTR pModelName;\r
decklink_->GetModelName(&pModelName);\r
graph_->set_color("tick-time", diagnostics::color(0.1f, 0.7f, 0.8f));\r
\r
output_ = decklink_;\r
+ configuration_ = decklink_;\r
\r
auto display_mode = get_display_mode(output_.p, format_desc_.format);\r
if(display_mode == nullptr) \r
if(FAILED(output_->DoesSupportVideoMode(display_mode->GetDisplayMode(), bmdFormat8BitBGRA, bmdVideoOutputFlagDefault, &displayModeSupport, nullptr)))\r
BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Card does not support requested videoformat."));\r
\r
- if(embed_audio_)\r
+ if(config_.embed_audio)\r
{\r
if(FAILED(output_->EnableAudioOutput(bmdAudioSampleRate48kHz, bmdAudioSampleType16bitInteger, 2, bmdAudioOutputStreamTimestamped)))\r
BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Could not enable audio output."));\r
CASPAR_LOG(info) << print() << L" Enabled embedded-audio.";\r
}\r
\r
+ if(config_.low_latency)\r
+ configuration_->SetFlag(bmdDeckLinkConfigLowLatencyVideoOutput, true);\r
+ \r
if(FAILED(output_->EnableVideoOutput(display_mode->GetDisplayMode(), bmdVideoOutputFlagDefault))) \r
BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Could not enable video output."));\r
-\r
+ \r
if(FAILED(output_->SetScheduledFrameCompletionCallback(this)))\r
BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Failed to set playback completion callback."));\r
\r
CComQIPtr<IDeckLinkKeyer> keyer = decklink_;\r
- if(key_ == decklink_consumer::internal_key) \r
+ if(config_.keyer == decklink_consumer::internal_key) \r
{\r
if(FAILED(keyer->Enable(FALSE))) \r
CASPAR_LOG(error) << print() << L" Failed to enable internal keyer."; \r
else\r
CASPAR_LOG(info) << print() << L" Successfully configured internal keyer."; \r
}\r
- else if(key_ == decklink_consumer::external_key)\r
+ else if(config.keyer == decklink_consumer::external_key)\r
{\r
if(FAILED(keyer->Enable(TRUE))) \r
CASPAR_LOG(error) << print() << L" Failed to enable external keyer."; \r
for(size_t n = 0; n < std::max<size_t>(2, buffer_size-2); ++n)\r
{\r
video_frame_buffer_.try_push(core::read_frame::empty());\r
- if(embed_audio_)\r
+ if(config_.embed_audio)\r
audio_frame_buffer_.try_push(core::read_frame::empty());\r
}\r
\r
if(output_ != nullptr) \r
{\r
output_->StopScheduledPlayback(0, nullptr, 0);\r
- if(embed_audio_)\r
+ if(config_.embed_audio)\r
output_->DisableAudioOutput();\r
output_->DisableVideoOutput();\r
}\r
void send(const safe_ptr<const core::read_frame>& frame)\r
{\r
video_frame_buffer_.push(frame);\r
- if(embed_audio_)\r
+ if(config_.embed_audio)\r
audio_frame_buffer_.push(frame);\r
}\r
\r
std::wstring print() const\r
{\r
- return model_name_ + L" [" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
+ return model_name_ + L" [" + boost::lexical_cast<std::wstring>(config_.device_index) + L"]";\r
}\r
};\r
\r
struct decklink_consumer::implementation\r
{\r
std::unique_ptr<decklink_output> input_;\r
- size_t device_index_;\r
- bool embed_audio_;\r
- decklink_consumer::key key_;\r
+ decklink_consumer::configuration config_;\r
\r
executor executor_;\r
public:\r
\r
- implementation(size_t device_index, bool embed_audio, decklink_consumer::key key)\r
- : device_index_(device_index)\r
- , embed_audio_(embed_audio)\r
- , key_(key)\r
- , executor_(L"DECKLINK[" + boost::lexical_cast<std::wstring>(device_index) + L"]")\r
+ implementation(const decklink_consumer::configuration& config)\r
+ : config_(config)\r
+ , executor_(L"DECKLINK[" + boost::lexical_cast<std::wstring>(config.device_index) + L"]")\r
{\r
executor_.start();\r
}\r
{\r
executor_.invoke([&]\r
{\r
- input_.reset(new decklink_output(format_desc, device_index_, embed_audio_, key_));\r
+ input_.reset(new decklink_output(config_, format_desc));\r
});\r
}\r
\r
}\r
};\r
\r
-decklink_consumer::decklink_consumer(size_t device_index, bool embed_audio, key key) : impl_(new implementation(device_index, embed_audio, key)){}\r
+decklink_consumer::decklink_consumer(const configuration& config) : impl_(new implementation(config)){}\r
decklink_consumer::decklink_consumer(decklink_consumer&& other) : impl_(std::move(other.impl_)){}\r
void decklink_consumer::initialize(const core::video_format_desc& format_desc){impl_->initialize(format_desc);}\r
void decklink_consumer::send(const safe_ptr<const core::read_frame>& frame){impl_->send(frame);}\r
size_t decklink_consumer::buffer_depth() const{return impl_->buffer_depth();}\r
std::wstring decklink_consumer::print() const{return impl_->print();}\r
\r
-safe_ptr<core::frame_consumer> create_decklink_consumer(const std::vector<std::wstring>& params)\r
+safe_ptr<core::frame_consumer> create_decklink_consumer(const std::vector<std::wstring>& params) \r
{\r
if(params.size() < 1 || params[0] != L"DECKLINK")\r
return core::frame_consumer::empty();\r
\r
- int device_index = 1;\r
- bool embed_audio = false;\r
- auto key = decklink_consumer::default_key;\r
+ decklink_consumer::configuration config;\r
\r
if(params.size() > 1) \r
- device_index = lexical_cast_or_default<int>(params[2], device_index);\r
+ config.device_index = lexical_cast_or_default<int>(params[2], config.device_index);\r
\r
if(params.size() > 2)\r
- embed_audio = lexical_cast_or_default<bool>(params[3], embed_audio);\r
+ config.embed_audio = lexical_cast_or_default<bool>(params[3], config.embed_audio);\r
\r
-\r
if(params.size() > 3) \r
{\r
if(params[4] == L"INTERNAL_KEY")\r
- key = decklink_consumer::internal_key;\r
+ config.keyer = decklink_consumer::internal_key;\r
else if(params[4] == L"EXTERNAL_KEY")\r
- key = decklink_consumer::external_key;\r
+ config.keyer = decklink_consumer::external_key;\r
}\r
\r
- return make_safe<decklink_consumer>(device_index, embed_audio, key);\r
+ return make_safe<decklink_consumer>(config);\r
}\r
\r
}
\ No newline at end of file
default_key\r
};\r
\r
- explicit decklink_consumer(size_t device_index, bool embed_audio = false, key key = default_key);\r
+ struct configuration\r
+ {\r
+ size_t device_index;\r
+ bool embed_audio;\r
+ key keyer;\r
+ bool low_latency;\r
+\r
+ configuration() \r
+ : device_index(1)\r
+ , embed_audio(false)\r
+ , keyer(default_key)\r
+ , low_latency(false){}\r
+ };\r
+\r
+ explicit decklink_consumer(const configuration& config);\r
decklink_consumer(decklink_consumer&& other);\r
\r
virtual void initialize(const core::video_format_desc& format_desc);\r
</ClCompile>\r
<ClCompile Include="decklink.cpp" />\r
<ClCompile Include="interop\DeckLinkAPI_i.c">\r
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">NotUsing</PrecompiledHeader>\r
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>\r
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">NotUsing</PrecompiledHeader>\r
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">NotUsing</PrecompiledHeader>\r
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>\r
</ClCompile>\r
<ItemGroup>\r
<ClInclude Include="consumer\decklink_consumer.h" />\r
<ClInclude Include="decklink.h" />\r
+ <ClInclude Include="interop\DeckLinkAPIVersion.h" />\r
<ClInclude Include="interop\DeckLinkAPI_h.h" />\r
<ClInclude Include="producer\decklink_producer.h" />\r
<ClInclude Include="StdAfx.h" />\r
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">interop\</OutputDirectory>\r
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">interop\</OutputDirectory>\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">true</ExcludedFromBuild>\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
</Midl>\r
<Midl Include="interop\DeckLinkAPI_v7_1.idl">\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>\r
</Filter>\r
</ItemGroup>\r
<ItemGroup>\r
- <ClCompile Include="interop\DeckLinkAPI_i.c">\r
- <Filter>interop</Filter>\r
- </ClCompile>\r
<ClCompile Include="consumer\decklink_consumer.cpp">\r
<Filter>consumer</Filter>\r
</ClCompile>\r
</ClCompile>\r
<ClCompile Include="decklink.cpp" />\r
<ClCompile Include="StdAfx.cpp" />\r
+ <ClCompile Include="interop\DeckLinkAPI_i.c">\r
+ <Filter>interop</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
- <ClInclude Include="interop\DeckLinkAPI_h.h">\r
- <Filter>interop</Filter>\r
- </ClInclude>\r
<ClInclude Include="consumer\decklink_consumer.h">\r
<Filter>consumer</Filter>\r
</ClInclude>\r
<ClInclude Include="util\util.h">\r
<Filter>util</Filter>\r
</ClInclude>\r
+ <ClInclude Include="interop\DeckLinkAPIVersion.h">\r
+ <Filter>interop</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="interop\DeckLinkAPI_h.h">\r
+ <Filter>interop</Filter>\r
+ </ClInclude>\r
</ItemGroup>\r
<ItemGroup>\r
<Midl Include="interop\DeckLinkAPI_v7_1.idl">\r
/* -LICENSE-START-\r
-** Copyright (c) 2009 Blackmagic Design\r
+** Copyright (c) 2011 Blackmagic Design\r
**\r
** Permission is hereby granted, free of charge, to any person or organization\r
** obtaining a copy of the software and accompanying documentation covered by\r
\r
typedef [v1_enum] enum _BMDTimecodeFormat {\r
bmdTimecodeRP188 = /* 'rp18' */ 0x72703138,\r
+ bmdTimecodeRP188Field2 = /* 'rp12' */ 0x72703132,\r
bmdTimecodeVITC = /* 'vitc' */ 0x76697463,\r
+ bmdTimecodeVITCField2 = /* 'vit2' */ 0x76697432,\r
bmdTimecodeSerial = /* 'seri' */ 0x73657269\r
} BMDTimecodeFormat;\r
\r
} BMDVideo3DPackingFormat;\r
\r
\r
+/* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */\r
+\r
+typedef [v1_enum] enum _BMDIdleVideoOutputOperation {\r
+ bmdIdleVideoOutputBlack = /* 'blac' */ 0x626C6163,\r
+ bmdIdleVideoOutputLastFrame = /* 'lafa' */ 0x6C616661\r
+} BMDIdleVideoOutputOperation;\r
+\r
+\r
/* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */\r
\r
typedef [v1_enum] enum _BMDDeckLinkConfigurationID {\r
\r
+ /* Serial port Flags */\r
+\r
+ bmdDeckLinkConfigSwapSerialRxTx = /* 'ssrt' */ 0x73737274,\r
+\r
/* Video Input/Output Flags */\r
\r
bmdDeckLinkConfigUse1080pNotPsF = /* 'fpro' */ 0x6670726F,\r
/* Video Input/Output Integers */\r
\r
bmdDeckLinkConfigHDMI3DPackingFormat = /* '3dpf' */ 0x33647066,\r
+ bmdDeckLinkConfigBypass = /* 'byps' */ 0x62797073,\r
\r
/* Audio Input/Output Flags */\r
\r
bmdDeckLinkConfigVideoOutputConversionMode = /* 'vocm' */ 0x766F636D,\r
bmdDeckLinkConfigAnalogVideoOutputFlags = /* 'avof' */ 0x61766F66,\r
bmdDeckLinkConfigReferenceInputTimingOffset = /* 'glot' */ 0x676C6F74,\r
+ bmdDeckLinkConfigVideoOutputIdleOperation = /* 'voio' */ 0x766F696F,\r
+\r
+ /* Video Output Floats */\r
+\r
+ bmdDeckLinkConfigVideoOutputComponentLumaGain = /* 'oclg' */ 0x6F636C67,\r
+ bmdDeckLinkConfigVideoOutputComponentChromaBlueGain = /* 'occb' */ 0x6F636362,\r
+ bmdDeckLinkConfigVideoOutputComponentChromaRedGain = /* 'occr' */ 0x6F636372,\r
+ bmdDeckLinkConfigVideoOutputCompositeLumaGain = /* 'oilg' */ 0x6F696C67,\r
+ bmdDeckLinkConfigVideoOutputCompositeChromaGain = /* 'oicg' */ 0x6F696367,\r
+ bmdDeckLinkConfigVideoOutputSVideoLumaGain = /* 'oslg' */ 0x6F736C67,\r
+ bmdDeckLinkConfigVideoOutputSVideoChromaGain = /* 'oscg' */ 0x6F736367,\r
\r
/* Video Input Integers */\r
\r
bmdDeckLinkConfigVANCSourceLine2Mapping = /* 'vsl2' */ 0x76736C32,\r
bmdDeckLinkConfigVANCSourceLine3Mapping = /* 'vsl3' */ 0x76736C33,\r
\r
+ /* Video Input Floats */\r
+\r
+ bmdDeckLinkConfigVideoInputComponentLumaGain = /* 'iclg' */ 0x69636C67,\r
+ bmdDeckLinkConfigVideoInputComponentChromaBlueGain = /* 'iccb' */ 0x69636362,\r
+ bmdDeckLinkConfigVideoInputComponentChromaRedGain = /* 'iccr' */ 0x69636372,\r
+ bmdDeckLinkConfigVideoInputCompositeLumaGain = /* 'iilg' */ 0x69696C67,\r
+ bmdDeckLinkConfigVideoInputCompositeChromaGain = /* 'iicg' */ 0x69696367,\r
+ bmdDeckLinkConfigVideoInputSVideoLumaGain = /* 'islg' */ 0x69736C67,\r
+ bmdDeckLinkConfigVideoInputSVideoChromaGain = /* 'iscg' */ 0x69736367,\r
+\r
/* Audio Input Integers */\r
\r
bmdDeckLinkConfigAudioInputConnection = /* 'aicn' */ 0x6169636E,\r
BMDDeckLinkSupportsInputFormatDetection = /* 'infd' */ 0x696E6664,\r
BMDDeckLinkHasReferenceInput = /* 'hrin' */ 0x6872696E,\r
BMDDeckLinkHasSerialPort = /* 'hspt' */ 0x68737074,\r
+ BMDDeckLinkHasAnalogVideoOutputGain = /* 'avog' */ 0x61766F67,\r
+ BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = /* 'ovog' */ 0x6F766F67,\r
+ BMDDeckLinkHasVideoInputAntiAliasingFilter = /* 'aafl' */ 0x6161666C,\r
+ BMDDeckLinkHasBypass = /* 'byps' */ 0x62797073,\r
\r
/* Integers */\r
\r
BMDDeckLinkVideoOutputConnections = /* 'vocn' */ 0x766F636E,\r
BMDDeckLinkVideoInputConnections = /* 'vicn' */ 0x7669636E,\r
\r
+ /* Floats */\r
+\r
+ BMDDeckLinkVideoInputGainMinimum = /* 'vigm' */ 0x7669676D,\r
+ BMDDeckLinkVideoInputGainMaximum = /* 'vigx' */ 0x76696778,\r
+ BMDDeckLinkVideoOutputGainMinimum = /* 'vogm' */ 0x766F676D,\r
+ BMDDeckLinkVideoOutputGainMaximum = /* 'vogx' */ 0x766F6778,\r
+\r
/* Strings */\r
\r
BMDDeckLinkSerialPortDeviceName = /* 'slpn' */ 0x736C706E\r
bmdDeckControlNoTapeInDeckError = /* 'nter' */ 0x6E746572,\r
bmdDeckControlNoVideoFromCardError = /* 'nvfc' */ 0x6E766663,\r
bmdDeckControlNoCommunicationError = /* 'ncom' */ 0x6E636F6D,\r
+ bmdDeckControlBufferTooSmallError = /* 'btsm' */ 0x6274736D,\r
+ bmdDeckControlBadChecksumError = /* 'chks' */ 0x63686B73,\r
bmdDeckControlUnknownError = /* 'uner' */ 0x756E6572\r
} BMDDeckControlError;\r
\r
\r
[\r
object,\r
- uuid(A4D81043-0619-42B7-8ED6-602D29041DF7),\r
+ uuid(522A9E39-0F3C-4742-94EE-D80DE335DA1D),\r
helpstring("Deck Control main interface")\r
] interface IDeckLinkDeckControl : IUnknown\r
{\r
HRESULT Close([in] BOOL standbyOn);\r
HRESULT GetCurrentState([out] BMDDeckControlMode *mode, [out] BMDDeckControlVTRControlState *vtrControlState, [out] BMDDeckControlStatusFlags *flags);\r
HRESULT SetStandby([in] BOOL standbyOn);\r
+ 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);\r
HRESULT Play([out] BMDDeckControlError *error);\r
HRESULT Stop([out] BMDDeckControlError *error);\r
HRESULT TogglePlayStop([out] BMDDeckControlError *error);\r
[default] interface IDeckLinkIterator;\r
};\r
\r
+[\r
+ uuid(263CA19F-ED09-482E-9F9D-84005783A237),\r
+ helpstring("CDeckLinkAPIInformation Class")\r
+] coclass CDeckLinkAPIInformation\r
+{\r
+ [default] interface IDeckLinkAPIInformation;\r
+};\r
+\r
[\r
uuid(F63E77C7-B655-4A4A-9AD0-3CA85D394343),\r
helpstring("CDeckLinkGLScreenPreviewHelper Class")\r
\r
\r
// import deprecated interfaces\r
+#include "DeckLinkAPI_v7_9.idl"\r
#include "DeckLinkAPI_v7_6.idl"\r
#include "DeckLinkAPI_v7_3.idl"\r
#include "DeckLinkAPI_v7_1.idl"\r
--- /dev/null
+/* -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__
+
\r
\r
/* File created by MIDL compiler version 7.00.0555 */\r
-/* at Wed Mar 09 22:31:19 2011\r
+/* at Sat May 07 17:24:25 2011\r
*/\r
/* Compiler settings for interop\DeckLinkAPI.idl:\r
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
#endif /* __CDeckLinkIterator_FWD_DEFINED__ */\r
\r
\r
+#ifndef __CDeckLinkAPIInformation_FWD_DEFINED__\r
+#define __CDeckLinkAPIInformation_FWD_DEFINED__\r
+\r
+#ifdef __cplusplus\r
+typedef class CDeckLinkAPIInformation CDeckLinkAPIInformation;\r
+#else\r
+typedef struct CDeckLinkAPIInformation CDeckLinkAPIInformation;\r
+#endif /* __cplusplus */\r
+\r
+#endif /* __CDeckLinkAPIInformation_FWD_DEFINED__ */\r
+\r
+\r
#ifndef __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__\r
#define __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__\r
\r
#endif /* __CDeckLinkVideoConversion_FWD_DEFINED__ */\r
\r
\r
+#ifndef __IDeckLinkDeckControl_v7_9_FWD_DEFINED__\r
+#define __IDeckLinkDeckControl_v7_9_FWD_DEFINED__\r
+typedef interface IDeckLinkDeckControl_v7_9 IDeckLinkDeckControl_v7_9;\r
+#endif /* __IDeckLinkDeckControl_v7_9_FWD_DEFINED__ */\r
+\r
+\r
#ifndef __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__\r
#define __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__\r
typedef interface IDeckLinkDisplayModeIterator_v7_6 IDeckLinkDisplayModeIterator_v7_6;\r
typedef /* [v1_enum] */ \r
enum _BMDTimecodeFormat\r
{ bmdTimecodeRP188 = 0x72703138,\r
+ bmdTimecodeRP188Field2 = 0x72703132,\r
bmdTimecodeVITC = 0x76697463,\r
+ bmdTimecodeVITCField2 = 0x76697432,\r
bmdTimecodeSerial = 0x73657269\r
} BMDTimecodeFormat;\r
\r
bmdVideo3DPackingRightOnly = 0x72696768\r
} BMDVideo3DPackingFormat;\r
\r
+typedef /* [v1_enum] */ \r
+enum _BMDIdleVideoOutputOperation\r
+ { bmdIdleVideoOutputBlack = 0x626c6163,\r
+ bmdIdleVideoOutputLastFrame = 0x6c616661\r
+ } BMDIdleVideoOutputOperation;\r
+\r
typedef /* [v1_enum] */ \r
enum _BMDDeckLinkConfigurationID\r
- { bmdDeckLinkConfigUse1080pNotPsF = 0x6670726f,\r
+ { bmdDeckLinkConfigSwapSerialRxTx = 0x73737274,\r
+ bmdDeckLinkConfigUse1080pNotPsF = 0x6670726f,\r
bmdDeckLinkConfigHDMI3DPackingFormat = 0x33647066,\r
+ bmdDeckLinkConfigBypass = 0x62797073,\r
bmdDeckLinkConfigAnalogAudioConsumerLevels = 0x6161636c,\r
bmdDeckLinkConfigFieldFlickerRemoval = 0x66646672,\r
bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion = 0x746f3539,\r
bmdDeckLinkConfigVideoOutputConversionMode = 0x766f636d,\r
bmdDeckLinkConfigAnalogVideoOutputFlags = 0x61766f66,\r
bmdDeckLinkConfigReferenceInputTimingOffset = 0x676c6f74,\r
+ bmdDeckLinkConfigVideoOutputIdleOperation = 0x766f696f,\r
+ bmdDeckLinkConfigVideoOutputComponentLumaGain = 0x6f636c67,\r
+ bmdDeckLinkConfigVideoOutputComponentChromaBlueGain = 0x6f636362,\r
+ bmdDeckLinkConfigVideoOutputComponentChromaRedGain = 0x6f636372,\r
+ bmdDeckLinkConfigVideoOutputCompositeLumaGain = 0x6f696c67,\r
+ bmdDeckLinkConfigVideoOutputCompositeChromaGain = 0x6f696367,\r
+ bmdDeckLinkConfigVideoOutputSVideoLumaGain = 0x6f736c67,\r
+ bmdDeckLinkConfigVideoOutputSVideoChromaGain = 0x6f736367,\r
bmdDeckLinkConfigVideoInputConnection = 0x7669636e,\r
bmdDeckLinkConfigAnalogVideoInputFlags = 0x61766966,\r
bmdDeckLinkConfigVideoInputConversionMode = 0x7669636d,\r
bmdDeckLinkConfigVANCSourceLine1Mapping = 0x76736c31,\r
bmdDeckLinkConfigVANCSourceLine2Mapping = 0x76736c32,\r
bmdDeckLinkConfigVANCSourceLine3Mapping = 0x76736c33,\r
+ bmdDeckLinkConfigVideoInputComponentLumaGain = 0x69636c67,\r
+ bmdDeckLinkConfigVideoInputComponentChromaBlueGain = 0x69636362,\r
+ bmdDeckLinkConfigVideoInputComponentChromaRedGain = 0x69636372,\r
+ bmdDeckLinkConfigVideoInputCompositeLumaGain = 0x69696c67,\r
+ bmdDeckLinkConfigVideoInputCompositeChromaGain = 0x69696367,\r
+ bmdDeckLinkConfigVideoInputSVideoLumaGain = 0x69736c67,\r
+ bmdDeckLinkConfigVideoInputSVideoChromaGain = 0x69736367,\r
bmdDeckLinkConfigAudioInputConnection = 0x6169636e,\r
bmdDeckLinkConfigAnalogAudioInputScaleChannel1 = 0x61697331,\r
bmdDeckLinkConfigAnalogAudioInputScaleChannel2 = 0x61697332,\r
BMDDeckLinkSupportsInputFormatDetection = 0x696e6664,\r
BMDDeckLinkHasReferenceInput = 0x6872696e,\r
BMDDeckLinkHasSerialPort = 0x68737074,\r
+ BMDDeckLinkHasAnalogVideoOutputGain = 0x61766f67,\r
+ BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = 0x6f766f67,\r
+ BMDDeckLinkHasVideoInputAntiAliasingFilter = 0x6161666c,\r
+ BMDDeckLinkHasBypass = 0x62797073,\r
BMDDeckLinkMaximumAudioChannels = 0x6d616368,\r
BMDDeckLinkNumberOfSubDevices = 0x6e736264,\r
BMDDeckLinkSubDeviceIndex = 0x73756269,\r
BMDDeckLinkVideoOutputConnections = 0x766f636e,\r
BMDDeckLinkVideoInputConnections = 0x7669636e,\r
+ BMDDeckLinkVideoInputGainMinimum = 0x7669676d,\r
+ BMDDeckLinkVideoInputGainMaximum = 0x76696778,\r
+ BMDDeckLinkVideoOutputGainMinimum = 0x766f676d,\r
+ BMDDeckLinkVideoOutputGainMaximum = 0x766f6778,\r
BMDDeckLinkSerialPortDeviceName = 0x736c706e\r
} BMDDeckLinkAttributeID;\r
\r
bmdDeckControlNoTapeInDeckError = 0x6e746572,\r
bmdDeckControlNoVideoFromCardError = 0x6e766663,\r
bmdDeckControlNoCommunicationError = 0x6e636f6d,\r
+ bmdDeckControlBufferTooSmallError = 0x6274736d,\r
+ bmdDeckControlBadChecksumError = 0x63686b73,\r
bmdDeckControlUnknownError = 0x756e6572\r
} BMDDeckControlError;\r
\r
\r
#if defined(__cplusplus) && !defined(CINTERFACE)\r
\r
- MIDL_INTERFACE("A4D81043-0619-42B7-8ED6-602D29041DF7")\r
+ MIDL_INTERFACE("522A9E39-0F3C-4742-94EE-D80DE335DA1D")\r
IDeckLinkDeckControl : public IUnknown\r
{\r
public:\r
virtual HRESULT STDMETHODCALLTYPE SetStandby( \r
/* [in] */ BOOL standbyOn) = 0;\r
\r
+ virtual HRESULT STDMETHODCALLTYPE SendCommand( \r
+ /* [in] */ unsigned char *inBuffer,\r
+ /* [in] */ unsigned long inBufferSize,\r
+ /* [out] */ unsigned char *outBuffer,\r
+ /* [out] */ unsigned long *outDataSize,\r
+ /* [in] */ unsigned long outBufferSize,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
virtual HRESULT STDMETHODCALLTYPE Play( \r
/* [out] */ BMDDeckControlError *error) = 0;\r
\r
IDeckLinkDeckControl * This,\r
/* [in] */ BOOL standbyOn);\r
\r
+ HRESULT ( STDMETHODCALLTYPE *SendCommand )( \r
+ IDeckLinkDeckControl * This,\r
+ /* [in] */ unsigned char *inBuffer,\r
+ /* [in] */ unsigned long inBufferSize,\r
+ /* [out] */ unsigned char *outBuffer,\r
+ /* [out] */ unsigned long *outDataSize,\r
+ /* [in] */ unsigned long outBufferSize,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
HRESULT ( STDMETHODCALLTYPE *Play )( \r
IDeckLinkDeckControl * This,\r
/* [out] */ BMDDeckControlError *error);\r
#define IDeckLinkDeckControl_SetStandby(This,standbyOn) \\r
( (This)->lpVtbl -> SetStandby(This,standbyOn) ) \r
\r
+#define IDeckLinkDeckControl_SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error) \\r
+ ( (This)->lpVtbl -> SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error) ) \r
+\r
#define IDeckLinkDeckControl_Play(This,error) \\r
( (This)->lpVtbl -> Play(This,error) ) \r
\r
CDeckLinkIterator;\r
#endif\r
\r
+EXTERN_C const CLSID CLSID_CDeckLinkAPIInformation;\r
+\r
+#ifdef __cplusplus\r
+\r
+class DECLSPEC_UUID("263CA19F-ED09-482E-9F9D-84005783A237")\r
+CDeckLinkAPIInformation;\r
+#endif\r
+\r
EXTERN_C const CLSID CLSID_CDeckLinkGLScreenPreviewHelper;\r
\r
#ifdef __cplusplus\r
CDeckLinkVideoConversion;\r
#endif\r
\r
+#ifndef __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__\r
+#define __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__\r
+\r
+/* interface IDeckLinkDeckControl_v7_9 */\r
+/* [helpstring][uuid][object] */ \r
+\r
+\r
+EXTERN_C const IID IID_IDeckLinkDeckControl_v7_9;\r
+\r
+#if defined(__cplusplus) && !defined(CINTERFACE)\r
+ \r
+ MIDL_INTERFACE("A4D81043-0619-42B7-8ED6-602D29041DF7")\r
+ IDeckLinkDeckControl_v7_9 : public IUnknown\r
+ {\r
+ public:\r
+ virtual HRESULT STDMETHODCALLTYPE Open( \r
+ /* [in] */ BMDTimeScale timeScale,\r
+ /* [in] */ BMDTimeValue timeValue,\r
+ /* [in] */ BOOL timecodeIsDropFrame,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE Close( \r
+ /* [in] */ BOOL standbyOn) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GetCurrentState( \r
+ /* [out] */ BMDDeckControlMode *mode,\r
+ /* [out] */ BMDDeckControlVTRControlState *vtrControlState,\r
+ /* [out] */ BMDDeckControlStatusFlags *flags) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE SetStandby( \r
+ /* [in] */ BOOL standbyOn) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE Play( \r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE Stop( \r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE TogglePlayStop( \r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE Eject( \r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GoToTimecode( \r
+ /* [in] */ BMDTimecodeBCD timecode,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE FastForward( \r
+ /* [in] */ BOOL viewTape,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE Rewind( \r
+ /* [in] */ BOOL viewTape,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE StepForward( \r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE StepBack( \r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE Jog( \r
+ /* [in] */ double rate,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE Shuttle( \r
+ /* [in] */ double rate,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GetTimecodeString( \r
+ /* [out] */ BSTR *currentTimeCode,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GetTimecode( \r
+ /* [out] */ IDeckLinkTimecode **currentTimecode,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GetTimecodeBCD( \r
+ /* [out] */ BMDTimecodeBCD *currentTimecode,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE SetPreroll( \r
+ /* [in] */ unsigned long prerollSeconds) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GetPreroll( \r
+ /* [out] */ unsigned long *prerollSeconds) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE SetExportOffset( \r
+ /* [in] */ long exportOffsetFields) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GetExportOffset( \r
+ /* [out] */ long *exportOffsetFields) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GetManualExportOffset( \r
+ /* [out] */ long *deckManualExportOffsetFields) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE SetCaptureOffset( \r
+ /* [in] */ long captureOffsetFields) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GetCaptureOffset( \r
+ /* [out] */ long *captureOffsetFields) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE StartExport( \r
+ /* [in] */ BMDTimecodeBCD inTimecode,\r
+ /* [in] */ BMDTimecodeBCD outTimecode,\r
+ /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE StartCapture( \r
+ /* [in] */ BOOL useVITC,\r
+ /* [in] */ BMDTimecodeBCD inTimecode,\r
+ /* [in] */ BMDTimecodeBCD outTimecode,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE GetDeviceID( \r
+ /* [out] */ unsigned short *deviceId,\r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE CrashRecordStart( \r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE CrashRecordStop( \r
+ /* [out] */ BMDDeckControlError *error) = 0;\r
+ \r
+ virtual HRESULT STDMETHODCALLTYPE SetCallback( \r
+ /* [in] */ IDeckLinkDeckControlStatusCallback *callback) = 0;\r
+ \r
+ };\r
+ \r
+#else /* C style interface */\r
+\r
+ typedef struct IDeckLinkDeckControl_v7_9Vtbl\r
+ {\r
+ BEGIN_INTERFACE\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ REFIID riid,\r
+ /* [annotation][iid_is][out] */ \r
+ __RPC__deref_out void **ppvObject);\r
+ \r
+ ULONG ( STDMETHODCALLTYPE *AddRef )( \r
+ IDeckLinkDeckControl_v7_9 * This);\r
+ \r
+ ULONG ( STDMETHODCALLTYPE *Release )( \r
+ IDeckLinkDeckControl_v7_9 * This);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *Open )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ BMDTimeScale timeScale,\r
+ /* [in] */ BMDTimeValue timeValue,\r
+ /* [in] */ BOOL timecodeIsDropFrame,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *Close )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ BOOL standbyOn);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDDeckControlMode *mode,\r
+ /* [out] */ BMDDeckControlVTRControlState *vtrControlState,\r
+ /* [out] */ BMDDeckControlStatusFlags *flags);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *SetStandby )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ BOOL standbyOn);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *Play )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *Stop )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *Eject )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ BMDTimecodeBCD timecode,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *FastForward )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ BOOL viewTape,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *Rewind )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ BOOL viewTape,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *StepForward )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *StepBack )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *Jog )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ double rate,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *Shuttle )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ double rate,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BSTR *currentTimeCode,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GetTimecode )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ IDeckLinkTimecode **currentTimecode,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDTimecodeBCD *currentTimecode,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *SetPreroll )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ unsigned long prerollSeconds);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GetPreroll )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ unsigned long *prerollSeconds);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ long exportOffsetFields);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ long *exportOffsetFields);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ long *deckManualExportOffsetFields);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ long captureOffsetFields);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ long *captureOffsetFields);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *StartExport )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ BMDTimecodeBCD inTimecode,\r
+ /* [in] */ BMDTimecodeBCD outTimecode,\r
+ /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *StartCapture )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ BOOL useVITC,\r
+ /* [in] */ BMDTimecodeBCD inTimecode,\r
+ /* [in] */ BMDTimecodeBCD outTimecode,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ unsigned short *deviceId,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *Abort )( \r
+ IDeckLinkDeckControl_v7_9 * This);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [out] */ BMDDeckControlError *error);\r
+ \r
+ HRESULT ( STDMETHODCALLTYPE *SetCallback )( \r
+ IDeckLinkDeckControl_v7_9 * This,\r
+ /* [in] */ IDeckLinkDeckControlStatusCallback *callback);\r
+ \r
+ END_INTERFACE\r
+ } IDeckLinkDeckControl_v7_9Vtbl;\r
+\r
+ interface IDeckLinkDeckControl_v7_9\r
+ {\r
+ CONST_VTBL struct IDeckLinkDeckControl_v7_9Vtbl *lpVtbl;\r
+ };\r
+\r
+ \r
+\r
+#ifdef COBJMACROS\r
+\r
+\r
+#define IDeckLinkDeckControl_v7_9_QueryInterface(This,riid,ppvObject) \\r
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_AddRef(This) \\r
+ ( (This)->lpVtbl -> AddRef(This) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_Release(This) \\r
+ ( (This)->lpVtbl -> Release(This) ) \r
+\r
+\r
+#define IDeckLinkDeckControl_v7_9_Open(This,timeScale,timeValue,timecodeIsDropFrame,error) \\r
+ ( (This)->lpVtbl -> Open(This,timeScale,timeValue,timecodeIsDropFrame,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_Close(This,standbyOn) \\r
+ ( (This)->lpVtbl -> Close(This,standbyOn) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GetCurrentState(This,mode,vtrControlState,flags) \\r
+ ( (This)->lpVtbl -> GetCurrentState(This,mode,vtrControlState,flags) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_SetStandby(This,standbyOn) \\r
+ ( (This)->lpVtbl -> SetStandby(This,standbyOn) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_Play(This,error) \\r
+ ( (This)->lpVtbl -> Play(This,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_Stop(This,error) \\r
+ ( (This)->lpVtbl -> Stop(This,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_TogglePlayStop(This,error) \\r
+ ( (This)->lpVtbl -> TogglePlayStop(This,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_Eject(This,error) \\r
+ ( (This)->lpVtbl -> Eject(This,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GoToTimecode(This,timecode,error) \\r
+ ( (This)->lpVtbl -> GoToTimecode(This,timecode,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_FastForward(This,viewTape,error) \\r
+ ( (This)->lpVtbl -> FastForward(This,viewTape,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_Rewind(This,viewTape,error) \\r
+ ( (This)->lpVtbl -> Rewind(This,viewTape,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_StepForward(This,error) \\r
+ ( (This)->lpVtbl -> StepForward(This,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_StepBack(This,error) \\r
+ ( (This)->lpVtbl -> StepBack(This,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_Jog(This,rate,error) \\r
+ ( (This)->lpVtbl -> Jog(This,rate,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_Shuttle(This,rate,error) \\r
+ ( (This)->lpVtbl -> Shuttle(This,rate,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GetTimecodeString(This,currentTimeCode,error) \\r
+ ( (This)->lpVtbl -> GetTimecodeString(This,currentTimeCode,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GetTimecode(This,currentTimecode,error) \\r
+ ( (This)->lpVtbl -> GetTimecode(This,currentTimecode,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GetTimecodeBCD(This,currentTimecode,error) \\r
+ ( (This)->lpVtbl -> GetTimecodeBCD(This,currentTimecode,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_SetPreroll(This,prerollSeconds) \\r
+ ( (This)->lpVtbl -> SetPreroll(This,prerollSeconds) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GetPreroll(This,prerollSeconds) \\r
+ ( (This)->lpVtbl -> GetPreroll(This,prerollSeconds) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_SetExportOffset(This,exportOffsetFields) \\r
+ ( (This)->lpVtbl -> SetExportOffset(This,exportOffsetFields) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GetExportOffset(This,exportOffsetFields) \\r
+ ( (This)->lpVtbl -> GetExportOffset(This,exportOffsetFields) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GetManualExportOffset(This,deckManualExportOffsetFields) \\r
+ ( (This)->lpVtbl -> GetManualExportOffset(This,deckManualExportOffsetFields) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_SetCaptureOffset(This,captureOffsetFields) \\r
+ ( (This)->lpVtbl -> SetCaptureOffset(This,captureOffsetFields) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GetCaptureOffset(This,captureOffsetFields) \\r
+ ( (This)->lpVtbl -> GetCaptureOffset(This,captureOffsetFields) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_StartExport(This,inTimecode,outTimecode,exportModeOps,error) \\r
+ ( (This)->lpVtbl -> StartExport(This,inTimecode,outTimecode,exportModeOps,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_StartCapture(This,useVITC,inTimecode,outTimecode,error) \\r
+ ( (This)->lpVtbl -> StartCapture(This,useVITC,inTimecode,outTimecode,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_GetDeviceID(This,deviceId,error) \\r
+ ( (This)->lpVtbl -> GetDeviceID(This,deviceId,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_Abort(This) \\r
+ ( (This)->lpVtbl -> Abort(This) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_CrashRecordStart(This,error) \\r
+ ( (This)->lpVtbl -> CrashRecordStart(This,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_CrashRecordStop(This,error) \\r
+ ( (This)->lpVtbl -> CrashRecordStop(This,error) ) \r
+\r
+#define IDeckLinkDeckControl_v7_9_SetCallback(This,callback) \\r
+ ( (This)->lpVtbl -> SetCallback(This,callback) ) \r
+\r
+#endif /* COBJMACROS */\r
+\r
+\r
+#endif /* C style interface */\r
+\r
+\r
+\r
+\r
+#endif /* __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__ */\r
+\r
+\r
#ifndef __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__\r
#define __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__\r
\r
\r
\r
/* File created by MIDL compiler version 7.00.0555 */\r
-/* at Wed Mar 09 22:31:19 2011\r
+/* at Sat May 07 17:24:25 2011\r
*/\r
/* Compiler settings for interop\DeckLinkAPI.idl:\r
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
MIDL_DEFINE_GUID(IID, IID_IDeckLinkDeckControlStatusCallback,0xE5F693C1,0x4283,0x4716,0xB1,0x8F,0xC1,0x43,0x15,0x21,0x95,0x5B);\r
\r
\r
-MIDL_DEFINE_GUID(IID, IID_IDeckLinkDeckControl,0xA4D81043,0x0619,0x42B7,0x8E,0xD6,0x60,0x2D,0x29,0x04,0x1D,0xF7);\r
+MIDL_DEFINE_GUID(IID, IID_IDeckLinkDeckControl,0x522A9E39,0x0F3C,0x4742,0x94,0xEE,0xD8,0x0D,0xE3,0x35,0xDA,0x1D);\r
\r
\r
MIDL_DEFINE_GUID(CLSID, CLSID_CDeckLinkIterator,0xD9EDA3B3,0x2887,0x41FA,0xB7,0x24,0x01,0x7C,0xF1,0xEB,0x1D,0x37);\r
\r
\r
+MIDL_DEFINE_GUID(CLSID, CLSID_CDeckLinkAPIInformation,0x263CA19F,0xED09,0x482E,0x9F,0x9D,0x84,0x00,0x57,0x83,0xA2,0x37);\r
+\r
+\r
MIDL_DEFINE_GUID(CLSID, CLSID_CDeckLinkGLScreenPreviewHelper,0xF63E77C7,0xB655,0x4A4A,0x9A,0xD0,0x3C,0xA8,0x5D,0x39,0x43,0x43);\r
\r
\r
MIDL_DEFINE_GUID(CLSID, CLSID_CDeckLinkVideoConversion,0x7DBBBB11,0x5B7B,0x467D,0xAE,0xA4,0xCE,0xA4,0x68,0xFD,0x36,0x8C);\r
\r
\r
+MIDL_DEFINE_GUID(IID, IID_IDeckLinkDeckControl_v7_9,0xA4D81043,0x0619,0x42B7,0x8E,0xD6,0x60,0x2D,0x29,0x04,0x1D,0xF7);\r
+\r
+\r
MIDL_DEFINE_GUID(IID, IID_IDeckLinkDisplayModeIterator_v7_6,0x455D741F,0x1779,0x4800,0x86,0xF5,0x0B,0x5D,0x13,0xD7,0x97,0x51);\r
\r
\r
--- /dev/null
+/* -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);
+};
};\r
\r
safe_ptr<core::frame_producer> create_ffmpeg_producer(const safe_ptr<core::frame_factory>& frame_factory, const std::vector<std::wstring>& params)\r
-{ \r
+{ \r
static const std::vector<std::wstring> extensions = boost::assign::list_of\r
- (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");\r
+ (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");\r
std::wstring filename = env::media_folder() + L"\\" + params[0];\r
\r
auto ext = std::find_if(extensions.begin(), extensions.end(), [&](const std::wstring& ex) -> bool\r
if(!boost::filesystem::exists(filename))\r
BOOST_THROW_EXCEPTION(file_not_found() << boost::errinfo_file_name(narrow(filename))); \r
\r
- frame_buffer_.set_capacity(3);\r
+ frame_buffer_.set_capacity(2);\r
graph_ = diagnostics::create_graph([this]{return print();});\r
graph_->set_color("output-buffer", diagnostics::color(0.0f, 1.0f, 0.0f));\r
\r
<decklink>\r
<device>1</device>\r
<embedded-audio>true</embedded-audio>\r
+ <low-latency>true</low-latency>\r
<key>external</key>\r
</decklink>\r
<ogl>\r
<stretch>uniform</stretch>\r
<windowed>true</windowed>\r
</ogl>\r
- <audio/>\r
+ <!--<audio/>-->\r
<!--<bluefish>\r
<device>1</device>\r
<embedded-audio>false</embedded-audio>\r
xml_consumer.second.get("embedded-audio", true))); \r
else if(name == "decklink")\r
{\r
+ decklink_consumer::configuration config;\r
+ \r
auto key_str = xml_consumer.second.get("key", "default");\r
- auto key = decklink_consumer::default_key;\r
if(key_str == "internal")\r
- key = decklink_consumer::internal_key;\r
+ config.keyer = decklink_consumer::internal_key;\r
else if(key_str == "external")\r
- key = decklink_consumer::external_key;\r
- channels_.back()->consumer()->add(index++, decklink_consumer(xml_consumer.second.get("device", 0), \r
- xml_consumer.second.get("embedded-audio", true), \r
- key));\r
+ config.keyer = decklink_consumer::external_key;\r
+\r
+ config.device_index = xml_consumer.second.get("device", 0);\r
+ config.embed_audio = xml_consumer.second.get("embedded-audio", false);\r
+ config.low_latency = xml_consumer.second.get("low-latency", false);\r
+\r
+ channels_.back()->consumer()->add(index++, decklink_consumer(config));\r
}\r
else if(name == "audio")\r
channels_.back()->consumer()->add(index++, oal_consumer()); \r