]> git.sesse.net Git - casparcg/commitdiff
Update previous files to be more in line with CasparCG coding styles.
authorJames Wise <james.wise@bluefish444.com>
Fri, 3 Feb 2017 04:54:11 +0000 (15:54 +1100)
committerJames Wise <james.wise@bluefish444.com>
Fri, 3 Feb 2017 04:54:11 +0000 (15:54 +1100)
removed almost all sue of CamelCase, now using all smalls and underscores where possible.
Many fixes according to suggestions from @HellGore,
Including but not limited to:
Better use of RAII and shared ptr objects.
Removal of unrequired functions
Removal of system that checks if a driver is present before adding a bluefish consumer to registry.
Removal of static get/set card property funcs
Init'ing all functions ptr to nullptr.

NOT done yet:
possible modification of argument name

modules/CMakeLists.txt
modules/bluefish/CMakeLists.txt
modules/bluefish/bluefish.cpp
modules/bluefish/consumer/bluefish_consumer.cpp
modules/bluefish/interop/BlueDriver_p.h [deleted file]
modules/bluefish/interop/BlueHancUtils.h [deleted file]
modules/bluefish/interop/BlueVelvetC.h [deleted file]
modules/bluefish/interop/BlueVelvetCUtils.h [deleted file]
modules/bluefish/util/blue_velvet.cpp
modules/bluefish/util/blue_velvet.h

index 9c04b2bbdf39c93617b26d523c0ae9dc740ae1c2..cd1571e2e120bf4eeef77f592168d9ff499a6149 100644 (file)
@@ -19,5 +19,4 @@ if (MSVC)
 endif ()
 
 add_subdirectory(image)
-add_subdirectory(reroute)
 
index 498d6ae0d11d9d6d156f10ca513b4f22da71bb52..fd95da741235bc74adfc4729d2f0b5ca6bad41a7 100644 (file)
@@ -8,10 +8,6 @@ set(SOURCES
                StdAfx.cpp
 )
 set(HEADERS
-               interop/BlueDriver_p.h
-               interop/BlueHancUtils.h
-               interop/BlueVelvetC.h
-               interop/BlueVelvetCUtils.h
                consumer/bluefish_consumer.h
                util/blue_velvet.h
                util/memory.h
@@ -28,11 +24,11 @@ include_directories(${BOOST_INCLUDE_PATH})
 include_directories(${TBB_INCLUDE_PATH})
 include_directories(${RXCPP_INCLUDE_PATH})
 include_directories(${ASMLIB_INCLUDE_PATH})
+include_directories(${BLUEFISH_INCLUDE_PATH})
 
 set_target_properties(bluefish PROPERTIES FOLDER modules)
 source_group(sources ./*)
 source_group(sources\\consumer consumer/*)
-source_group(sources\\interop interop/*)
 source_group(sources\\util util/*)
 
 target_link_libraries(bluefish common core)
index 5a8278abb5a14f7cf297243f2250fcebbb028f97..0c2957ebc0dcecbc041b76b35890f8565e0ae7ec 100644 (file)
@@ -42,8 +42,8 @@ std::wstring version()
 {
        try
        {
-               BvcWrapper blue = BvcWrapper();
-               return u16(blue.GetVersion());
+               bvc_wrapper blue = bvc_wrapper();
+               return u16(blue.get_version());
        }
        catch(...)
        {
@@ -57,15 +57,15 @@ std::vector<std::wstring> device_list()
 
        try
        {               
-               BvcWrapper blue = BvcWrapper();
+               bvc_wrapper blue = bvc_wrapper();
                int numCards = 0;
-               blue.Enumerate(numCards);
+               blue.enumerate(numCards);
 
                for(int n = 1; n < (numCards+1); n++)
                {                               
-                       blue.Attach(n);
+                       blue.attach(n);
                        devices.push_back(std::wstring(get_card_desc(blue, n)) + L" [" + boost::lexical_cast<std::wstring>(n) + L"]");  
-                       blue.Detach();
+                       blue.detach();
                }
        }
        catch(...){}
@@ -75,41 +75,25 @@ std::vector<std::wstring> device_list()
 
 void init(core::module_dependencies dependencies)
 {
-
-       bool bCanBeConsumer = false;
        try
        {
-               BvcWrapper blue = BvcWrapper();
-               int numCards = 0;
-               blue.Enumerate(numCards);
-               if (numCards)
-               {
-                       for (int n = 1; n < (numCards + 1); n++)
-                       {
-                               unsigned int value;
-                               blue.Attach(n);
-                               blue.QueryCardProperty32(CARD_FEATURE_STREAM_INFO, value);
-                               if (CARD_FEATURE_GET_SDI_OUTPUT_STREAM_COUNT(value))
-                                       bCanBeConsumer = true;
-
-                               blue.Detach();
-                       }
-               }       
+               bvc_wrapper blue = bvc_wrapper();
+               int num_cards = 0;
+               blue.enumerate(num_cards);
+       
        }
        catch(...){}
 
-       if (bCanBeConsumer)
+       dependencies.consumer_registry->register_consumer_factory(L"Bluefish Consumer", create_consumer, describe_consumer);
+       dependencies.consumer_registry->register_preconfigured_consumer_factory(L"bluefish", create_preconfigured_consumer);
+       dependencies.system_info_provider_repo->register_system_info_provider([](boost::property_tree::wptree& info)
        {
-               dependencies.consumer_registry->register_consumer_factory(L"Bluefish Consumer", create_consumer, describe_consumer);
-               dependencies.consumer_registry->register_preconfigured_consumer_factory(L"bluefish", create_preconfigured_consumer);
-               dependencies.system_info_provider_repo->register_system_info_provider([](boost::property_tree::wptree& info)
-               {
-                       info.add(L"system.bluefish.version", version());
-
-                       for (auto device : device_list())
-                               info.add(L"system.bluefish.device", device);
-               });
-       }
+               info.add(L"system.bluefish.version", version());
+
+               for (auto device : device_list())
+                       info.add(L"system.bluefish.device", device);
+       });
+
 }
 
 }}
index 0068f38139efccb4e22dfe311d7ab7e14ceed17f..639a0e821a605b1e98057fb1af6b0ef6283fda26 100644 (file)
@@ -127,7 +127,7 @@ bool get_videooutput_channel_routing_info_from_streamid(bluefish_hardware_output
 
 struct bluefish_consumer : boost::noncopyable
 {
-       spl::shared_ptr<BvcWrapper>                                                     blue_;
+       spl::shared_ptr<bvc_wrapper>                                                    blue_;
        const unsigned int                                                                      device_index_;
        const core::video_format_desc                                           format_desc_;
        const core::audio_channel_layout                                        channel_layout_;
@@ -195,31 +195,31 @@ public:
                setup_hardware_output_channel();
 
                // Setting output Video mode
-               if(BLUE_FAIL(set_card_property(blue_, VIDEO_MODE, vid_fmt_))) 
+               if (BLUE_FAIL(blue_->set_card_property32(VIDEO_MODE, vid_fmt_)))
                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to set videomode."));
 
                // Select Update Mode for output
-               if(BLUE_FAIL(set_card_property(blue_, VIDEO_UPDATE_TYPE, UPD_FMT_FRAME))) 
+               if(BLUE_FAIL(blue_->set_card_property32(VIDEO_UPDATE_TYPE, UPD_FMT_FRAME)))
                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to set update type."));
        
                disable_video_output();
                setup_hardware_output_channel_routing();
                        
                //Select output memory format
-               if(BLUE_FAIL(set_card_property(blue_, VIDEO_MEMORY_FORMAT, MEM_FMT_ARGB_PC))) 
+               if(BLUE_FAIL(blue_->set_card_property32(VIDEO_MEMORY_FORMAT, MEM_FMT_ARGB_PC)))
                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to set memory format."));
                
                //Select image orientation
-               if(BLUE_FAIL(set_card_property(blue_, VIDEO_IMAGE_ORIENTATION, ImageOrientation_Normal)))
+               if(BLUE_FAIL(blue_->set_card_property32(VIDEO_IMAGE_ORIENTATION, ImageOrientation_Normal)))
                        CASPAR_LOG(warning) << print() << L" Failed to set image orientation to normal.";       
 
                // Select data range
-               if(BLUE_FAIL(set_card_property(blue_, VIDEO_RGB_DATA_RANGE, CGR_RANGE))) 
+               if(BLUE_FAIL(blue_->set_card_property32(VIDEO_RGB_DATA_RANGE, CGR_RANGE)))
                        CASPAR_LOG(warning) << print() << L" Failed to set RGB data range to CGR.";     
                
                if(!embedded_audio_ || (hardware_keyer_ == hardware_downstream_keyer_mode::enable && keyer_audio_source_ == hardware_downstream_keyer_audio_source::VideoOutputChannel) )
                {
-                       if(BLUE_FAIL(set_card_property(blue_, EMBEDEDDED_AUDIO_OUTPUT, 0))) 
+                       if(BLUE_FAIL(blue_->set_card_property32(EMBEDEDDED_AUDIO_OUTPUT, 0)))
                                CASPAR_LOG(warning) << TEXT("BLUECARD ERROR: Failed to disable embedded audio.");                       
                        CASPAR_LOG(info) << print() << TEXT(" Disabled embedded-audio.");
                }
@@ -237,12 +237,12 @@ public:
                        if (channel_layout_.num_channels > 12)
                                audio_value |= blue_emb_audio_group4_enable;
 
-                       if(BLUE_FAIL(set_card_property(blue_, EMBEDEDDED_AUDIO_OUTPUT, audio_value)))
+                       if(BLUE_FAIL(blue_->set_card_property32(EMBEDEDDED_AUDIO_OUTPUT, audio_value)))
                                CASPAR_LOG(warning) << print() << TEXT(" Failed to enable embedded audio.");                    
                        CASPAR_LOG(info) << print() << TEXT(" Enabled embedded-audio.");
                }
 
-               if(BLUE_FAIL(set_card_property(blue_, VIDEO_OUTPUT_ENGINE, VIDEO_ENGINE_FRAMESTORE))) 
+               if(BLUE_FAIL(blue_->set_card_property32(VIDEO_OUTPUT_ENGINE, VIDEO_ENGINE_FRAMESTORE)))
                        CASPAR_LOG(warning) << print() << TEXT(" Failed to set video engine.");
 
                if (is_epoch_card((*blue_)))
@@ -261,7 +261,7 @@ public:
                        executor_.invoke([&]
                        {
                                disable_video_output();
-                               blue_->Detach();                
+                               blue_->detach();                
                        });
                }
                catch(...)
@@ -278,7 +278,7 @@ public:
                {
                        if (outVidChannel != BLUE_VIDEOCHANNEL_INVALID)
                        {
-                               if (BLUE_FAIL(set_card_property(blue_, DEFAULT_VIDEO_OUTPUT_CHANNEL, outVidChannel)))
+                               if (BLUE_FAIL(blue_->set_card_property32(DEFAULT_VIDEO_OUTPUT_CHANNEL, outVidChannel)))
                                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(" Failed to set video stream."));
                        }
                }
@@ -300,16 +300,16 @@ public:
                                duallink_4224_enabled = true;
 
                        // Enable/Disable dual link output
-                       if (BLUE_FAIL(set_card_property(blue_, VIDEO_DUAL_LINK_OUTPUT, duallink_4224_enabled)))
+                       if (BLUE_FAIL(blue_->set_card_property32(VIDEO_DUAL_LINK_OUTPUT, duallink_4224_enabled)))
                                CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to enable/disable dual link."));
 
                        if (!duallink_4224_enabled)
                        {
-                               if (BLUE_FAIL(set_card_property(blue_, VIDEO_DUAL_LINK_OUTPUT_SIGNAL_FORMAT_TYPE, Signal_FormatType_Independent_422)))
+                               if (BLUE_FAIL(blue_->set_card_property32(VIDEO_DUAL_LINK_OUTPUT_SIGNAL_FORMAT_TYPE, Signal_FormatType_Independent_422)))
                                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to set dual link format type to 4:2:2."));
 
                                ULONG routingValue = EPOCH_SET_ROUTING(srcElement, dstElement, BLUE_CONNECTOR_PROP_SINGLE_LINK);
-                               if (BLUE_FAIL(set_card_property(blue_, MR2_ROUTING, routingValue)))
+                               if (BLUE_FAIL(blue_->set_card_property32(MR2_ROUTING, routingValue)))
                                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(" Failed to MR 2 routing."));
 
                                // If single link 422, but on second channel AND on Neutron we need to set Genlock to Aux.
@@ -318,7 +318,7 @@ public:
                                        if (blueVideoOutputChannel == BLUE_VIDEO_OUTPUT_CHANNEL_B)
                                        {
                                                ULONG genLockSource = BlueGenlockAux;
-                                               if (BLUE_FAIL(set_card_property(blue_, VIDEO_GENLOCK_SIGNAL, genLockSource)))
+                                               if (BLUE_FAIL(blue_->set_card_property32(VIDEO_GENLOCK_SIGNAL, genLockSource)))
                                                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info("Failed to set GenLock to Aux Input."));
                                        }
                                }
@@ -327,20 +327,20 @@ public:
                                        if (blueVideoOutputChannel == BLUE_VIDEO_OUTPUT_CHANNEL_C)
                                        {
                                                ULONG genLockSource = BlueGenlockAux;
-                                               if (BLUE_FAIL(set_card_property(blue_, VIDEO_GENLOCK_SIGNAL, genLockSource)))
+                                               if (BLUE_FAIL(blue_->set_card_property32(VIDEO_GENLOCK_SIGNAL, genLockSource)))
                                                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info("Failed to set GenLock to Aux Input."));
                                        }
                                }
                        }
                        else            // dual Link IS enabled, ie. 4224 Fill and Key
                        {
-                               if (BLUE_FAIL(set_card_property(blue_, VIDEO_DUAL_LINK_OUTPUT_SIGNAL_FORMAT_TYPE, Signal_FormatType_4224)))
+                               if (BLUE_FAIL(blue_->set_card_property32(VIDEO_DUAL_LINK_OUTPUT_SIGNAL_FORMAT_TYPE, Signal_FormatType_4224)))
                                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to set dual link format type to 4:2:2:4."));
 
                                if (is_epoch_neutron_1i2o_card((*blue_)))               // Neutron cards require setting the Genlock conector to Aux to enable them to do Dual-Link
                                {
                                        ULONG genLockSource = BlueGenlockAux;
-                                       if (BLUE_FAIL(set_card_property(blue_, VIDEO_GENLOCK_SIGNAL, genLockSource)))
+                                       if (BLUE_FAIL(blue_->set_card_property32(VIDEO_GENLOCK_SIGNAL, genLockSource)))
                                                CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info("Failed to set GenLock to Aux Input."));
                                }
                                else if (is_epoch_neutron_3o_card((*blue_)))
@@ -348,7 +348,7 @@ public:
                                        if (blueVideoOutputChannel == BLUE_VIDEO_OUTPUT_CHANNEL_C)
                                        {
                                                ULONG genLockSource = BlueGenlockAux;
-                                               if (BLUE_FAIL(set_card_property(blue_, VIDEO_GENLOCK_SIGNAL, genLockSource)))
+                                               if (BLUE_FAIL(blue_->set_card_property32(VIDEO_GENLOCK_SIGNAL, genLockSource)))
                                                        CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info("Failed to set GenLock to Aux Input."));
                                        }
                                }
@@ -358,18 +358,18 @@ public:
 
        void setup_hardware_downstream_keyer(hardware_downstream_keyer_mode keyer, hardware_downstream_keyer_audio_source audio_source)
        {
-               ULONG keyer_control_value = 0, card_feature_value = 0;
-               ULONG card_connector_value = 0;
+               unsigned int keyer_control_value = 0, card_feature_value = 0;
+               unsigned int card_connector_value = 0;
                unsigned int nOutputStreams = 0;
                unsigned int nInputStreams = 0;
                unsigned int nInputSDIConnector = 0;
                unsigned int nOutputSDIConnector = 0;
-               if (BLUE_OK(get_card_property(blue_, CARD_FEATURE_STREAM_INFO, card_feature_value)))
+               if (BLUE_OK(blue_->get_card_property32(CARD_FEATURE_STREAM_INFO, card_feature_value)))
                {
                        nOutputStreams = CARD_FEATURE_GET_SDI_OUTPUT_STREAM_COUNT(card_feature_value);
                        nInputStreams = CARD_FEATURE_GET_SDI_INPUT_STREAM_COUNT(card_feature_value);
                }
-               if (BLUE_OK(get_card_property(blue_, CARD_FEATURE_CONNECTOR_INFO, card_connector_value)))
+               if (BLUE_OK(blue_->get_card_property32(CARD_FEATURE_CONNECTOR_INFO, card_connector_value)))
                {
                        nOutputSDIConnector = CARD_FEATURE_GET_SDI_OUTPUT_CONNECTOR_COUNT(card_connector_value);
                        nInputSDIConnector = CARD_FEATURE_GET_SDI_INPUT_CONNECTOR_COUNT(card_connector_value);
@@ -384,13 +384,13 @@ public:
                }
                else if (keyer == hardware_downstream_keyer_mode::enable)
                {
-                       ULONG invalidVideoModeFlag = 0;
-                       ULONG inputVideoSignal = 0;
-                       if (BLUE_FAIL(get_card_property(blue_, INVALID_VIDEO_MODE_FLAG, invalidVideoModeFlag)))
+                       unsigned int invalidVideoModeFlag = 0;
+                       unsigned int inputVideoSignal = 0;
+                       if (BLUE_FAIL(blue_->get_card_property32(INVALID_VIDEO_MODE_FLAG, invalidVideoModeFlag)))
                                CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(" Failed to get invalid video mode flag"));
 
                        keyer_control_value = VIDEO_ONBOARD_KEYER_SET_STATUS_ENABLED(keyer_control_value);
-                       if (BLUE_FAIL(get_card_property(blue_, VIDEO_INPUT_SIGNAL_VIDEO_MODE, inputVideoSignal)))
+                       if (BLUE_FAIL(blue_->get_card_property32(VIDEO_INPUT_SIGNAL_VIDEO_MODE, inputVideoSignal)))
                                CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(" Failed to get video input signal mode"));
 
                        if (inputVideoSignal >= invalidVideoModeFlag)
@@ -399,7 +399,7 @@ public:
                                keyer_control_value = VIDEO_ONBOARD_KEYER_SET_STATUS_DISABLE_OVER_BLACK(keyer_control_value);
                
                        // lock to input
-                       if (BLUE_FAIL(set_card_property(blue_, VIDEO_GENLOCK_SIGNAL, BlueSDI_A_BNC)))
+                       if (BLUE_FAIL(blue_->set_card_property32(VIDEO_GENLOCK_SIGNAL, BlueSDI_A_BNC)))
                                CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(" Failed to set the genlock to the input for the HW keyer"));
                }
 
@@ -408,20 +408,20 @@ public:
                else if (audio_source == hardware_downstream_keyer_audio_source::VideoOutputChannel)
                        keyer_control_value = VIDEO_ONBOARD_KEYER_SET_STATUS_USE_OUTPUT_ANCILLARY(keyer_control_value);
 
-               if (BLUE_FAIL(set_card_property(blue_, VIDEO_ONBOARD_KEYER, keyer_control_value)))
+               if (BLUE_FAIL(blue_->set_card_property32(VIDEO_ONBOARD_KEYER, keyer_control_value)))
                        CASPAR_LOG(error) << print() << TEXT(" Failed to set keyer control.");
        }
 
        void enable_video_output()
        {
-               if(BLUE_FAIL(set_card_property(blue_, VIDEO_BLACKGENERATOR, 0)))
+               if(BLUE_FAIL(blue_->set_card_property32(VIDEO_BLACKGENERATOR, 0)))
                        CASPAR_LOG(error) << print() << TEXT(" Failed to disable video output.");       
        }
 
        void disable_video_output()
        {
-               blue_->VideoPlaybackStop(0,0);
-               if(BLUE_FAIL(set_card_property(blue_, VIDEO_BLACKGENERATOR, 1)))
+               blue_->video_playback_stop(0,0);
+               if(BLUE_FAIL(blue_->set_card_property32(VIDEO_BLACKGENERATOR, 1)))
                        CASPAR_LOG(error)<< print() << TEXT(" Failed to disable video output.");                
        }
        
@@ -450,7 +450,7 @@ public:
 
                sync_timer_.restart();
                unsigned long n_field = 0;
-               blue_->WaitVideoOutputSync(UPD_FMT_FRAME, n_field);
+               blue_->wait_video_output_sync(UPD_FMT_FRAME, n_field);
                graph_->set_value("sync-time", sync_timer_.elapsed()*format_desc_.fps*0.5);
                
                frame_timer_.restart();         
@@ -484,27 +484,27 @@ public:
                                                static_cast<int>(frame.audio_data().size()/channel_layout_.num_channels), 
                                                static_cast<int>(channel_layout_.num_channels));
                                                                
-                       blue_->SystemBufferWrite(const_cast<uint8_t*>(reserved_frames_.front()->image_data()), 
+                       blue_->system_buffer_write(const_cast<uint8_t*>(reserved_frames_.front()->image_data()), 
                                                                                        static_cast<unsigned long>(reserved_frames_.front()->image_size()),  
                                                                                        BlueImage_HANC_DMABuffer(reserved_frames_.front()->id(), BLUE_DATA_IMAGE), 
                                                                                        0);
 
-                       blue_->SystemBufferWrite(reserved_frames_.front()->hanc_data(),
+                       blue_->system_buffer_write(reserved_frames_.front()->hanc_data(),
                                                                                        static_cast<unsigned long>(reserved_frames_.front()->hanc_size()),
                                                                                        BlueImage_HANC_DMABuffer(reserved_frames_.front()->id(), BLUE_DATA_HANC),
                                                                                        0);
 
-                       if(BLUE_FAIL(blue_->RenderBufferUpdate(BlueBuffer_Image_HANC(reserved_frames_.front()->id()))))
+                       if(BLUE_FAIL(blue_->render_buffer_update(BlueBuffer_Image_HANC(reserved_frames_.front()->id()))))
                                CASPAR_LOG(warning) << print() << TEXT(" render_buffer_update failed.");
                }
                else
                {
-                       blue_->SystemBufferWrite(const_cast<uint8_t*>(reserved_frames_.front()->image_data()),
+                       blue_->system_buffer_write(const_cast<uint8_t*>(reserved_frames_.front()->image_data()),
                                                                                        static_cast<unsigned long>(reserved_frames_.front()->image_size()), 
                                                                                        BlueImage_DMABuffer(reserved_frames_.front()->id(), BLUE_DATA_IMAGE),
                                                                                        0);
                        
-                       if(BLUE_FAIL(blue_->RenderBufferUpdate(BlueBuffer_Image(reserved_frames_.front()->id()))))
+                       if(BLUE_FAIL(blue_->render_buffer_update(BlueBuffer_Image(reserved_frames_.front()->id()))))
                                CASPAR_LOG(warning) << print() << TEXT(" render_buffer_update failed.");
                }
 
@@ -538,8 +538,8 @@ public:
                hanc_stream_info.video_mode               = vid_fmt_;           
                
                int cardType = CRD_INVALID;
-               blue_->QueryCardType(cardType, device_index_);
-               blue_->EncodeHancFrameEx(cardType, &hanc_stream_info, audio_data, audio_nchannels, audio_samples, sample_type, emb_audio_flag);
+               blue_->query_card_type(cardType, device_index_);
+               blue_->encode_hanc_frame(cardType, &hanc_stream_info, audio_data, audio_nchannels, audio_samples, sample_type, emb_audio_flag);
        }
        
        std::wstring print() const
diff --git a/modules/bluefish/interop/BlueDriver_p.h b/modules/bluefish/interop/BlueDriver_p.h
deleted file mode 100644 (file)
index e183a01..0000000
+++ /dev/null
@@ -1,1784 +0,0 @@
-#pragma once
-#define _BLUEDRIVER_P_H__
-#define BLUE_UINT32    unsigned int
-#define BLUE_INT32     int 
-#define BLUE_UINT8     unsigned char
-#define BLUE_INT8      char
-#define BLUE_UINT16    unsigned short
-#define BLUE_INT16     short
-
-
-
-#if defined __linux__
-       #define BLUE_UINT64 unsigned long long
-       #define ULONG       unsigned long
-#elif defined (__APPLE__)
-       #define BLUE_UINT64 unsigned long long
-       #define UINT32      BLUE_UINT32
-       #define INT32       BLUE_INT32
-       #define ULONG       unsigned long
-       #define BOOLEAN     BOOL
-#elif defined (_WIN32)
-       #define BLUE_UINT64     unsigned __int64
-#endif
-
-
-/**
- * This contains the enumerators that can be used to set the cards \n
- * video output and also to determine the video mode of the incoming \n
- * video signal.
- */ 
-typedef enum _EVideoMode
-{
-       VID_FMT_PAL=0,
-       VID_FMT_NTSC=1,
-       VID_FMT_576I_5000=0,    /**< 720  x 576  50       Interlaced */
-       VID_FMT_486I_5994=1,    /**< 720  x 486  60/1.001 Interlaced */
-       VID_FMT_720P_5994,              /**< 1280 x 720  60/1.001 Progressive */
-       VID_FMT_720P_6000,              /**< 1280 x 720  60       Progressive */
-       VID_FMT_1080PSF_2397,   /**< 1920 x 1080 24/1.001 Segment Frame */
-       VID_FMT_1080PSF_2400,   /**< 1920 x 1080 24       Segment Frame */
-       VID_FMT_1080P_2397,             /**< 1920 x 1080 24/1.001 Progressive */
-       VID_FMT_1080P_2400,             /**< 1920 x 1080 24       Progressive */
-       VID_FMT_1080I_5000,             /**< 1920 x 1080 50       Interlaced */
-       VID_FMT_1080I_5994,             /**< 1920 x 1080 60/1.001 Interlaced */
-       VID_FMT_1080I_6000,             /**< 1920 x 1080 60       Interlaced */
-       VID_FMT_1080P_2500,             /**< 1920 x 1080 25       Progressive */
-       VID_FMT_1080P_2997,             /**< 1920 x 1080 30/1.001 Progressive */
-       VID_FMT_1080P_3000,             /**< 1920 x 1080 30       Progressive */
-       VID_FMT_HSDL_1498,              /**< 2048 x 1556 15/1.0   Segment Frame */
-       VID_FMT_HSDL_1500,              /**< 2048 x 1556 15                     Segment Frame */
-       VID_FMT_720P_5000,              /**< 1280 x 720  50                     Progressive */
-       VID_FMT_720P_2398,              /**< 1280 x 720  24/1.001       Progressive */
-       VID_FMT_720P_2400,              /**< 1280 x 720  24     Progressive */
-       VID_FMT_2048_1080PSF_2397=19,   /**< 2048 x 1080 24/1.001       Segment Frame */
-       VID_FMT_2048_1080PSF_2400=20,   /**< 2048 x 1080 24     Segment Frame */
-       VID_FMT_2048_1080P_2397=21,     /**< 2048 x 1080 24/1.001       progressive */ 
-       VID_FMT_2048_1080P_2400=22,     /**< 2048 x 1080 24     progressive  */
-       VID_FMT_1080PSF_2500=23,
-       VID_FMT_1080PSF_2997=24,
-       VID_FMT_1080PSF_3000=25,
-       VID_FMT_1080P_5000=26,
-       VID_FMT_1080P_5994=27,
-       VID_FMT_1080P_6000=28,
-       VID_FMT_720P_2500=29,
-       VID_FMT_720P_2997=30,
-       VID_FMT_720P_3000=31,
-       VID_FMT_DVB_ASI=32,
-       VID_FMT_2048_1080PSF_2500=33,
-       VID_FMT_2048_1080PSF_2997=34,
-       VID_FMT_2048_1080PSF_3000=35,
-       VID_FMT_2048_1080P_2500=36,
-       VID_FMT_2048_1080P_2997=37,
-       VID_FMT_2048_1080P_3000=38,
-       VID_FMT_2048_1080P_5000=39,
-       VID_FMT_2048_1080P_5994=40,
-       VID_FMT_2048_1080P_6000=41,
-       VID_FMT_1080P_4800=42,
-       VID_FMT_2048_1080P_4800=43,
-
-       VID_FMT_INVALID=44
-} EVideoMode;
-
-/**
-@brief Use these enumerators to set the pixel format 
-               that should be used by the video input and output 
-               framestores.
-*/
-typedef enum _EMemoryFormat
-{
-       MEM_FMT_ARGB=0, /**< ARGB 4:4:4:4 */
-       MEM_FMT_BV10=1,
-       MEM_FMT_BV8=2,
-       MEM_FMT_YUVS=MEM_FMT_BV8,
-       MEM_FMT_V210=3, // Iridium HD (BAG1)
-       MEM_FMT_RGBA=4,
-       MEM_FMT_CINEON_LITTLE_ENDIAN=5,
-       MEM_FMT_ARGB_PC=6,
-       MEM_FMT_BGRA=MEM_FMT_ARGB_PC,
-       MEM_FMT_CINEON=7,
-       MEM_FMT_2VUY=8,
-       MEM_FMT_BGR=9,
-       MEM_FMT_BGR_16_16_16=10,
-       MEM_FMT_BGR_48 = MEM_FMT_BGR_16_16_16,
-       MEM_FMT_BGRA_16_16_16_16=11,
-       MEM_FMT_BGRA_64 = MEM_FMT_BGRA_16_16_16_16,
-       MEM_FMT_VUYA_4444=12,
-       MEM_FMT_V216=13,
-       MEM_FMT_Y210=14,
-       MEM_FMT_Y216=15,
-       MEM_FMT_RGB=16,
-       MEM_FMT_YUV_ALPHA=17,
-       MEM_FMT_RGB_16_16_16=18,
-       MEM_FMT_RGB_48 = MEM_FMT_RGB_16_16_16,
-       MEM_FMT_RGBA_16_16_16_16=19,
-       MEM_FMT_RGBA_64 = MEM_FMT_RGBA_16_16_16_16,
-       MEM_FMT_YCA8 = 20,
-       MEM_FMT_CYA8 = 21,
-       MEM_FMT_YUV_ALPHA_10 = 22,
-       MEM_FMT_YCA10 = 23,
-       MEM_FMT_CYA10 = 24,
-       MEM_FMT_YAC10 = 25,
-       MEM_FMT_CAY10 = 26,
-
-       MEM_FMT_INVALID = 27
-} EMemoryFormat;
-
-/**
-@brief Used to control the video update type, 
-               whether the card should capture/playback a
-               video frame or field.
-*/
-typedef enum _EUpdateMethod
-{
-       UPD_FMT_FIELD=0,
-       UPD_FMT_FRAME,
-       UPD_FMT_FRAME_DISPLAY_FIELD1,
-       UPD_FMT_FRAME_DISPLAY_FIELD2,
-       UPD_FMT_INVALID,
-       UPD_FMT_FLAG_RETURN_CURRENT_UNIQUEID=0x80000000,/**< if this flag is used on epoch cards, function would 
-                                                                                                       return the unique id of the current frame as the return value.*/
-} EUpdateMethod;
-
-typedef enum _EResoFormat
-{
-       RES_FMT_NORMAL=0,
-       RES_FMT_HALF,
-       RES_FMT_INVALID
-} EResoFormat;
-
-typedef enum _ECardType
-{
-       CRD_BLUEDEEP_LT=0,              // D64 Lite
-       CRD_BLUEDEEP_SD,                // Iridium SD
-       CRD_BLUEDEEP_AV,                // Iridium AV
-       CRD_BLUEDEEP_IO,                // D64 Full
-       CRD_BLUEWILD_AV,                // D64 AV
-       CRD_IRIDIUM_HD,                 // * Iridium HD
-       CRD_BLUEWILD_RT,                // D64 RT
-       CRD_BLUEWILD_HD,                // * BadAss G2
-       CRD_REDDEVIL,                   // Iridium Full
-       CRD_BLUEDEEP_HD,                // * BadAss G2 variant, proposed, reserved
-       CRD_BLUE_EPOCH_2K = CRD_BLUEDEEP_HD,
-       CRD_BLUE_EPOCH_2K_HORIZON=CRD_BLUE_EPOCH_2K,
-       CRD_BLUEDEEP_HDS,               // * BadAss G2 variant, proposed, reserved
-       CRD_BLUE_ENVY,                  // Mini Din 
-       CRD_BLUE_PRIDE,                 //Mini Din Output 
-       CRD_BLUE_GREED,
-       CRD_BLUE_INGEST,
-       CRD_BLUE_SD_DUALLINK,
-       CRD_BLUE_CATALYST,
-       CRD_BLUE_SD_DUALLINK_PRO,
-       CRD_BLUE_SD_INGEST_PRO,
-       CRD_BLUE_SD_DEEPBLUE_LITE_PRO,
-       CRD_BLUE_SD_SINGLELINK_PRO,
-       CRD_BLUE_SD_IRIDIUM_AV_PRO,
-       CRD_BLUE_SD_FIDELITY,
-       CRD_BLUE_SD_FOCUS,
-       CRD_BLUE_SD_PRIME,
-       CRD_BLUE_EPOCH_2K_CORE,
-       CRD_BLUE_EPOCH_2K_ULTRA,
-       CRD_BLUE_EPOCH_HORIZON,
-       CRD_BLUE_EPOCH_CORE,
-       CRD_BLUE_EPOCH_ULTRA,
-       CRD_BLUE_CREATE_HD,
-       CRD_BLUE_CREATE_2K,
-       CRD_BLUE_CREATE_2K_ULTRA,
-       CRD_BLUE_CREATE_3D = CRD_BLUE_CREATE_2K,
-       CRD_BLUE_CREATE_3D_ULTRA = CRD_BLUE_CREATE_2K_ULTRA,
-       CRD_BLUE_SUPER_NOVA,
-       CRD_BLUE_SUPER_NOVA_S_PLUS,
-       CRD_BLUE_SUPER_NOVA_MICRO,
-       CRD_BLUE_NEUTRON = CRD_BLUE_SUPER_NOVA_MICRO,
-       CRD_BLUE_EPOCH_CG,
-       CRD_INVALID
-} ECardType;
-
-
-typedef enum _EHDCardSubType
-{      
-       CRD_HD_FURY=1,
-       CRD_HD_VENGENCE=2,
-       CRD_HD_IRIDIUM_XP=3,
-       CRD_HD_IRIDIUM = 4,
-       CRD_HD_LUST=5,
-       CRD_HD_INVALID
-}EHDCardSubType;
-
-enum EEpochFirmwareProductID
-{
-       ORAC_FILMPOST_FIRMWARE_PRODUCTID =                                                                      (0x01), //Epoch (2K) Horizon/Core/Ultra, Create/Create3D/Create3D Ultra
-       ORAC_BROADCAST_FIRMWARE_PRODUCTID =                                                                     (0x02), //Epoch (2K) Horizon/Core/Ultra, Create/Create3D/Create3D Ultra
-       ORAC_ASI_FIRMWARE_PRODUCTID =                                                                           (0x03), //Epoch (2K) Horizon/Core/Ultra
-       ORAC_4SDIINPUT_FIRMWARE_PRODUCTID =                                                                     (0x04), //Epoch Supernova/Supernova S+
-       ORAC_4SDIOUTPUT_FIRMWARE_PRODUCTID =                                                            (0x05), //Epoch Supernova/Supernova S+
-       ORAC_2SDIINPUT_2SDIOUTPUT_FIRMWARE_PRODUCTID =                                          (0x06), //Epoch Supernova/Supernova S+
-       ORAC_1SDIINPUT_3SDIOUTPUT_FIRMWARE_PRODUCTID =                                          (0x08), //Epoch Supernova/Supernova S+, deprecated
-       ORAC_INPUT_1SDI_1CHANNEL_OUTPUT_4SDI_3CHANNEL_FIRMWARE_PRODUCTID =      (0x09), //Epoch Supernova/Supernova S+
-       ORAC_INPUT_2SDI_2CHANNEL_OUTPUT_3SDI_2CHANNEL_FIRMWARE_PRODUCTID =      (0x0A), //Epoch Supernova/Supernova S+, deprecated
-       ORAC_INPUT_3SDI_3CHANNEL_OUTPUT_1SDI_1CHANNEL_FIRMWARE_PRODUCTID =      (0x0B), //Epoch Supernova/Supernova S+
-       ORAC_BNC_ASI_FIRMWARE_PRODUCTID =                                                                       (0x0C), //Epoch Supernova/Supernova S+
-       ORAC_NEUTRON_2_IN_0_OUT_FIRMWARE_PRODUCTID =                                            (0x0D), //Epoch Neutron
-       ORAC_NEUTRON_0_IN_2_OUT_FIRMWARE_PRODUCTID =                                            (0x0E), //Epoch Neutron
-       ORAC_NEUTRON_1_IN_1_OUT_FIRMWARE_PRODUCTID =                                            (0x0F), //Epoch Neutron
-       ORAC_NEUTRON_2_IN_0_OUT_SCALER_FIRMWARE_PRODUCTID =                                     (0x10), //Epoch Neutron
-       ORAC_NEUTRON_0_IN_2_OUT_SCALER_FIRMWARE_PRODUCTID =                                     (0x11), //Epoch Neutron
-       ORAC_NEUTRON_1_IN_1_OUT_SCALER_FIRMWARE_PRODUCTID =                                     (0x12), //Epoch Neutron
-       ORAC_NEUTRON_ASI_FIRMWARE_PRODUCTID =                                                           (0x13), //Epoch Neutron
-       ORAC_INPUT_1SDI_1CHANNEL_OUTPUT_3SDI_3CHANNEL_FIRMWARE_PRODUCTID =      (0x14), //Epoch Supernova/Supernova S+
-       ORAC_NEUTRON_1_IN_2_OUT_FIRMWARE_PRODUCTID =                                            (0x15), //Epoch Neutron
-       ORAC_NEUTRON_3_IN_0_OUT_FIRMWARE_PRODUCTID =                                            (0x16), //Epoch Neutron
-       ORAC_NEUTRON_0_IN_3_OUT_FIRMWARE_PRODUCTID =                                            (0x17), //Epoch Neutron
-       ORAC_INPUT_1SDI_1CHANNEL_OUTPUT_3SDI_2CHANNEL_FIRMWARE_PRODUCTID =      (0x18), //Epoch Supernova/Supernova S+
-};
-
-/**< @brief Use this enumerator to select the audio channels that should be captured  or played back.
-*/
-typedef enum _BlueAudioChannelDesc
-{
-       MONO_FLAG               = 0xC0000000,
-       MONO_CHANNEL_1  = 0x00000001,
-       MONO_CHANNEL_2  = 0x00000002,
-       MONO_CHANNEL_3  = 0x00000004,
-       MONO_CHANNEL_4  = 0x00000008,
-       MONO_CHANNEL_5  = 0x00000010,
-       MONO_CHANNEL_6  = 0x00000020,
-       MONO_CHANNEL_7  = 0x00000040,
-       MONO_CHANNEL_8  = 0x00000080,
-       MONO_CHANNEL_9  = 0x00000100,// to be used by analog audio output channels 
-       MONO_CHANNEL_10 = 0x00000200,// to be used by analog audio output channels 
-       MONO_CHANNEL_11 = 0x00000400,//actual channel 9
-       MONO_CHANNEL_12 = 0x00000800,//actual channel 10
-       MONO_CHANNEL_13 = 0x00001000,//actual channel 11
-       MONO_CHANNEL_14 = 0x00002000,//actual channel 12
-       MONO_CHANNEL_15 = 0x00004000,//actual channel 13
-       MONO_CHANNEL_16 = 0x00008000,//actual channel 14
-       MONO_CHANNEL_17 = 0x00010000,//actual channel 15
-       MONO_CHANNEL_18 = 0x00020000 //actual channel 16
-}BlueAudioChannelDesc;
-
-
-//----------------------------------------------------------------------------
-/**<
-Use this enumeraotor to set the type of pcm audio data.
-*/
-typedef enum
-{
-       AUDIO_CHANNEL_LOOPING_OFF               = 0x00000000, /**< deprecated not used any more */
-       AUDIO_CHANNEL_LOOPING                   = 0x00000001,/**< deprecated not used any more */
-       AUDIO_CHANNEL_LITTLEENDIAN              = 0x00000000, /**< if the audio data is little endian this flag must be set*/
-       AUDIO_CHANNEL_BIGENDIAN                 = 0x00000002,/**< if the audio data is big  endian this flag must be set*/
-       AUDIO_CHANNEL_OFFSET_IN_BYTES   = 0x00000004,/**< deprecated not used any more */
-       AUDIO_CHANNEL_16BIT                             = 0x00000008, /**< if the audio channel bit depth is 16 bits this flag must be set*/
-       AUDIO_CHANNEL_BLIP_PENDING              = 0x00000010,/**< deprecated not used any more */
-       AUDIO_CHANNEL_BLIP_COMPLETE             = 0x00000020,/**< deprecated not used any more */
-       AUDIO_CHANNEL_SELECT_CHANNEL    = 0x00000040,/**< deprecated not used any more */
-       AUDIO_CHANNEL_24BIT                             = 0x00000080/**< if the audio channel bit depth is 24 bits this flag must be set*/
-} EAudioFlags;
-
-/**
-@desc Used to select Audio input source on new generation SD cards 
-@remarks
-This enumerator works only when used with ReadAudioSample function.
-*/
-typedef enum
-{
-       BLUE_AUDIO_AES =                0,                                      /** 8 channels of AES */
-       BLUE_AUDIO_ANALOG =             1,                                      /** 2 channels of analog audio */
-       BLUE_AUDIO_SDIA =               2,                                      /** deprecated, do not use */
-       BLUE_AUDIO_EMBEDDED =   BLUE_AUDIO_SDIA,        /** use BLUE_AUDIO_EMBEDDED for any embedded audio stream; the stream is associated with the SDK object (BlueVelvet4/BlueVelvetC) */
-       BLUE_AUDIO_SDIB =               3,                                      /** deprecated, do not use */
-       BLUE_AUDIO_AES_PAIR0 =  4,                                      /** deprecated, do not use */
-       BLUE_AUDIO_AES_PAIR1 =  5,                                      /** deprecated, do not use */
-       BLUE_AUDIO_AES_PAIR2 =  6,                                      /** deprecated, do not use */
-       BLUE_AUDIO_AES_PAIR3 =  7,                                      /** deprecated, do not use */
-       BLUE_AUDIO_SDIC =               8,                                      /** deprecated, do not use */
-       BLUE_AUDIO_SDID =               9,                                      /** deprecated, do not use */
-       BLUE_AUDIO_INVALID =    10
-} Blue_Audio_Connector_Type;
-
-typedef enum _EAudioRate
-{
-       AUDIO_SAMPLE_RATE_48K=48000,
-       AUDIO_SAMPLE_RATE_96K=96000,
-       AUDIO_SAMPLE_RATE_UNKNOWN=-1
-} EAudioRate;
-
-/**<
-@brief use this enumerator to define the color space of the video signal on the SDI cable
-*/
-typedef enum _EConnectorSignalColorSpace
-{
-       RGB_ON_CONNECTOR=0x00400000, /**< Use this enumerator if the colorspace of video data on the SDI cable is RGB <br/>
-                                                                               When using dual link capture/playback , user can choose the 
-                                                                               color space of the data. <br>
-                                                                               In single link SDI the color space of the signal is always YUB*/
-       YUV_ON_CONNECTOR=0 /**<Use this enumerator if color space of video data on the SDI cable  is RGB.*/
-}EConnectorSignalColorSpace;
-
-
-/**<
-@brief use this enumerator for controlling the dual link functionality.
-*/
-typedef enum _EDualLinkSignalFormatType
-{
-       Signal_FormatType_4224 =                        0,              /**< sets the card to work in  4:2:2:4 mode*/
-       Signal_FormatType_4444 =                        1,              /**< sets the card to work in  4:4:4 10 bit dual link mode*/
-       Signal_FormatType_444_10BitSDI =        Signal_FormatType_4444,
-       Signal_FormatType_444_12BitSDI =        0x4,    /**< sets the card to work in  4:4:4 12 bit dual link mode*/
-       Signal_FormatType_Independent_422 =     0x2,
-       Signal_FormatType_Key_Key =                     0x8000  /**< not used currently on epoch cards */
-       
-}EDualLinkSignalFormatType;
-
-enum ECardOperatingMode
-{
-       CardOperatingMode_SingleLink =                  0x0,
-       CardOperatingMode_Independent_422 =             CardOperatingMode_SingleLink,
-       CardOperatingMode_DualLink =                    0x1,
-       CardOperatingMode_StereoScopic_422 =    0x3,
-       CardOperatingMode_Dependent_422 =               CardOperatingMode_StereoScopic_422,     /**< not used currently on epoch cards */
-       CardOperatingMode_DualLink_Dual3G =             0x4,
-};
-
-typedef enum _EPreDefinedColorSpaceMatrix
-{
-       UNITY_MATRIX=0,
-       MATRIX_709_CGR=1,
-       MATRIX_RGB_TO_YUV_709_CGR=MATRIX_709_CGR,
-       MATRIX_709=2,
-       MATRIX_RGB_TO_YUV_709=MATRIX_709,
-       RGB_FULL_RGB_SMPTE=3,
-       MATRIX_601_CGR=4,
-       MATRIX_RGB_TO_YUV_601_CGR=MATRIX_601_CGR,
-       MATRIX_601=5,
-       MATRIX_RGB_TO_YUV_601=MATRIX_601,
-       MATRIX_SMPTE_274_CGR=6,
-       MATRIX_SMPTE_274=7,
-       MATRIX_VUYA=8,
-       UNITY_MATRIX_INPUT=9,
-       MATRIX_YUV_TO_RGB_709_CGR=10,
-       MATRIX_YUV_TO_RGB_709=11,
-       RGB_SMPTE_RGB_FULL=12,
-       MATRIX_YUV_TO_RGB_601_CGR=13,
-       MATRIX_YUV_TO_RGB_601=14,
-       MATRIX_USER_DEFINED=15,
-}EPreDefinedColorSpaceMatrix;
-
-/**< 
-@brief this enumerator contains the status of the driver video/hanc fifo 
-*/
-typedef enum
-{
-       BLUE_FIFO_CLOSED=0, /**< Fifo has not been initialized*/
-       BLUE_FIFO_STARTING=1,/**< Fifo is starting */
-       BLUE_FIFO_RUNNING=2,/**< Fifo is running */
-       BLUE_FIFO_STOPPING=3,/**< Fifo is in the process of stopping */
-       BLUE_FIFO_PASSIVE=5,/**< Fifo is currently stopped or not active*/
-       BLUE_FIFO_STATUS_INVALID=10
-}BlueVideoFifoStatus;
-
-/**<
-@brief use this enumerator to define the data range of the RGB video frame data.
-*/
-typedef enum _ERGBDataRange
-{
-       CGR_RANGE=0, /**<       In this mode RGB data expected by the user (capture) or provided by the user(playback) is 
-                                               in the range of 0-255(8 bit) or 0-1023(10 bit0).<br/>
-                                               driver uses this information to choose the appropriate YUV conversion matrices.*/
-       SMPTE_RANGE=1  /**<     In this mode RGB data expected by the user (capture) or provided by the user(playback) is 
-                                               in the range of 16-235(8 bit) or 64-940(10 bit0).<br/>
-                                               driver uses this information to choose the appropriate YUV conversion matrices.*/
-}ERGBDataRange;
-
-typedef enum _EHD_XCONNECTOR_MODE
-{
-       SD_SDI=1,
-       HD_SDI=2
-}EHD_XCONNECTOR_MODE;
-
-/**< @brief  this enumerator can be used to set the image orienatation of the frame.                                                   
-*/
-typedef enum _EImageOrientation
-{
-       ImageOrientation_Normal=0,      /**< in this configuration , frame is top to bottom and left to right */
-       ImageOrientation_VerticalFlip=1, /**< in this configuration frame is bottom to top and left to right*/
-       ImageOrientation_Invalid=2,     
-}EImageOrientation;
-
-/**< @brief this enumerator defines the reference signal source that can be used with bluefish cards
-*/
-typedef enum _EBlueGenlockSource
-{
-       BlueGenlockBNC =                0,                      /** Genlock is used as reference signal source */
-       BlueSDIBNC =                    0x10000,        /** SDI input B  is used as reference signal source */
-       BlueSDI_B_BNC =                 BlueSDIBNC,
-       BlueSDI_A_BNC =                 0x20000,        /** SDI input A  is used as reference signal source */
-       BlueAnalog_BNC =                0x40000,        /** Analog input is used as reference signal source */
-       BlueSoftware =                  0x80000,
-       BlueFreeRunning =               BlueSoftware,
-       BlueGenlockAux =                0x100000,       /** auxiliary genlock connector on Epoch Neutron cards */
-       BlueInterlock =                 0x200000,       /** interlock connector on Epoch Neutron cards */
-}EBlueGenlockSource;
-
-
-typedef enum _EBlueVideoChannel 
-{
-       BLUE_VIDEOCHANNEL_A=0,
-       BLUE_VIDEO_OUTPUT_CHANNEL_A=BLUE_VIDEOCHANNEL_A,
-       
-       BLUE_VIDEOCHANNEL_B=1,
-       BLUE_VIDEO_OUTPUT_CHANNEL_B=BLUE_VIDEOCHANNEL_B,
-       
-       BLUE_VIDEOCHANNEL_C=2,
-       BLUE_VIDEO_INPUT_CHANNEL_A=BLUE_VIDEOCHANNEL_C,
-
-       BLUE_VIDEOCHANNEL_D=3,
-       BLUE_VIDEO_INPUT_CHANNEL_B=BLUE_VIDEOCHANNEL_D,
-
-       BLUE_VIDEOCHANNEL_E=4,
-       BLUE_VIDEO_INPUT_CHANNEL_C=BLUE_VIDEOCHANNEL_E,
-
-       BLUE_VIDEOCHANNEL_F=5,
-       BLUE_VIDEO_INPUT_CHANNEL_D=BLUE_VIDEOCHANNEL_F,
-
-       BLUE_VIDEOCHANNEL_G=6,
-       BLUE_VIDEO_OUTPUT_CHANNEL_C=BLUE_VIDEOCHANNEL_G,
-
-       BLUE_VIDEOCHANNEL_H=7,
-       BLUE_VIDEO_OUTPUT_CHANNEL_D=BLUE_VIDEOCHANNEL_H,
-       
-       BLUE_OUTPUT_MEM_MODULE_A=BLUE_VIDEO_OUTPUT_CHANNEL_A,
-       BLUE_OUTPUT_MEM_MODULE_B=BLUE_VIDEO_OUTPUT_CHANNEL_B,
-       BLUE_INPUT_MEM_MODULE_A=BLUE_VIDEO_INPUT_CHANNEL_A,
-       BLUE_INPUT_MEM_MODULE_B=BLUE_VIDEO_INPUT_CHANNEL_B,
-       //BLUE_JETSTREAM_SCALER_MODULE_0=0x10,
-       //BLUE_JETSTREAM_SCALER_MODULE_1=0x11,
-       //BLUE_JETSTREAM_SCALER_MODULE_2=0x12,
-       //BLUE_JETSTREAM_SCALER_MODULE_3=0x13,
-
-       BLUE_VIDEOCHANNEL_INVALID=30
-}EBlueVideoChannel;
-
-typedef enum _EBlueVideoRouting
-{
-       BLUE_VIDEO_LINK_INVALID=0,
-       BLUE_SDI_A_LINK1=4,
-       BLUE_SDI_A_LINK2=5,
-       BLUE_SDI_B_LINK1=6,
-       BLUE_SDI_B_LINK2=7,
-       BLUE_ANALOG_LINK1=8,
-       BLUE_ANALOG_LINK2=9,
-       BLUE_SDI_A_SINGLE_LINK=BLUE_SDI_A_LINK1,
-       BLUE_SDI_B_SINGLE_LINK=BLUE_SDI_B_LINK1,
-       BLUE_ANALOG_SINGLE_LINK=BLUE_ANALOG_LINK1
-
-}EBlueVideoRouting;
-
-typedef enum
-{
-       BLUE_FIFO_NULL_ATTRIBUTE=0x0,
-       BLUE_FIFO_ECHOPORT_ENABLED=0x1,
-       BLUE_FIFO_STEPMODE = 0x2,
-       BLUE_FIFO_LOOPMODE = 0x4
-}BlueVideoFifo_Attributes;
-
-typedef enum _BlueAudioOutputDest
-{
-       Blue_AnalogAudio_Output=0x0,
-       Blue_AES_Output=0x80000000,
-       Blue_Emb_Output=0x40000000,
-}BlueAudioOutputDest;
-
-
-/**<@brief this enumerator is not used need to be removed*/
-typedef enum _BlueAudioInputSource
-{
-       Blue_AES=0x10,
-       Blue_AnalogAudio=0x20,
-       Blue_SDIA_Embed=0x40,
-       Blue_SDIB_Embed=0x80,
-}BlueAudioInputSource;
-
-typedef enum _EBlueConnectorIdentifier
-{
-       BLUE_CONNECTOR_INVALID = -1,
-       
-       // BNC connectors in order from top to bottom of shield
-       BLUE_CONNECTOR_BNC_A = 0,    // BNC closest to top of shield
-       BLUE_CONNECTOR_BNC_B,
-       BLUE_CONNECTOR_BNC_C,
-       BLUE_CONNECTOR_BNC_D,
-       BLUE_CONNECTOR_BNC_E,
-       BLUE_CONNECTOR_BNC_F,
-       BLUE_CONNECTOR_GENLOCK,
-       
-       BLUE_CONNECTOR_ANALOG_VIDEO_1 = 100,
-       BLUE_CONNECTOR_ANALOG_VIDEO_2,
-       BLUE_CONNECTOR_ANALOG_VIDEO_3,
-       BLUE_CONNECTOR_ANALOG_VIDEO_4,
-       BLUE_CONNECTOR_ANALOG_VIDEO_5,
-       BLUE_CONNECTOR_ANALOG_VIDEO_6,
-
-       BLUE_CONNECTOR_DVID_1 = 200,
-       BLUE_CONNECTOR_SDI_OUTPUT_A= BLUE_CONNECTOR_DVID_1,
-       BLUE_CONNECTOR_DVID_2,
-       BLUE_CONNECTOR_SDI_OUTPUT_B= BLUE_CONNECTOR_DVID_2,
-       BLUE_CONNECTOR_DVID_3,
-       BLUE_CONNECTOR_SDI_INPUT_A= BLUE_CONNECTOR_DVID_3,
-       BLUE_CONNECTOR_DVID_4,
-       BLUE_CONNECTOR_SDI_INPUT_B= BLUE_CONNECTOR_DVID_4,
-       BLUE_CONNECTOR_DVID_5,
-       BLUE_CONNECTOR_SDI_OUTPUT_C,
-       BLUE_CONNECTOR_SDI_OUTPUT_D,
-
-       BLUE_CONNECTOR_AES = 300,
-       BLUE_CONNECTOR_ANALOG_AUDIO_1,
-       BLUE_CONNECTOR_ANALOG_AUDIO_2,
-
-       BLUE_CONNECTOR_DVID_6,
-       BLUE_CONNECTOR_SDI_INPUT_C= BLUE_CONNECTOR_DVID_6,
-       BLUE_CONNECTOR_DVID_7,
-       BLUE_CONNECTOR_SDI_INPUT_D= BLUE_CONNECTOR_DVID_7,
-
-       //BLUE_CONNECTOR_RESOURCE_BLOCK=0x400,
-       //BLUE_CONNECTOR_JETSTREAM_SCALER_0=(BLUE_CONNECTOR_RESOURCE_BLOCK|BLUE_JETSTREAM_SCALER_MODULE_0),
-       //BLUE_CONNECTOR_JETSTREAM_SCALER_1=(BLUE_CONNECTOR_RESOURCE_BLOCK|BLUE_JETSTREAM_SCALER_MODULE_1),
-       //BLUE_CONNECTOR_JETSTREAM_SCALER_2=(BLUE_CONNECTOR_RESOURCE_BLOCK|BLUE_JETSTREAM_SCALER_MODULE_2),
-       //BLUE_CONNECTOR_JETSTREAM_SCALER_3=(BLUE_CONNECTOR_RESOURCE_BLOCK|BLUE_JETSTREAM_SCALER_MODULE_3),
-
-       //BLUE_CONNECTOR_OUTPUT_MEM_MODULE_A=(BLUE_CONNECTOR_RESOURCE_BLOCK|BLUE_OUTPUT_MEM_MODULE_A),
-       //BLUE_CONNECTOR_OUTPUT_MEM_MODULE_B=(BLUE_CONNECTOR_RESOURCE_BLOCK|BLUE_OUTPUT_MEM_MODULE_B),
-       //BLUE_CONNECTOR_INPUT_MEM_MODULE_A=(BLUE_CONNECTOR_RESOURCE_BLOCK|BLUE_INPUT_MEM_MODULE_A),
-       //BLUE_CONNECTOR_INPUT_MEM_MODULE_B=(BLUE_CONNECTOR_RESOURCE_BLOCK|BLUE_INPUT_MEM_MODULE_B),
-       //
-}EBlueConnectorIdentifier;
-
-typedef enum _EBlueConnectorSignalDirection
-{
-       BLUE_CONNECTOR_SIGNAL_INVALID=-1,
-       BLUE_CONNECTOR_SIGNAL_INPUT=0,
-       BLUE_CONNECTOR_SIGNAL_OUTPUT=1,
-}EBlueConnectorSignalDirection;
-
-typedef enum _EBlueDynamicConnectorType
-{
-       BLUE_DYNAMIC_CONNECTOR_TYPE_INVALID =   0,
-       BLUE_DYNAMIC_CONNECTOR_TYPE_OUTPUT =    1,
-       BLUE_DYNAMIC_CONNECTOR_TYPE_INPUT =             2,
-       BLUE_DYNAMIC_CONNECTOR_TYPE_GENLOCK =   3,
-}EBlueDynamicConnectorType;
-
-typedef enum _EBlueConnectorProperty
-{
-       BLUE_INVALID_CONNECTOR_PROPERTY = -1,
-
-       //signal property
-       BLUE_CONNECTOR_PROP_INPUT_SIGNAL=0,
-       BLUE_CONNECTOR_PROP_OUTPUT_SIGNAL=1,
-
-       // Video output
-       BLUE_CONNECTOR_PROP_SDI = 0,
-       BLUE_CONNECTOR_PROP_YUV_Y,
-       BLUE_CONNECTOR_PROP_YUV_U,
-       BLUE_CONNECTOR_PROP_YUV_V,
-       BLUE_CONNECTOR_PROP_RGB_R,
-       BLUE_CONNECTOR_PROP_RGB_G,
-       BLUE_CONNECTOR_PROP_RGB_B,
-       BLUE_CONNECTOR_PROP_CVBS,
-       BLUE_CONNECTOR_PROP_SVIDEO_Y,
-       BLUE_CONNECTOR_PROP_SVIDEO_C,
-       
-       // Audio output
-       BLUE_CONNECTOR_PROP_AUDIO_AES = 0x2000,
-       BLUE_CONNECTOR_PROP_AUDIO_EMBEDDED,
-       BLUE_CONNECTOR_PROP_AUDIO_ANALOG,
-
-       
-       BLUE_CONNECTOR_PROP_SINGLE_LINK=0x3000,
-       BLUE_CONNECTOR_PROP_DUALLINK_LINK_1,
-       BLUE_CONNECTOR_PROP_DUALLINK_LINK_2,
-       BLUE_CONNECTOR_PROP_DUALLINK_LINK,
-
-       BLUE_CONNECTOR_PROP_STEREO_MODE_SIDE_BY_SIDE,
-       BLUE_CONNECTOR_PROP_STEREO_MODE_TOP_DOWN,
-       BLUE_CONNECTOR_PROP_STEREO_MODE_LINE_BY_LINE,
-
-}EBlueConnectorProperty;
-
-/*
-typedef enum _BLUE_AUDIOINPUT_SOURCE
-{
-       BLUE_AES_AUDIO_INPUT=0x10000,
-       BLUE_ANALOG_AUDIO_INPUT=0x20000,
-       BLUE_SDIA_AUDIO_INPUT=0x30000,
-       BLUE_SDIB_AUDIO_INPUT=0x40000
-}BLUE_AUDIOINPUT_SOURCE;
-*/
-/**
-@desc use the values in this enumerator for controlling card property
-*/
-typedef enum _EBlueCardProperty
-{
-       VIDEO_DUAL_LINK_OUTPUT=0,/**<  Use this property to enable/diable cards dual link output property*/
-       VIDEO_DUAL_LINK_INPUT=1,/**<  Use this property to enable/diable cards dual link input property*/
-       VIDEO_DUAL_LINK_OUTPUT_SIGNAL_FORMAT_TYPE=2, /**<Use this property to select signal format type that should be used 
-                                                       when dual link output is enabled. Possible values this property can
-                                                       accept is defined in the enumerator EDualLinkSignalFormatType
-                                                                                               */
-       VIDEO_DUAL_LINK_INPUT_SIGNAL_FORMAT_TYPE=3,/**< Use this property to select signal format type that should be used 
-                                               when dual link input is enabled. Possible values this property can
-                                               accept is defined in the enumerator EDualLinkSignalFormatType
-                                               */
-       VIDEO_OUTPUT_SIGNAL_COLOR_SPACE=4,/**<  Use this property to select color space of the signal when dual link output is set to 
-                                       use 4:4:4/4:4:4:4 signal format type. Possible values this property can
-                                       accept is defined in the enumerator EConnectorSignalColorSpace
-                                       */
-       VIDEO_INPUT_SIGNAL_COLOR_SPACE=5,/**<   Use this property to select color space of the signal when dual link input is set to 
-                                       use 4:4:4/4:4:4:4 signal format type. Possible values this property can
-                                       accept is defined in the enumerator EConnectorSignalColorSpace
-                                       */
-       VIDEO_MEMORY_FORMAT=6, /**<Use this property to ser the pixel format that should be used by 
-                       video output channels.  Possible values this property can
-                       accept is defined in the enumerator EMemoryFormat
-                       */      
-       VIDEO_MODE=7,/**<Use this property to set the video mode that should be used by 
-                       video output channels.  Possible values this property can
-                       accept is defined in the enumerator EVideoMode
-                       */      //
-       VIDEO_UPDATE_TYPE=8,/**<Use this property to set the framestore update type that should be used by 
-                       video output channels.  Card can update video framestore at field/frame rate.
-                       Possible values this property can accept is defined in the enumerator EUpdateMethod
-                       */      
-       VIDEO_ENGINE=9,
-       VIDEO_IMAGE_ORIENTATION=10,/**< Use this property to set the image orientation of the video output framestore.
-                               This property must be set before frame is transferred to on card memory using 
-                               DMA transfer functions(system_buffer_write_async). It is recommended to use 
-                               vertical flipped image orientation only on RGB pixel formats.
-                               Possible values this property can accept is defined in the enumerator EImageOrientation
-                               */
-       VIDEO_USER_DEFINED_COLOR_MATRIX=11,
-       VIDEO_PREDEFINED_COLOR_MATRIX=12,//EPreDefinedColorSpaceMatrix
-       VIDEO_RGB_DATA_RANGE=13,                /**<    Use this property to set the data range of RGB pixel format, user can specify 
-                                                                                       whether the RGB data is in either SMPTE or CGR range. Based on this information 
-                                                                                       driver is decide which color matrix should be used.
-                                                                                       Possible values this property can accept is defined in the enumerator ERGBDataRange
-                                                                                       For SD cards this property will set the input and the output to the specified value.
-                                                                                       For Epoch/Create/SuperNova cards this property will only set the output to the specified value.
-                                                                                       For setting the input on Epoch/Create/SuperNova cards see EPOCH_VIDEO_INPUT_RGB_DATA_RANGE*/
-       VIDEO_KEY_OVER_BLACK=14,                /**< this property is deprecated and no longer supported on epoch/create range of cards.*/      
-       VIDEO_KEY_OVER_INPUT_SIGNAL=15, /**< this property is deprecated and no longer supported on epoch/create range of cards.*/      
-       VIDEO_SET_DOWN_CONVERTER_VIDEO_MODE=16,/**< this property is deprecated and no longer supported on epoch/create range of cards.
-                                               EHD_XCONNECTOR_MODE
-                                               */
-       VIDEO_LETTER_BOX=17,
-       VIDEO_PILLOR_BOX_LEFT=18,
-       VIDEO_PILLOR_BOX_RIGHT=19,
-       VIDEO_PILLOR_BOX_TOP=20,
-       VIDEO_PILLOR_BOX_BOTTOM=21,
-       VIDEO_SAFE_PICTURE=22,
-       VIDEO_SAFE_TITLE=23,
-       VIDEO_INPUT_SIGNAL_VIDEO_MODE=24,       /**< Use this property to retreive the video input signal information on the 
-                                                                                       default video input channel used by that SDK object.
-                                                                                       When calling SetCardProperty with a valid video mode on this property, the SDK
-                                                                                       will will use this video mode "Hint" if the card buffers are set up despite there being a valid 
-                                                                                       input signal; the card buffers will be set up when calling one of these card properties:
-                                                                                               VIDEO_INPUT_MEMORY_FORMAT
-                                                                                               VIDEO_INPUT_UPDATE_TYPE
-                                                                                               VIDEO_INPUT_ENGINE
-                                                                                       Note: QueryCardProperty(VIDEO_INPUT_SIGNAL_VIDEO_MODE) will still return the actual video input signal
-                                                                               */
-       VIDEO_COLOR_MATRIX_MODE=25,
-       VIDEO_OUTPUT_MAIN_LUT=26,/**< this property is deprecated and no longer supported on epoch/create range of cards.*/
-       VIDEO_OUTPUT_AUX_LUT=27,/**< this property is deprecated and no longer supported on epoch/create range of cards.*/
-       VIDEO_LTC=28,           /**< this property is deprecated and no longer supported on epoch/create range of cards. To retreive/ outputting 
-                               LTC information you can use the HANC decoding and encoding functions.*/
-       VIDEO_GPIO=29,  
-       VIDEO_PLAYBACK_FIFO_STATUS=30, /**< This property can be used to retreive how many frames are bufferd in the video playback fifo.*/
-       RS422_RX_BUFFER_LENGTH=31,
-       RS422_RX_BUFFER_FLUSH=32,
-       VIDEO_INPUT_UPDATE_TYPE=33,/**< Use this property to set the framestore update type that should be used by 
-                               video input  channels.  Card can update video framestore at field/frame rate.
-                               Possible values this property can accept is defined in the enumerator EUpdateMethod
-                                                                       */      
-       VIDEO_INPUT_MEMORY_FORMAT=34,/**<Use this property to set the pixel format that should be used by 
-                                       video input channels when it is capturing a frame from video input source.  
-                                       Possible values this property can accept is defined in the enumerator EMemoryFormat
-                                                                       */      
-       VIDEO_GENLOCK_SIGNAL=35,        /**< Use this property to retrieve video signal of the reference source that is used by the card.
-                                                                       This can also be used to select the reference signal source that should be used.
-                                                                       See application note AN004_Genlock.pdf for more information */
-       AUDIO_OUTPUT_PROP=36,   /**< this can be used to route PCM audio data onto respective audio output connectors. */
-       AUDIO_CHANNEL_ROUTING=AUDIO_OUTPUT_PROP,
-       AUDIO_INPUT_PROP=37,            /**<    Use this property to select audio input source that should be used when doing an audio capture.
-                                                                               Possible values this property can accept is defined in the enumerator Blue_Audio_Connector_Type. */
-       VIDEO_ENABLE_LETTERBOX=38,
-       VIDEO_DUALLINK_OUTPUT_INVERT_KEY_COLOR=39,/**< this property is deprecated and no longer supported on epoch/create range of cards.*/
-       VIDEO_DUALLINK_OUTPUT_DEFAULT_KEY_COLOR=40,/**< this property is deprecated and no longer supported on epoch/create range of cards.*/
-       VIDEO_BLACKGENERATOR=41, /**< Use this property to control the black generator on the video output channel.
-                                                        */
-       VIDEO_INPUTFRAMESTORE_IMAGE_ORIENTATION=42,
-       VIDEO_INPUT_SOURCE_SELECTION=43, /**<   The video input source that should be used by the SDK default video input channel 
-                                       can be configured using this property.  
-                                       Possible values this property can accept is defined in the enumerator EBlueConnectorIdentifier.
-                                       */
-       DEFAULT_VIDEO_OUTPUT_CHANNEL=44,
-       DEFAULT_VIDEO_INPUT_CHANNEL=45,
-       VIDEO_REFERENCE_SIGNAL_TIMING=46,
-       EMBEDEDDED_AUDIO_OUTPUT=47, /**< the embedded audio output property can be configured using this property.
-                                       Possible values this property can accept is defined in the enumerator EBlueEmbAudioOutput.
-                                       */
-       EMBEDDED_AUDIO_OUTPUT=EMBEDEDDED_AUDIO_OUTPUT,
-       VIDEO_PLAYBACK_FIFO_FREE_STATUS=48, /**< this will return the number of free buffer in the fifo. 
-                                       If the video engine  is framestore this will give you the number of buffers that the framestore mode 
-                                       can you use with that video output channel.*/
-       VIDEO_IMAGE_WIDTH=49,           /**< selective output DMA: see application note AN008_SelectiveDMA.pdf for more details */
-       VIDEO_IMAGE_HEIGHT=50,          /**< selective output DMA: see application note AN008_SelectiveDMA.pdf for more details */
-       VIDEO_SELECTIVE_OUTPUT_DMA_DST_PITCH = VIDEO_IMAGE_WIDTH,       //pitch (bytes per line) of destination buffer (card memory)
-       VIDEO_SELECTIVE_OUTPUT_DMA_SRC_LINES = VIDEO_IMAGE_HEIGHT,      //number of video lines to extract from source image (system memory)
-       VIDEO_SCALER_MODE=51,
-       AVAIL_AUDIO_INPUT_SAMPLE_COUNT=52,
-       VIDEO_PLAYBACK_FIFO_ENGINE_STATUS=53,   /**< this will return the playback fifo status. The values returned by this property 
-                                               are defined in the enumerator BlueVideoFifoStatus.
-                                               */      
-       VIDEO_CAPTURE_FIFO_ENGINE_STATUS=54,    /**< this will return the capture  fifo status. 
-                                               The values returned by this property are defined in the enumerator BlueVideoFifoStatus.
-                                               */
-       VIDEO_2K_1556_PANSCAN=55,/**< this property is deprecated and no longer supported on epoch/create range of cards.*/
-       VIDEO_OUTPUT_ENGINE=56, /**< Use this property to set the video engine of the video output channels.
-                               Possible values this property can accept is defined in the enumerator EEngineMode 
-                               */
-       VIDEO_INPUT_ENGINE=57, /**< Use this property to set the video engine of the video input channels.
-                               Possible values this property can accept is defined in the enumerator EEngineMode 
-                               */
-       BYPASS_RELAY_A_ENABLE=58, /**< use this property to control the bypass relay on SDI A output.*/
-       BYPASS_RELAY_B_ENABLE=59, /**< use this property to control the bypass relay on SDI B output.*/
-       VIDEO_PREMULTIPLIER=60,
-       VIDEO_PLAYBACK_START_TRIGGER_POINT=61, /**< Using this property you can instruct the driver to start the 
-                                               video playback fifo on a particular video output field count.
-                                               Normally video playback fifo is started on the next video interrupt after 
-                                               the video_playback_start call.*/
-       GENLOCK_TIMING=62,
-       VIDEO_IMAGE_PITCH=63,   /**< selective output DMA: see application note AN008_SelectiveDMA.pdf for more details */
-       VIDEO_IMAGE_OFFSET=64,  /**< currently not used; selective output DMA: see application note AN008_SelectiveDMA.pdf for more details */
-       VIDEO_SELECTIVE_OUTPUT_DMA_SRC_PITCH = VIDEO_IMAGE_PITCH,       //pitch (bytes per line) of source buffer (system memory)
-       VIDEO_INPUT_IMAGE_WIDTH=65,             /**< selective input DMA: see application note AN008_SelectiveDMA.pdf for more details */
-       VIDEO_INPUT_IMAGE_HEIGHT=66,    /**< selective input DMA: see application note AN008_SelectiveDMA.pdf for more details */
-       VIDEO_INPUT_IMAGE_PITCH=67,             /**< selective input DMA: see application note AN008_SelectiveDMA.pdf for more details */
-       VIDEO_INPUT_IMAGE_OFFSET=68,    /**< currently not used; selective input DMA: see application note AN008_SelectiveDMA.pdf for more details */
-       VIDEO_SELECTIVE_INPUT_DMA_SRC_PITCH = VIDEO_INPUT_IMAGE_WIDTH,  //pitch (bytes per line) of source buffer (card memory)
-       VIDEO_SELECTIVE_INPUT_DMA_SRC_LINES = VIDEO_INPUT_IMAGE_HEIGHT, //number of video lines to extract from source image (card memory)
-       VIDEO_SELECTIVE_INPUT_DMA_DST_PITCH = VIDEO_INPUT_IMAGE_PITCH,  //pitch (bytes per line) of destination buffer (system memory)
-       TIMECODE_RP188=69,      /**< this property is deprecated and no longer supported on epoch/create range of cards.*/
-       BOARD_TEMPERATURE=70,/**<This property can be used to retreive the Board temperature, core temperature and 
-                               RPM of the Fan on epoch/create range of cards.<br/>
-                               Use the macro's EPOCH_CORE_TEMP ,EPOCH_BOARD_TEMP and EPOCH_FAN_SPEED
-                               to retireive the respective values from the property.<br/>                                                      
-                                               */      
-       MR2_ROUTING=71, /**< Use this property to control the MR2 functionlity on epoch range of cards.
-                       Use the following macro with this property.<br/>
-                       1) EPOCH_SET_ROUTING --> for setting the source, destination and link type of the routing connection,<br/>
-                       2) EPOCH_ROUTING_GET_SRC_DATA --> for getting the routing source.<br/>
-                                                       The possible source and destination elements supported by the routing matrix are defined in the 
-                                                       enumerator EEpochRoutingElements.<br/>
-                       */
-       SAVEAS_POWERUP_SETTINGS=72,
-       VIDEO_CAPTURE_AVAIL_BUFFER_COUNT=73, /**< This property will return the number of captured frame avail in the fifo at present.
-                                               If the video engine  is framestore this will give you the number of buffers that the framestore mode 
-                                               can you use with that video input channel */
-       EPOCH_APP_WATCHDOG_TIMER=74,/**< Use this property to control the application  watchdog timer functionality. 
-                                       Possible values this property can accept is defined in the enumerator enum_blue_app_watchdog_timer_prop.
-                               */      
-       EPOCH_RESET_VIDEO_INPUT_FIELDCOUNT=75, /**< Use this property to reset the field count on both the 
-                                               video channels of the card. You can pass the value that 
-                                               should be used as starting fieldcount after the reset.
-                                               This property can be used to keep track  sync between left and right signal 
-                                               when you are capturing in stereoscopic mode.
-                                       */
-       EPOCH_RS422_PORT_FLAGS=76,/**<  Use this property to set the master/slave property of the RS422 ports.
-                               Possible values this property can accept is defined in the enumerator enum_blue_rs422_port_flags.
-                               */
-       EPOCH_DVB_ASI_INPUT_TIMEOUT=77, /**< Current DVB ASI input firmware does not support this property in hardware,
-                                       this is a future addition.
-                                       Use this property to set the timeout  of the DVB ASI input stream. 
-                                       timeout is specified in  milliseconds.If hardware did not get the required no of                
-                                       packets( specified using EPOCH_DVB_ASI_INPUT_LATENCY_PACKET_COUNT)
-                                       within the period specified in the timeout, hardware would generate a video input interrupt
-                                       and it would be safe to read the dvb asi packet from the card.
-                                       */
-       EPOCH_DVB_ASI_INPUT_PACKING_FORMAT=78, /**< Use this property to specify the packing method that should be used 
-                                               when capturing DVB ASI packets.
-                                               The possible packing methods are defined in the enumerator enum_blue_dvb_asi_packing_format.*/
-       EPOCH_DVB_ASI_INPUT_LATENCY_PACKET_COUNT=79, /**< Use this property to set  how many asi packets should be captured by the card , before it 
-                                                       notifies the driver of available data using video input interrupt.<br/>
-                                                       */
-       VIDEO_PLAYBACK_FIFO_CURRENT_FRAME_UNIQUEID=80, /**< This property can be used to query the current unique id of 
-                                                       the frame that is being displayed currently by the video output channel. This 
-                                                       property is only usefull in the context of video fifo.<br/>
-                                                       You get a uniqueid when you present a frame using video_playback_present function.
-                                                       Alternative ways to get this information are <br/>
-                                                       1) using blue_wait_video_sync_async , the member current_display_frame_uniqueid contains the same information<br/>
-                                                       2) using wait_video_output_sync function on epoch cards, if 
-                                                       the flag UPD_FMT_FLAG_RETURN_CURRENT_UNIQUEID is appended with 
-                                                       either UPD_FMT_FRAME or UPD_FMT_FIELD , the return value of 
-                                                       the function wait_video_output_sync woukd contain the current display
-                                                       frames uniqueid.<br/>*/
-
-       EPOCH_DVB_ASI_INPUT_GET_PACKET_SIZE = 81,/**< use this property to get the size of each asi transport stream packet
-                                                       (whether it is 188 or 204.*/
-       EPOCH_DVB_ASI_INPUT_PACKET_COUNT = 82,/**< this property would give you the number of packets captured during the last 
-                                               interrupt time frame. For ASI interrupt is generated if 
-                                               hardware captured the requested number of packets or it hit the 
-                                               timeout value
-                                               */
-       EPOCH_DVB_ASI_INPUT_LIVE_PACKET_COUNT = 83,/**< this property would give you the number of packets that
-                                               is being captured during the current interrupt time frame. 
-                                               For ASI interrupt is generated when has hardware captured the 
-                                               requested number of packets specified using  
-                                               EPOCH_DVB_ASI_INPUT_LATENCY_PACKET_COUNT property.
-                                               */
-       EPOCH_DVB_ASI_INPUT_AVAIL_PACKETS_IN_FIFO = 84,/**< This property would return the number of ASI packets 
-                                                       that has been captured into card memory , that
-                                                       can be retreived.
-                                                       This property is only valid when the video input 
-                                                       channel is being used in FIFO modes.
-                                               */
-       EPOCH_ROUTING_SOURCE_VIDEO_MODE=VIDEO_SCALER_MODE,/**< Use this property to change the video mode that scaler should be set to.
-                                                       USe the macro SET_EPOCH_SCALER_MODE when using this property, as this macro 
-                                                       would allow you to select which one of the scaler blocks video mode should be updated.
-                                                       */
-       EPOCH_AVAIL_VIDEO_SCALER_COUNT=85,/**< This property would return available scaler processing block available on the card.*/
-       EPOCH_ENUM_AVAIL_VIDEO_SCALERS_ID=86,/**< You can enumerate the available scaler processing block available on the card using this property.
-                                       You pass in the index value as input parameter to get the scaler id that should be used.
-                                       Applications are recommended to use this property to query the available scaler id's 
-                                       rather than hardcoding a scaler id. As the scaler id's that you can use would vary based on
-                                       whether you have VPS0 or VPS1 boards loaded on the base board.
-                                       */
-       EPOCH_ALLOCATE_VIDEO_SCALER=87, /**< This is just a helper property for applications who need to use more than one scaler
-                                       and just wants to query the next available scaler from the driver pool, rather than hardcoding 
-                                       each thread to use a particular scaler.
-                                       Allocate a free scaler from the available scaler pool.
-                                       User has got the option to specify whether they want to use the scaler for 
-                                       use with a single link or dual link stream */
-       EPOCH_RELEASE_VIDEO_SCALER=88, /**< Release the previously allocated scaler processing block back to the free pool.
-                                       If the user passes in a value of 0, all the allocated scaler blocks in the driver are released.
-                                       So effectively
-                                       */
-       EPOCH_DMA_CARDMEMORY_PITCH=89,
-       EPOCH_OUTPUT_CHANNEL_AV_OFFSET=90,
-       EPOCH_SCALER_CHANNEL_MUX_MODE=91,
-       EPOCH_INPUT_CHANNEL_AV_OFFSET=92,
-       EPOCH_AUDIOOUTPUT_MANUAL_UCZV_GENERATION=93,    /* ASI firmware only */
-       EPOCH_SAMPLE_RATE_CONVERTER_BYPASS=94,          /** bypasses the sample rate converter for AES audio; only turn on for Dolby-E support
-                                                                                                *      pass in a flag to signal which audio stereo pair should be bypassed:
-                                                                                                *      bit 0:  AES channels 0 and 1
-                                                                                                *      bit 1:  AES channels 2 and 3
-                                                                                                *      bit 2:  AES channels 4 and 5
-                                                                                                *      bit 3:  AES channels 6 and 7
-                                                                                                *      For example: bypass the sample rate converter for channels 0 to 3: flag = 0x3;  */
-       EPOCH_GET_PRODUCT_ID=95,                                                /* returns the enum for the firmware type EEpochFirmwareProductID */
-       EPOCH_GENLOCK_IS_LOCKED=96,
-       EPOCH_DVB_ASI_OUTPUT_PACKET_COUNT=97,                   /* ASI firmware only */
-       EPOCH_DVB_ASI_OUTPUT_BIT_RATE=98,                               /* ASI firmware only */
-       EPOCH_DVB_ASI_DUPLICATE_OUTPUT_A=99,                    /* ASI firmware only */
-       EPOCH_DVB_ASI_DUPLICATE_OUTPUT_B=100,                   /* ASI firmware only */
-       EPOCH_SCALER_HORIZONTAL_FLIP=101,                               /* see SideBySide_3D sample application */
-       EPOCH_CONNECTOR_DIRECTION=102,                                  /* see application notes */
-       EPOCH_AUDIOOUTPUT_VALIDITY_BITS=103,                    /* ASI firmware only */
-       EPOCH_SIZEOF_DRIVER_ALLOCATED_MEMORY=104,       /* video buffer allocated in Kernel space; accessible in userland via system_buffer_map() */
-       INVALID_VIDEO_MODE_FLAG=105,                            /* returns the enum for VID_FMT_INVALID that this SDK/Driver was compiled with;
-                                                                                               it changed between 5.9.x.x and 5.10.x.x driver branch and has to be handled differently for
-                                                                                               each driver if the application wants to use the VID_FMT_INVALID flag and support both driver branches */
-       EPOCH_VIDEO_INPUT_VPID=106,                                     /* returns the VPID for the current video input signal. Input value is of type EBlueConnectorIdentifier */
-       EPOCH_LOW_LATENCY_DMA=107,                                      /* deprecated; use new feature EPOCH_SUBFIELD_INPUT_INTERRUPTS instead */
-       EPOCH_VIDEO_INPUT_RGB_DATA_RANGE=108,
-       EPOCH_DVB_ASI_OUTPUT_PACKET_SIZE=109,           /* firmware supports either 188 or 204 bytes per ASI packet; set to either
-                                                                                                       enum_blue_dvb_asi_packet_size_188_bytes or
-                                                                                                       enum_blue_dvb_asi_packet_size_204_bytes */
-       EPOCH_SUBFIELD_INPUT_INTERRUPTS=110,            /* similar to the EPOCH_LOW_LATENCY_DMA card feature, but this doesn't influence the DMA;
-                                                                                                       it simply adds interrupts between the frame/field interrupts that trigger when a corresponding
-                                                                                                       video chunk has been captured
-                                                                                                       required minimum driver: 5.10.1.8*/
-       EPOCH_AUDIOOUTPUT_METADATA_SETTINGS = 111,      /* Use the EAudioMetaDataSettings enumerator to change the audio output metadata settings */
-       EPOCH_HD_SDI_TRANSPORT = 112,                           /* output only: available modes are defined in the enum EHdSdiTransport; for inputs see EPOCH_HD_SDI_TRANSPORT_INPUT  */
-       CARD_FEATURE_STREAM_INFO = 113,                         /* only supported from driver 5.10.2.x; info on how many in/out SDI/ASI streams are supported */
-       CARD_FEATURE_CONNECTOR_INFO = 114,                      /* only supported from driver 5.10.2.x; info on which connectors are supported: SDI in/out, AES, RS422, LTC, GPIO */
-       EPOCH_HANC_INPUT_FLAGS = 115,                           /* this property can be queried to test flags being set in the HANC space (e.g. HANC_FLAGS_IS_ARRI_RECORD_FLAG_SET) */
-       EPOCH_INPUT_VITC = 116,                                         /* this property retrieves the current input VITC timecode; set .vt = VT_UI8 as this is a 64bit value;
-                                                                                                       only supported by SuperNova 2i/2o firmware version 75 and above */
-       EPOCH_RAW_VIDEO_INPUT_TYPE = 117,                       /* specifies if the raw/bayer input is ARRI 10/12 bit or Weisscam; set to 0 to revert back to normal SDI mode */
-       EPOCH_PCIE_CONFIG_INFO = 118,                           /* only supported from driver 5.10.2.x; provides info on PCIE maximum payload size and maximum read request siize */
-       EPOCH_4K_QUADLINK_CHANNEL = 119,                        /* use this property to set the 4K quadrant number for the current channel in 4K output mode; quadrant numbers are 1 - 4 */
-       EXTERNAL_LTC_SOURCE_SELECTION = 120,            /* use the enum EBlueExternalLtcSource to set the input source for the external LTC */
-       EPOCH_HD_SDI_TRANSPORT_INPUT = 121,                     /* can only be queried; return values are defined in the enum EHdSdiTransport. Input value is of type EBlueConnectorIdentifier */
-       CARD_CONNECTED_VIA_TB = 122,                            /* MAC only: use this to check if the Card is connected via ThunderBolt */
-       INTERLOCK_REFERENCE = 123,                                      /* this feature is only supported on Epoch Neutron cards; check application note AN004_Genlock.pdf for more information */
-       VIDEO_ONBOARD_KEYER = 124,                                      /* this property is currently only supported by Epoch Neutron cards; use the VIDEO_ONBOARD_KEYER_GET_STATUS macros for this property*/
-       EPOCH_OUTPUT_VITC_MANUAL_CONTROL = 125,         /* Epoch Neutron only: this property enables the feature to allow output of a custom VITC timecode on a field by field basis (low frame rates only); for high frame rates the conventional way (using the HANC buffer) must be used */
-       EPOCH_OUTPUT_VITC = 126,                                        /* Epoch Neutron only: this property sets the custom VITC timecode (64 bit value) on a field by field basis (for low frame rates only); set .vt = VT_UI8 as this is a 64bit value; */
-       EPOCH_INPUT_VITC_SOURCE = 127,                          /* this property selects the source for the card property EPOCH_INPUT_VITC for SD video modes; in SD video modes the VITC source can be either
-                                                                                                  from VBI space or from RP188 packets; the default (value = 0) is set to RP188; setting this to 1 will select VBI space as the source for EPOCH_INPUT_VITC; set .vt = VT_UI4 */
-       TWO_SAMPLE_INTERLEAVE_OUTPUT = 128,                     /* enables two sample interleave mode for 4K video modes using two output channels; options are: 0 = turn feature off, 1 = turn feature on */
-       TWO_SAMPLE_INTERLEAVE_INPUT = 129,                      /* enables two sample interleave mode for 4K video modes using two input channels; options are: 0 = turn feature off, 1 = turn feature on  */
-       BTC_TIMER = 130,                                                        /* BTC: Coordinated Bluefish Time; this timer has microsecond granularity and is started/reset when the driver starts; set .vt = VT_UI8 as this is a 64bit value; */
-       BFLOCK_SIGNAL_ENABLE = 131,                                     /* S+ cards can generate a proprietary lock signal on the S+ connector (connector 0); options are 0 = turn off signal (connector 0 will be copy of SDI A output); 1 = turn on lock signal output; set .vt = VT_UI4 */
-       AES_OUTPUT_ROUTING = 132,                                       /* set the stream source and source channels for the AES output; .vt = VT_UI4 */
-       MUTE_AES_OUTPUT_CHANNEL = 133,                          /* mute any of the AES output channels (0..7); to enable/disable mute use the SET_MUTE_AES_OUTPUT_CHANNEL macro; to query an AES output channels mute status
-                                                                                                  set VT.ulVal to the AES output channel number (0..7) then call QueryCardProperty(); the return value will be 1 = muted or 0 = enabled; set .vt to VT_UI4     */
-       FORCE_SD_VBI_OUTPUT_BUFFER_TO_V210 = 134,       /* this card property forces the VBI buffer to V210 memory format in SD video modes (default for HD video modes) so that it can handle 10 bit VANC packets.
-                                                                                                       set 1 = force to V210 or 0 = follow video memory fomat (default); set .vt to VT_UI4; when changing this property the video output mode and video output engine need to be set again manually! */
-       EMBEDDED_AUDIO_INPUT_INFO = 135,                        /*      this card property returns info on how which embedded audio input channels are available (channel mask for channels 1 - 16 in lower 16 bits).
-                                                                                                       it also returns the data payload for each channel (1 - 16) in the upper 16 bits (0 = embedded audio, 1 = other (e.g. Dolby Digital)) */
-
-       VIDEO_CARDPROPERTY_INVALID = 1000
-}EBlueCardProperty;
-
-typedef enum _EHdSdiTransport
-{
-       HD_SDI_TRANSPORT_1_5G =                 0x1,                    /* HD as 1.5G */
-       HD_SDI_TRANSPORT_3G_LEVEL_A =   0x2,                    /* 3G Level A */
-       HD_SDI_TRANSPORT_3G_LEVEL_B =   0x3,                    /* 3G Level B */
-}EHdSdiTransport;
-
-typedef enum _EAudioMetaDataSettings
-{
-       AUDIO_METADATA_KEEP_ALIVE = 0x1         /*      When setting this bit for the EPOCH_AUDIOOUTPUT_METADATA_SETTINGS card property the audio meta data (like RP188 timecode 
-                                                                                       will still be played out even after stopping audio playback; this is a static settings and only needs to be set once;
-                                                                                       it is channel based and can be changed for all output channels independently */
-}EAudioMetaDataSettings;
-
-typedef enum _EAnalogConnectorSignalType
-{
-       ANALOG_OUTPUTSIGNAL_CVBS_Y_C=1,
-       ANALOG_OUTPUTSIGNAL_COMPONENT=2,
-       ANALOG_OUTPUTSIGNAL_RGB=4
-}EAnalogConnectorSignalType;
-
-/**<
-@brief Use this enumerator to set the analog video signal types and connectors.
-*/
-typedef enum _EAnalogInputConnectorType 
-{
-/* Composite input */
-       ANALOG_VIDEO_INPUT_CVBS_AIN1=0x00, /**<only available on Mini COAX */
-       ANALOG_VIDEO_INPUT_CVBS_AIN2=0x01, /**<available on both Mini COAX and Mini DIN*/
-       ANALOG_VIDEO_INPUT_CVBS_AIN3=0x02, /**<available on both Mini COAX and Mini DIN*/
-       ANALOG_VIDEO_INPUT_CVBS_AIN4=0x03, /**<only available on Mini COAX */
-       ANALOG_VIDEO_INPUT_CVBS_AIN5=0x04, /**<only available on Mini COAX */
-       ANALOG_VIDEO_INPUT_CVBS_AIN6=0x05, /**<available on both Mini COAX and Mini DIN */
-
-/*svideo input*/
-//Y_C is a synonym for svideo
-       ANALOG_VIDEO_INPUT_Y_C_AIN1_AIN4=0x06, /**<only available on Mini COAX*/
-       ANALOG_VIDEO_INPUT_Y_C_AIN2_AIN5=0x07, /**<only available on Mini COAX*/
-       ANALOG_VIDEO_INPUT_Y_C_AIN3_AIN6=0x08, /**<available on both Mini COAX and Mini DIN*/
-
-/*YUV input*/
-       ANALOG_VIDEO_INPUT_YUV_AIN1_AIN4_AIN5=0x09, /**<only available on Mini COAX*/
-       ANALOG_VIDEO_INPUT_YUV_AIN2_AIN3_AIN6=0x0a, /**<available on both Mini COAX and Mini DIN*/
-       ANALOG_VIDEO_INPUT_USE_SDI_A=0x6F,      
-       ANALOG_VIDEO_INPUT_USE_SDI=0x7F,
-       GENERIC_ANALOG_VIDEO_SOURCE=0x8F,
-       ANALOG_VIDEO_INPUT_USE_SDI_B=ANALOG_VIDEO_INPUT_USE_SDI
-}EAnalogInputConnectorType;
-
-
-typedef enum {
-       ANALOG_VIDEO_INPUT_CONNECTOR,//EAnalogInputConnectorType
-       ANALOG_VIDEO_INPUT_PED,
-       ANALOG_VIDEO_INPUT_BRIGHTNESS,
-       ANALOG_VIDEO_INPUT_HUE,
-       ANALOG_VIDEO_INPUT_LUMA_GAIN,
-       ANALOG_VIDEO_INPUT_CHROMA_GAIN,
-       ANALOG_VIDEO_INPUT_AUTO_GAIN,
-       ANALOG_VIDEO_INPUT_LOAD_DEFAULT_SETTING,        
-       ANALOG_VIDEO_OUTPUT_PED,
-       ANALOG_VIDEO_OUTPUT_BRIGHTNESS,
-       ANALOG_VIDEO_OUTPUT_HUE,
-       ANALOG_VIDEO_OUTPUT_LUMA_GAIN,
-       ANALOG_VIDEO_OUTPUT_CHROMA_GAIN,        
-       ANALOG_VIDEO_OUTPUT_SHARPNESS,
-       ANALOG_VIDEO_OUTPUT_AUTO_GAIN,
-       ANALOG_VIDEO_OUTPUT_LOAD_DEFAULT_SETTING,
-       ANALOG_VIDEO_OUTPUT_SIGNAL_TYPE,//_EAnalogConnectorSignalType
-       ANALOG_LOAD_BLUEFISH_DEFAULT_SETTING,
-       ANALOG_SET_AS_POWERUP_SETTINGS,
-       ANALOG_LOAD_POWERUP_SETTINGS,
-       ANALOG_CONNECTOR_STATUS
-} AnalogCard_Property;
-
-typedef struct {
-       BLUE_INT32 inputConnector;                      //ANALOG_VIDEO_INPUT_CONNECTOR, EAnalogInputConnectorType
-       BLUE_INT32 inputPed;                            //ANALOG_VIDEO_INPUT_PED,
-       BLUE_INT32 inputBrightness;             //ANALOG_VIDEO_INPUT_BRIGHTNESS,
-       BLUE_INT32 inputHue;                            //ANALOG_VIDEO_INPUT_HUE,
-       BLUE_INT32 inputLumaGain;                       //ANALOG_VIDEO_INPUT_LUMA_GAIN,
-       BLUE_INT32 inputChromaGain;             //ANALOG_VIDEO_INPUT_CHROMA_GAIN,
-       BLUE_INT32 inputAutoGain;                       //ANALOG_VIDEO_INPUT_AUTO_GAIN,
-       BLUE_INT32 outputPed;                           //ANALOG_VIDEO_OUTPUT_PED,
-       BLUE_INT32 outputBrightness;            //ANALOG_VIDEO_OUTPUT_BRIGHTNESS,
-       BLUE_INT32 outputHue;                           //ANALOG_VIDEO_OUTPUT_HUE,
-       BLUE_INT32 outputYGain;                 //ANALOG_VIDEO_OUTPUT_Y_GAIN,
-       BLUE_INT32 outputUGain;                 //ANALOG_VIDEO_OUTPUT_U_GAIN,
-       BLUE_INT32 outputVGain;                 //ANALOG_VIDEO_OUTPUT_V_GAIN,
-       BLUE_INT32 outputSharpness;             //ANALOG_VIDEO_OUTPUT_SHARPNESS,
-       BLUE_INT32 outputAutoGain;                      //ANALOG_VIDEO_OUTPUT_AUTO_GAIN,
-       BLUE_INT32 outputSignalTypes;           //EAnalogConnectorSignalType
-}AnalogCardState;
-
-//----------------------------------------------------------------------------------------------------
-/**< brief Used to determine how video interrupts are handled*/
-typedef enum _EEngineMode
-{
-       VIDEO_ENGINE_FRAMESTORE=0,      /**< framestore engine. In this mode user is responsible for 
-                                                                        schduling a capture or playback after waiting for the 
-                                                                        respective video sync;s*/
-       VIDEO_ENGINE_PLAYBACK=1,        /**< Playback engine. In this mode there is a driver FIFO, which 
-                                                                       is reponisble for scheudling a frame for  playback.
-                                                                       User just adds video frames into the fifo.*/
-       VIDEO_ENGINE_CAPTURE=2,         /**< Capture engine  In this mode there is a driver FIFO, which 
-                                                                       is reponisble for scheudling a frame for capture.
-                                                                       User just retreives video frames from the FIFO.*/
-       VIDEO_ENGINE_PAGEFLIP=3,        /**< not supported any more */
-       VIDEO_ENGINE_DUPLEX=4,          /**< Full Duplex video. This is a FIFO mode. Use this mode if you want 
-                                                               to capture and playback at the same time.*/
-       VIDEO_ENGINE_INVALID
-} EEngineMode;
-
-/**< use this enumerator for controlling emb audio output properties using the 
-        property EMBEDDED_AUDIO_OUTPUT.        
-*/
-typedef enum _EBlueEmbAudioOutput
-{
-       blue_emb_audio_enable=0x1,      // Switches off/on  the whole HANC output from connecotrs associated with the channel
-       blue_auto_aes_to_emb_audio_encoder=0x2, //control whether the auto aes to emb thread should be running or not.
-       blue_emb_audio_group1_enable=0x4, /**< enables group1(ch 0-  3) emb audio */
-       blue_emb_audio_group2_enable=0x8, /**< enables group2(ch 4-  7) emb audio */
-       blue_emb_audio_group3_enable=0x10, /**< enables group3(ch 8-  11) emb audio */
-       blue_emb_audio_group4_enable=0x20, /**< enables group4(ch 12-  16) emb audio */
-       blue_enable_hanc_timestamp_pkt = 0x40
-}EBlueEmbAudioOutput;
-
-
-/**< Not used any more */
-typedef enum _EBufferTarget
-{
-       BUFFER_TARGET_VIDEO=0,          // Generic R/W DMA
-       BUFFER_TARGET_AUDIO,            // Special processing required for audio
-       BUFFER_TARGET_VIDEO_8BIT,       // Special R/W DMA utilising 8 bit aperture
-       BUFFER_TARGET_VIDEO_HALF,       // Special R/W DMA every second line (currently unused)
-       BUFFER_TARGET_VIDEO_OUT,        // Updates video out register on DMA completion for write 
-       BUFFER_TARGET_INVALID
-} EBufferTarget;
-
-#define        BUFFER_TYPE_VIDEO               (0)
-#define        BUFFER_TYPE_AUDIO               (1)
-#define        BUFFER_TYPE_VIDEO_8BIT  (2)     // use this when assigning a buffer to indicate DMA from aperture!
-#define        BUFFER_TYPE_VIDEO_OUT   (3)     // On DMA start set video output address to DMA target
-#define        BUFFER_TYPE_VIDEO_HALF  (4)     // DMA every second line...
-
-// Buffer identifiers
-#define        BUFFER_ID_AUDIO_IN              (0)
-#define        BUFFER_ID_AUDIO_OUT             (1)
-#define        BUFFER_ID_VIDEO0                (2)
-#define        BUFFER_ID_VIDEO1                (3)
-#define        BUFFER_ID_VIDEO2                (4)
-#define        BUFFER_ID_VIDEO3                (5)
-
-//#define      BUFFER_ID_USER_BASE             (6)
-
-
-
-#define VIDEO_BORDER_TOP               (0x10000000)
-#define VIDEO_BORDER_BOTTOM            (0x20000000)
-#define VIDEO_BORDER_LEFT              (0x40000000)
-#define VIDEO_BORDER_RIGHT             (0x80000000)
-
-typedef struct _AnalogCardPropStruct
-{
-       BLUE_UINT32 VideoChannel;
-       BLUE_INT32  prop;
-       BLUE_INT32  value;
-       BLUE_INT32  minValue;
-       BLUE_INT32  maxValue;
-       BLUE_INT32  bReadFlag;
-}AnalogCardPropStruct;
-
-typedef enum _EConnectorSignalFormatType
-{
-       Signal_Type_4444 =1,
-       Signal_Type_4224 =0,
-       Signal_Type_422=2
-}EConnectorSignalFormatType;
-
-typedef enum _EDMADirection
-{
-       DMA_WRITE=0,
-       DMA_READ=1,
-       DMA_INVALID=2
-}EDMADirection;                        
-
-
-typedef enum _MatrixColType
-{
-       COL_BLUE_PB=0,
-       COL_RED_PR=1,
-       COL_GREEN_Y=2,
-       COL_KEY=3
-}MatrixColType;
-
-
-
-
-/**< Bits defining supported features that can be used with VideoFeature_struct*/
-#define VIDEO_CAPS_INPUT_SDI                                   (0x00000001)    /**<  Capable of input of SDI Video */
-#define VIDEO_CAPS_OUTPUT_SDI                                  (0x00000002)    /**<  Capable of output of SDI Video */
-#define VIDEO_CAPS_INPUT_COMP                                  (0x00000004)    /**<  Capable of capturing Composite Video input */
-#define VIDEO_CAPS_OUTPUT_COMP                                 (0x00000008)    /**<  Capable of capturing Composite Video output */
-
-#define VIDEO_CAPS_INPUT_YUV                                   (0x00000010)    /**<  Capable of capturing Component Video input */
-#define VIDEO_CAPS_OUTPUT_YUV                                  (0x00000020)    /**<  Capable of capturing Component Video output */
-#define VIDEO_CAPS_INPUT_SVIDEO                                        (0x00000040)    /**<  Capable of capturing SVideo input */
-#define VIDEO_CAPS_OUTPUT_SVIDEO                               (0x00000080)    /**<  Capable of capturing SVideo output */
-
-#define VIDEO_CAPS_GENLOCK                                             (0x00000100)    /**<  Able to adjust Vert & Horiz timing */
-#define VIDEO_CAPS_VERTICAL_FLIP                               (0x00000200)    /**<  Able to flip rasterisation */
-#define VIDEO_CAPS_KEY_OUTPUT                                  (0x00000400)    /**<  Video keying output capable */
-#define VIDEO_CAPS_4444_OUTPUT                                 (0x00000800)    /**<  Capable of outputting 4444 (dual link) */
-
-#define VIDEO_CAPS_DUALLINK_INPUT                              (0x00001000)    /**<  Dual Link input   */
-#define VIDEO_CAPS_INTERNAL_KEYER                              (0x00002000)    /**<  Has got an internal Keyer */
-#define VIDEO_CAPS_RGB_COLORSPACE_SDI_CONN             (0x00004000)    /**<  Support RGB colorspace  in on an  SDI connector  */
-#define VIDEO_CAPS_HAS_PILLOR_BOX                              (0x00008000)    /**<  Has got support for pillor box */
-
-#define VIDEO_CAPS_OUTPUT_RGB                                  (0x00010000)    /**<  Has Analog RGB output connector  */
-#define VIDEO_CAPS_SCALED_RGB                                  (0x00020000)    /**<  Can scale RGB colour space */
-#define AUDIO_CAPS_PLAYBACK                                    (0x00040000)    /**<  Has got audio output */
-#define AUDIO_CAPS_CAPTURE                                             (0x00080000)
-
-#define VIDEO_CAPS_DOWNCONVERTER                               (0x00100000)
-#define VIDEO_CAPS_DUALOUTPUT_422_IND_STREAM   (0x00200000)    /**<  Specifies whether the card supports Dual Indepenedent 422 output streams */
-#define VIDEO_CAPS_DUALINPUT_422_IND_STREAM            (0x00400000)    /**<  Specifies whether the card supports Dual Indepenedent 422 input streams */
-
-#define VIDEO_CAPS_VBI_OUTPUT                                  (0x00800000)    /**<  Specifies whether the card supports VBI output */
-#define VIDEO_CAPS_VBI_INPUT                                   (0x04000000)    /**<  Specifies whether the card supports VBI input */  
-
-#define VIDEO_CAPS_HANC_OUTPUT                                 (0x02000000)
-#define VIDEO_CAPS_HANC_INPUT                                  (0x04000000)
-
-#define VIDEO_CAPS_FOUND_VPS0                                  VIDEO_CAPS_DOWNCONVERTER        /**< specifies whether the VPS0 scaler board was found on the card */
-#define VIDEO_CAPS_FOUND_VPS1                                  (0x10000000)                            /**< specifies whether the VPS1 scaler board was found on the card */
-#define VIDEO_CAPS_FOUND_VPIO                                  (0x20000000)                            /**< specifies whether the VPIO(DVI daughter board)board was found on the card */
-
-/*
-#define VIDEO_CAPS_DUALOUTPUT_422_IND_STREAM   (0x00100000)    // Specifies whether the card supports Dual Indepenedent 422 output streams
-#define VIDEO_CAPS_DUALINPUT_422_IND_STREAM            (0x00200000)    // Specifies whether the card supports Dual Indepenedent 422 input streams
-
-#define VIDEO_CAPS_VBI_OUTPUT                                  (0x00400000)
-#define VIDEO_CAPS_VBI_INPUT                                   (0x00800000)
-
-#define VIDEO_CAPS_HANC_OUTPUT                                 (0x01000000)
-#define VIDEO_CAPS_HANC_INPUT                                  (0x02000000)
-*/
-
-#define BLUE_CARD_BUFFER_TYPE_OFFSET           (12)
-#define BLUE_DMA_DATA_TYPE_OFFSET                      (16)
-#define BLUE_DMA_FLAGS_OFFSET                          (20)
-#define GetDMACardBufferId(value)                      (value & 0xFFF)
-#define GetCardBufferType(value)                       ((value & 0xF000) >> BLUE_CARD_BUFFER_TYPE_OFFSET)
-#define GetDMADataType(value)                          ((value & 0xF0000) >> BLUE_DMA_DATA_TYPE_OFFSET)
-#define GetDMAFlags(value)                                     ((value & 0xF00000) >> (BLUE_DMA_FLAGS_OFFSET))
-#define GetEpochDMAFlags(value)                                ((value & 0xFF00000) >> (BLUE_DMA_FLAGS_OFFSET))
-
-
-#define Blue_DMABuffer(CardBufferType,BufferId,DataType)               ( (((ULONG)DataType&0xF)<<(ULONG)BLUE_DMA_DATA_TYPE_OFFSET)| \
-                                                                                                                               ( CardBufferType<<(ULONG)BLUE_CARD_BUFFER_TYPE_OFFSET) | \
-                                                                                                                               ( ((ULONG)BufferId&0xFFF)) |0)
-
-#define BlueImage_VBI_DMABuffer(BufferId,DataType)                             ( (((ULONG)DataType&0xF)<<(ULONG)BLUE_DMA_DATA_TYPE_OFFSET)| \
-                                                                                                                               ( BLUE_CARDBUFFER_IMAGE_VBI<<(ULONG)BLUE_CARD_BUFFER_TYPE_OFFSET) | \
-                                                                                                                               ( ((ULONG)BufferId&0xFFF)) |0)
-
-#define BlueImage_DMABuffer(BufferId,DataType)                                 ( (((ULONG)DataType&0xF)<<(ULONG)BLUE_DMA_DATA_TYPE_OFFSET)| \
-                                                                                                                               ( BLUE_CARDBUFFER_IMAGE<<(ULONG)BLUE_CARD_BUFFER_TYPE_OFFSET) | \
-                                                                                                                               ( ((ULONG)BufferId&0xFFF)) |0)
-
-#define BlueImage_VBI_HANC_DMABuffer(BufferId,DataType)                        ( (((ULONG)DataType&0xF)<<(ULONG)BLUE_DMA_DATA_TYPE_OFFSET)| \
-                                                                                                                               ( BLUE_CARDBUFFER_IMAGE_VBI_HANC<<(ULONG)BLUE_CARD_BUFFER_TYPE_OFFSET) | \
-                                                                                                                               ( ((ULONG)BufferId&0xFFF)) |0)
-
-#define BlueImage_HANC_DMABuffer(BufferId,DataType)                            ( (((ULONG)DataType&0xF)<<(ULONG)BLUE_DMA_DATA_TYPE_OFFSET)| \
-                                                                                                                               ( BLUE_CARDBUFFER_IMAGE_HANC<<(ULONG)BLUE_CARD_BUFFER_TYPE_OFFSET) | \
-                                                                                                                               ( ((ULONG)BufferId&0xFFF)) |0)
-
-
-#define BlueBuffer(CardBufferType,BufferId)                    (((CardBufferType)<<BLUE_CARD_BUFFER_TYPE_OFFSET)|((BufferId&0xFFF))|0)
-#define BlueBuffer_Image_VBI(BufferId)                         (((BLUE_CARDBUFFER_IMAGE_VBI)<<BLUE_CARD_BUFFER_TYPE_OFFSET)|((BufferId&0xFFF))|0)
-#define BlueBuffer_Image(BufferId)                                     (((BLUE_CARDBUFFER_IMAGE)<<BLUE_CARD_BUFFER_TYPE_OFFSET)|((BufferId&0xFFF))|0)
-#define BlueBuffer_Image_VBI_HANC(BufferId)                    (((BLUE_CARDBUFFER_IMAGE_VBI_HANC)<<BLUE_CARD_BUFFER_TYPE_OFFSET)|((BufferId&0xFFF))|0)
-#define BlueBuffer_Image_HANC(BufferId)                                (((BLUE_CARDBUFFER_IMAGE_HANC)<<BLUE_CARD_BUFFER_TYPE_OFFSET)|((BufferId&0xFFF))|0)
-#define BlueBuffer_HANC(BufferId)                                      (((BLUE_CARDBUFFER_HANC)<<BLUE_CARD_BUFFER_TYPE_OFFSET)|((BufferId&0xFFF))|0)
-
-#define BYPASS_RELAY_A                                                         (0x00000001) // enable bypass relay channel a when loading driver , only used in linux 
-#define BYPASS_RELAY_B                                                         (0x00000002) // enable bypass relay channel a when loading driver , only used in linux 
-typedef enum _EDMACardBufferType
-{
-       BLUE_CARDBUFFER_IMAGE=0,
-       BLUE_CARDBUFFER_IMAGE_VBI_HANC=1,
-       BLUE_CARDBUFFER_IMAGE_VBI=2,
-       BLUE_CARDBUFFER_AUDIO_OUT=3,
-       BLUE_CARDBUFFER_AUDIO_IN=4,
-       BLUE_CARDBUFFER_HANC=5,
-       BLUE_CARDBUFFER_IMAGE_HANC=6,
-       BLUE_CARDBUFFER_INVALID=6
-}EDMACardBufferType;
-
-typedef enum _EDMADataType
-{
-       BLUE_DATA_FRAME=0,
-       BLUE_DATA_IMAGE=0,
-       BLUE_DATA_FIELD1=1,
-       BLUE_DATA_FIELD2=2,
-       BLUE_DATA_VBI=3,
-       BLUE_DATA_HANC=4,
-       BLUE_DATA_AUDIO_IN=5,
-       BLUE_DATA_AUDIO_OUT=6,
-       BLUE_DATA_FRAME_RDOM=7,
-       BLUE_DATA_FRAME_STEREO_LEFT=BLUE_DATA_FRAME,
-       BLUE_DATA_FRAME_STEREO_RIGHT=8,
-       BLUE_DMADATA_INVALID=9
-}EDMADataType;
-
-typedef struct _AUXILLARY_VIDEO_INFO
-{
-       BLUE_UINT32  video_channel_id;
-       BLUE_UINT32  lVideoMode;
-       BLUE_UINT32  lUniqueId;
-       BLUE_UINT32  lInfoType;
-       BLUE_UINT32  lMemFmt;
-       BLUE_UINT32  lGpio;
-       BLUE_UINT64  lLTC;
-}Auxillary_Video_Info;
-
-
-typedef enum _EBlueVideoAuxInfoType
-{
-       BLUE_VIDEO_AUX_MEMFMT_CHANGE=1,
-       BLUE_VIDEO_AUX_UPDATE_LTC=2,
-       BLUE_VIDEO_AUX_UPDATE_GPIO=4,
-       BLUE_VIDEO_AUX_VIDFMT_CHANGE=8,
-
-}EBlueVideoAuxInfoType;
-// Max of 4 bits 
-
-//AUDIO_OUTPUT_PROP/AUDIO_CHANNEL_ROUTING
-#define GET_ANALOG_AUDIO_LEFT_ROUTINGCHANNEL(value)                            (value&0xFF)
-#define GET_ANALOG_AUDIO_RIGHT_ROUTINGCHANNEL(value)                   ((value&0xFF00)>>8)
-#define SET_ANALOG_AUDIO_ROUTINGCHANNEL(left,right)                            (((right & 0xFF)<<8)|(left & 0xFF))
-#define SET_AUDIO_OUTPUT_ROUTINGCHANNEL(output_type,src_channel_id,_output_channel_id) ((1<<31)|((output_type&3)<<29)|((_output_channel_id &0x3F)<<23)|((src_channel_id & 0x3F)<<16))
-#define GET_AUDIO_OUTPUT_SRC_CHANNEL_ROUTING(value)                            ((value>>16) & 0x3F)
-#define GET_AUDIO_OUTPUT_CHANNEL_ROUTING(value)                                        ((value>>23) & 0x3F)
-#define GET_AUDIO_OUTPUT_TYPE_ROUTING(value)                                   ((value & 0x60000000)>>29)
-
-//AES_OUTPUT_ROUTING
-#define SET_AES_OUTPUT_ROUTING(OutputVideoChannel, AudioSrcChannel, AudioDstChannel)   (((OutputVideoChannel & 0xFF) << 16) | ((AudioDstChannel & 0xFF) << 8) | (AudioSrcChannel & 0xFF))
-#define GET_AES_OUTPUT_ROUTING_STREAM(value)                                                                                   ((value >> 16) & 0xFF)
-#define GET_AES_OUTPUT_ROUTING_DST_CHANNEL(value)                                                                              ((value >> 8) & 0xFF)
-#define GET_AES_OUTPUT_ROUTING_SRC_CHANNEL(value)                                                                              (value & 0xFF)
-
-//MUTE_AES_OUTPUT_CHANNEL
-#define SET_MUTE_AES_OUTPUT_CHANNEL(AudioDstChannel, Mute)     (((Mute & 0x1) << 31) | AudioDstChannel & 0xFF)
-
-#define AUDIO_INPUT_SOURCE_SELECT_FLAG                                                 (1<<16) 
-#define AUDIO_INPUT_SOURCE_SELECT(SynchCount,AudioInputSource) (AUDIO_INPUT_SOURCE_SELECT_FLAG|(SynchCount)|(AudioInputSource<<17))
-
-struct blue_video_connection_routing_struct
-{
-       BLUE_UINT32 video_channel;
-       BLUE_UINT32 duallink_flag;
-       BLUE_UINT32 link1_connector;
-       BLUE_UINT32 link2_connector;
-};
-
-#pragma pack(push, video_sync_struct, 1)
-typedef struct _blue_video_sync_struct
-{
-       BLUE_UINT32     sync_wait_type;                 // field or frame (UPD_FMT_FIELD or UPD_FMT_FRAME)
-       BLUE_UINT32     video_channel;                  // which video channel interrupt should the interrupt wait for, e.g. BLUE_VIDEO_INPUT_CHANNEL_A, BLUE_VIDEO_OUTPUT_CHANNEL_A, etc.
-       BLUE_UINT32     timeout_video_msc;              // field count when to return or IGNORE_SYNC_WAIT_TIMEOUT_VALUE to return at next field/frame sync
-       BLUE_UINT32     video_msc;                      // current video msc (field count)
-       BLUE_UINT32 current_display_frame_id;       // current buffer id which is being displayed
-       BLUE_UINT32 current_display_frame_uniqueid; // unique id associated with current buffer id which is being displayed
-                                                                                               // this is only valid when using fifo modes.
-       BLUE_UINT16     subfield_interrupt;                             // subfield interrupt number; 0 == main frame sync
-       BLUE_UINT16     subfield_lines;                                 // number of lines of video captured at this subfield interrupt
-       BLUE_UINT64     btcTimeStamp;                                   // Coordinated Bluefish Time timestamp of field/frame which is currently being displayed
-       BLUE_UINT8  pad[12];
-}blue_video_sync_struct;
-
-struct blue_external_ltc_input_sync_struct
-{
-       BLUE_UINT64 TimeCodeValue;
-       BLUE_UINT32 TimeCodeIsValid;
-       BLUE_UINT8  pad[20];
-};
-#pragma pack(pop,video_sync_struct)
-
-
-typedef enum _EBlueLUTType
-{
-       BLUE_MAIN_LUT_B_Pb=0,
-       BLUE_MAIN_LUT_G_Y=1,
-       BLUE_MAIN_LUT_R_Pr=2,
-       BLUE_AUX_LUT_B_Pb=3,
-       BLUE_AUX_LUT_G_Y=4,
-       BLUE_AUX_LUT_R_Pr=5,
-}EBlueLUTType;
-
-#pragma pack(push, video_frame, 1)
-struct VideoFeature_struct 
-{
-       BLUE_UINT32  Type;                   // Bluefish card type
-       BLUE_UINT32  CardSubType;               
-       BLUE_UINT32  Bus;                    // Which PIC bus (bridge) it is on
-       BLUE_UINT32  Slot;                   // Which slot card is plugged into
-       BLUE_UINT32  Feature;                //  Look at  the _EBlueFishCardFeatures  definition to know what each bit mean
-       BLUE_UINT32  FirmwareVersion;
-};
-
-struct blue_videoframe_info
-{
-       BLUE_UINT64 ltcTimeCode;
-       unsigned long videochannel;
-       unsigned long BufferId;
-       unsigned long Count;
-       unsigned long DroppedFrameCount;
-};
-
-struct blue_videoframe_info_ex
-{
-       BLUE_UINT64             ltcTimeCode;            //LTC timecode, not used
-       unsigned long   videochannel;           //the channel this frame was captured from
-       long                    BufferId;                       //this buffer contains the captured frame
-       unsigned long   Count;                          //total captured frames
-       unsigned long   DroppedFrameCount;      //dropped frame count
-       unsigned long   nFrameTimeStamp;        //field count the frame was captured at
-       unsigned long   nVideoSignalType;       //video mode of this frame
-       unsigned int    nASIPktCount;           //only for DVB-ASI; how many ASI packets are in this frame
-       unsigned int    nASIPktSize;            //only for DVB-ASI; how many bytes per packet
-       unsigned int    nAudioValidityBits;     //part of the channels status block for audio
-       BLUE_UINT64             btcTimeStamp;           //Coordinated Bluefish Time timestamp
-       unsigned char   ucVideoModeLinkA;       //only used in 1.5G dual link mode
-       unsigned char   ucVideoModeLinkB;       //only used in 1.5G dual link mode
-       unsigned char   pad[10];                        //not used
-};
-
-struct blue_1d_lookup_table_struct
-{
-       BLUE_UINT32 nVideoChannel;
-       BLUE_UINT32  nLUTId;
-       BLUE_UINT16 * pLUTData;
-       BLUE_UINT32  nLUTElementCount;  
-       BLUE_UINT8      pad[256];
-};
-#pragma pack(pop, video_frame)
-
-#pragma pack(push, blue_dma_request, 1)
-struct blue_dma_request_struct
-{
-       unsigned char * pBuffer;
-       BLUE_UINT32 video_channel;
-       BLUE_UINT32     BufferId;
-       unsigned int BufferDataType;
-       unsigned int FrameType;
-       unsigned int BufferSize;
-       unsigned int Offset;
-       unsigned long   BytesTransferred;
-       unsigned char pad[64];
-};
-
-enum SerialPort_struct_flags
-{
-       SerialPort_Read=1,
-       SerialPort_Write=2,
-       SerialPort_TX_Queue_Status=4,           
-       SerialPort_RX_Queue_Status=8,
-       SerialPort_RX_FlushBuffer=16,
-       SerialPort_RX_IntWait_Return_On_Data=32,
-       
-};
-
-struct SerialPort_struct
-{
-       unsigned char   Buffer[64];
-       unsigned int    nBufLength;
-       unsigned int    nSerialPortId;
-       unsigned int    bFlag; // SerialPort_struct_flags 
-       unsigned short  sTimeOut; 
-};
-
-
-struct blue_video_scaler_ceofficent
-{
-       BLUE_UINT32 ioctl_read_only_flag;
-       BLUE_UINT32 nScalerId;
-       BLUE_UINT32 nScalerFilterType;
-       BLUE_UINT32 nScalerCoefficentWeight[15];
-};
-
-enum blue_video_scaler_param_flags
-{
-       scaler_flags_set_destrect_as_framesize = 0x1,
-};
-
-struct blue_video_scaler_param_struct
-{
-       BLUE_UINT32 ioctl_read_only_flag;
-       BLUE_UINT32 nScalerId;
-       BLUE_UINT32 nSrcVideoHeight;
-       BLUE_UINT32 nSrcVideoWidth;
-       BLUE_UINT32 nSrcVideoYPos;
-       BLUE_UINT32 nSrcVideoXPos;
-       BLUE_UINT32 nDestVideoHeight;
-       BLUE_UINT32 nDestVideoWidth;
-       BLUE_UINT32 nDestVideoYPos;
-       BLUE_UINT32 nDestVideoXPos;
-       BLUE_UINT32 nHScaleFactor;
-       BLUE_UINT32 nVScaleFactor;
-       BLUE_UINT32 nScalerOutputVideoMode;
-       BLUE_UINT32 nScalerParamFlags;
-       BLUE_UINT32 nScalerOutputRasterVideoMode;
-       BLUE_UINT32 nScalerOutputRasterHeight;
-       BLUE_UINT32 nScalerOutputRasterWidth;
-       BLUE_UINT32 pad[125];
-};
-#ifndef EXCLUDE_USERLAND_STRUCT
-struct blue_color_matrix_struct{
-       BLUE_UINT32  VideoChannel;
-       BLUE_UINT32 MatrixColumn; //MatrixColType enumerator defines this 
-       double  Coeff_B;
-       double  Coeff_R;
-       double  Coeff_G;
-       double  Coeff_K;
-       double  const_value;
-};
-#endif
-#pragma pack(pop, blue_dma_request)
-
-typedef enum _blue_output_hanc_ioctl_enum
-{
-       blue_get_output_hanc_buffer =                                   0,
-       blue_put_output_hanc_buffer =                                   1,
-       blue_get_valid_silent_hanc_data_status =                3,
-       blue_set_valid_silent_hanc_data_status =                4,
-       blue_start_output_fifo =                                                5,
-       blue_stop_output_fifo =                                                 6,
-       blue_init_output_fifo =                                                 7,
-       blue_get_queues_info =                                                  8,
-       blue_get_output_fifo_info=blue_get_queues_info,
-       blue_get_output_fifo_status =                                   9,
-       blue_start_output_fifo_no_auto_turn_off =               10      // this is used when we don't really use the FIFO, but handle audio playback ourselves in DirectShow;
-                                                                                                               // need to make sure that our HANC output FIFO doesn't turn off audio as there are never any HANC frames to be played
-}blue_output_hanc_ioctl_enum;
-
-typedef enum _blue_input_hanc_ioctl_enum
-{
-       blue_get_input_hanc_buffer=0,
-       blue_start_input_fifo=3,
-       blue_stop_input_fifo=4,
-       blue_init_input_fifo=5,
-       blue_playthru_input_fifo=6,
-       blue_release_input_hanc_buffer=7,
-       blue_map_input_hanc_buffer=8,
-       blue_unmap_input_hanc_buffer=9,
-       blue_get_info_input_hanc_fifo=10,
-       blue_get_input_rp188=11,
-       blue_get_input_fifo_status=12,
-}blue_input_hanc_ioctl_enum;
-
-
-#define HANC_PLAYBACK_INIT                             (0x00000001)
-#define HANC_PLAYBACK_START                            (0x00000002)
-#define HANC_PLAYBACK_STOP                             (0x00000004)
-
-#define HANC_CAPTURE_INIT                              (0x00000010)
-#define HANC_CAPTURE_START                             (0x00000020)
-#define HANC_CAPTURE_STOP                              (0x00000040)
-#define HANC_CAPTURE_PLAYTHRU                  (0x00000080)
-
-
-typedef enum _EOracFPGAConfigCMD
-{
-       ORAC_FPGA_CONFIG_CMD_ERASE_SECTOR=0,
-       ORAC_FPGA_CONFIG_CMD_UNLOCK_SECTOR=1,
-       ORAC_FPGA_CONFIG_CMD_WRITE_DATA=2,
-       ORAC_FPGA_CONFIG_CMD_STATUS=3,
-       ORAC_FPGA_CONFIG_CMD_READMODE=4,
-       ORAC_FPGA_CONFIG_RAW_WRITE=5,
-       ORAC_FPGA_CONFIG_RAW_READ=6,
-       ORAC_FPGA_CONFIG_CMD_READ_DATA=7,
-       ORAC_FPGA_CONFIG_INIT=8,
-       ORAC_FPGA_CONFIG_EXIT=9
-}EOracFPGAConfigCMD;
-
-
-#define ANALOG_CHANNEL_0 MONO_CHANNEL_9
-#define ANALOG_CHANNEL_1 MONO_CHANNEL_10
-
-/*Assumes that the data is in stereo pairs not individual samples*/
-#define STEREO_PAIR_1  (MONO_CHANNEL_1|MONO_CHANNEL_2) /* Mono Channel 1 & Mono channel 2* together*/
-#define STEREO_PAIR_2  (MONO_CHANNEL_3|MONO_CHANNEL_4) /* Mono Channel 3 & Mono Channel 4* together*/
-#define STEREO_PAIR_3  (MONO_CHANNEL_5|MONO_CHANNEL_6) /* Mono Channel 5 & Mono Channel 6* together*/
-#define STEREO_PAIR_4  (MONO_CHANNEL_7|MONO_CHANNEL_8) /* Mono Channel 7 & Mono Channel 8* together*/
-
-#define ANALOG_AUDIO_PAIR (ANALOG_CHANNEL_0|ANALOG_CHANNEL_1)
-
-#define BLUE_LITTLE_ENDIAN     0
-#define BLUE_BIG_ENDIAN                1
-
-#define GREED_SILENT_HANC_BUFFER1      250
-#define GREED_SILENT_HANC_BUFFER2      251
-
-#define        AES_SRC_BYPASS_CHANNEL_1_2 0x1
-#define        AES_SRC_BYPASS_CHANNEL_3_4 0x2
-#define        AES_SRC_BYPASS_CHANNEL_5_6 0x4
-#define        AES_SRC_BYPASS_CHANNEL_7_8 0x8
-
-typedef enum _EEpochRoutingElements
-{
-       EPOCH_SRC_DEST_SCALER_0=0x1,
-       EPOCH_SRC_DEST_SCALER_1,
-       EPOCH_SRC_DEST_SCALER_2,
-       EPOCH_SRC_DEST_SCALER_3,
-
-       EPOCH_SRC_SDI_INPUT_A,
-       EPOCH_SRC_SDI_INPUT_B,
-       EPOCH_SRC_SDI_INPUT_C,
-       EPOCH_SRC_SDI_INPUT_D,
-
-       EPOCH_SRC_SDI_INPUT_A_3GB_LINK_A = EPOCH_SRC_SDI_INPUT_A,
-       EPOCH_SRC_SDI_INPUT_B_3GB_LINK_A = EPOCH_SRC_SDI_INPUT_B,
-       EPOCH_SRC_SDI_INPUT_C_3GB_LINK_A = EPOCH_SRC_SDI_INPUT_C,
-       EPOCH_SRC_SDI_INPUT_D_3GB_LINK_A = EPOCH_SRC_SDI_INPUT_D,
-
-       EPOCH_DEST_SDI_OUTPUT_A,
-       EPOCH_DEST_SDI_OUTPUT_B,
-       EPOCH_DEST_SDI_OUTPUT_C,
-       EPOCH_DEST_SDI_OUTPUT_D,
-
-       EPOCH_DEST_SDI_OUTPUT_A_3GB_LINK_A = EPOCH_DEST_SDI_OUTPUT_A,
-       EPOCH_DEST_SDI_OUTPUT_B_3GB_LINK_A = EPOCH_DEST_SDI_OUTPUT_B,
-       EPOCH_DEST_SDI_OUTPUT_C_3GB_LINK_A = EPOCH_DEST_SDI_OUTPUT_C,
-       EPOCH_DEST_SDI_OUTPUT_D_3GB_LINK_A = EPOCH_DEST_SDI_OUTPUT_D,
-
-       EPOCH_SRC_OUTPUT_MEM_INTERFACE_CHA,
-       EPOCH_SRC_OUTPUT_MEM_INTERFACE_CHB,
-
-       EPOCH_DEST_INPUT_MEM_INTERFACE_CHA,
-       EPOCH_DEST_INPUT_MEM_INTERFACE_CHB,
-
-       EPOCH_DEST_AES_ANALOG_AUDIO_OUTPUT,
-
-       EPOCH_SRC_AV_SIGNAL_GEN,
-       EPOCH_SRC_DEST_VPIO_SCALER_0,
-       EPOCH_SRC_DEST_VPIO_SCALER_1,
-
-       EPOCH_DEST_VARIVUE_HDMI,
-
-       EPOCH_DEST_INPUT_MEM_INTERFACE_CHC,
-       EPOCH_DEST_INPUT_MEM_INTERFACE_CHD,
-
-       EPOCH_SRC_OUTPUT_MEM_INTERFACE_CHC,
-       EPOCH_SRC_OUTPUT_MEM_INTERFACE_CHD,
-
-       EPOCH_SRC_SDI_INPUT_A_3GB_LINK_B,
-       EPOCH_SRC_SDI_INPUT_B_3GB_LINK_B,
-       EPOCH_SRC_SDI_INPUT_C_3GB_LINK_B,
-       EPOCH_SRC_SDI_INPUT_D_3GB_LINK_B,
-
-       EPOCH_DEST_SDI_OUTPUT_A_3GB_LINK_B,
-       EPOCH_DEST_SDI_OUTPUT_B_3GB_LINK_B,
-       EPOCH_DEST_SDI_OUTPUT_C_3GB_LINK_B,
-       EPOCH_DEST_SDI_OUTPUT_D_3GB_LINK_B,
-
-       EPOCH_DEST_HDMI_OUTPUT,
-       EPOCH_DEST_HDMI_OUTPUT_LINK_A = EPOCH_DEST_HDMI_OUTPUT,
-       EPOCH_DEST_HDMI_OUTPUT_LINK_B,
-
-}EEpochRoutingElements;
-
-
-
-#define VPEnableFieldCountTrigger              ((BLUE_UINT64)1<<63)
-#define VPTriggerGetFieldCount(value)  ((BLUE_UINT64)value & 0xFFFFFFFF)
-
-typedef enum _EBlueScalerFilterType
-{
-       BlueScalerHorizontalYFilter=1,
-       BlueScalerHorizontalCFilter=2,
-       BlueScalerVerticalYFilter=3,
-       BlueScalerVerticalCFilter=4,
-}EBlueScalerFilterType;
-
-
-typedef enum _EBFLockSignalType
-{
-       BFLOCK_SIGNAL_UNKNOWN = 0x1000,
-       BFLOCK_SIGNAL_2398 =    0x1001,
-       BFLOCK_SIGNAL_2400 =    0x1002,
-       BFLOCK_SIGNAL_2500 =    0x1003,
-       BFLOCK_SIGNAL_2997 =    0x1004,
-       BFLOCK_SIGNAL_3000 =    0x1005,
-       BFLOCK_SIGNAL_4795 =    0x1006,
-       BFLOCK_SIGNAL_4800 =    0x1007,
-       BFLOCK_SIGNAL_5000 =    0x1008,
-       BFLOCK_SIGNAL_5994 =    0x1009,
-       BFLOCK_SIGNAL_6000 =    0x100A,
-}EBFLockSignalType;
-
-#define SET_EPOCH_SCALER_MODE(scaler_id,video_mode) ((scaler_id <<16)|video_mode)
-#define GET_EPOCH_SCALER_MODE(value)                           (value&0xFFFF)
-#define GET_EPOCH_SCALER_ID(value)                                     ((value&0xFFFF0000)>>16)
-
-
-// use these macros for retreiving the temp and fan speed.
-// on epoch range of cards.
-#define EPOCH_CORE_TEMP(value)                                 (value & 0xFF)
-#define EPOCH_BOARD_TEMP(value)                                        ((value>>16) & 0xFF)
-#define EPOCH_FAN_SPEED(value)                                 ((value>>24) & 0xFF)
-
-/** 
-       @desc   use these macro for doing the MR2 routing  on epoch range of cards.
-                       MR2 routing can be controlled using the property MR_ROUTING.
-*/
-#define EPOCH_SET_ROUTING(routing_src,routing_dest,data_link_type) ((routing_src & 0xFF) | ((routing_dest & 0xFF)<<8) | ((data_link_type&0xFFFF)<<16))
-#define EPOCH_ROUTING_GET_SRC_DATA(value)              (value & 0xFF)
-#define EPOCH_ROUTING_GET_DEST_DATA(value)             ((value>>8) & 0xFF)
-#define EPOCH_ROUTING_GET_LINK_TYPE_DATA(value)        ((value>>16) & 0xFFFF)
-
-#define GPIO_TX_PORT_A (1)
-#define GPIO_TX_PORT_B (2)
-
-#define EPOCH_GPIO_TX(port,value)      (port<<16|value) // if want to set each of the GPO 
-                                                                                                       // ports individually you should use this macro.
-                                                                                                       // without the macro it would set both the GPO
-                                                                                                       // ports on the card
-
-/**
-       @desc   use these macros for controlling epoch application watch dog settings.
-                       The card property EPOCH_APP_WATCHDOG_TIMER can be used to control 
-                       the watchdog timer functionality.
-*/
-enum enum_blue_app_watchdog_timer_prop
-{
-       enum_blue_app_watchdog_timer_start_stop=(1<<31),                        // can be used to enable/disable timer 
-       enum_blue_app_watchdog_timer_keepalive=(1<<30),                         // can be used to reset the timer value
-       enum_blue_app_watchdog_timer_get_present_time=(1<<29),          // can query to get the value of the timer
-       enum_blue_app_watchdog_get_timer_activated_status=(1<<28),      // can query to get whether the timer has been activated
-       enum_blue_app_watchdog_get_timer_start_stop_status=(1<<27),     // can query whether the timer has been set.
-       enum_blue_app_watchdog_enable_gpo_on_active=(1<<26), // using this enumerator you can tell the system that when 
-                                                                                                               // application watchdog timer has expired whether a GPO output should be triggered or not.
-                                                                                                               // you can use also use this  enumerator  to select
-                                                                                                               // which GPO output should be triggered with this. to use GPO port A pass a value of 
-                                                                                                               // GPIO_TX_PORT_A when this enumerator is used.
-       enum_blue_hardware_watchdog_enable_gpo=(1<<25) // can be used to enable/disable GPO trigger when hardware watchdog timer has been 
-                                                                                                       // triggered
-};
-
-#define EPOCH_WATCHDOG_TIMER_SET_MACRO(prop,value) (prop|(value &0xFFFF))
-#define EPOCH_WATCHDOG_TIMER_QUERY_MACRO(prop) (prop)
-#define EPOCH_WATCHDOG_TIMER_GET_VALUE_MACRO(value) (value&0xFFFF)
-
-enum enum_blue_rs422_port_flags
-{
-       enum_blue_rs422_port_set_as_slave =(1<<0) // If this flag is set the RS422 port would be set to slave mode.
-                                                                                         // by default port is setup to work in master mode , where it would be acting 
-                                                                                         // as master in the transactions.                                                                                       
-};
-#define EPOCH_RS422_PORT_FLAG_SET_MACRO(portid,value)  ((portid&0x3)|(value<<3))
-#define EPOCH_RS422_PORT_FLAG_GET_FLAG_MACRO(value)            ((value>>3)&0xFFFF)
-#define EPOCH_RS422_PORT_FLAG_GET_PORTID_MACRO(value)  (value&0x3)
-
-
-enum enum_blue_dvb_asi_packing_format
-{
-       enum_blue_dvb_asi_packed_format=1,/**< In this packing method the asi packets are stored as 188 or 204 bytes*/
-       enum_blue_dvb_asi_packed_format_with_timestamp=2,/**< In this packing method the asi packets are stored as (8+188) or (8+204) bytes
-                                                                                                                       The timestamp is stored at the begininig of the packet , using 8 bytes*/
-       enum_blue_dvb_asi_256byte_container_format=3,
-       enum_blue_dvb_asi_256byte_container_format_with_timestamp=4
-};
-
-enum enum_blue_dvb_asi_packet_size
-{
-       enum_blue_dvb_asi_packet_size_188_bytes = 1,
-       enum_blue_dvb_asi_packet_size_204_bytes = 2
-};
-
-
-#define RS422_SERIALPORT_FLAG(timeout,port,RxFlushBuffer) (((unsigned long)(timeout)<<16)|(port & 0x3) | (RxFlushBuffer<<15))
-// use this macro with Wait_For_SerialPort_InputData,
-// if you you want the  function to return 
-// immediatelty when it gets byte in the serial RX port.
-#define RS422_SERIALPORT_FLAG2(timeout,port,RxFlushBuffer,RXIntWaitReturnOnAvailData) (((unsigned long)(timeout)<<16)|(port & 0x3) | (RxFlushBuffer<<15)|(RXIntWaitReturnOnAvailData<<14))
-
-typedef enum _blue_blackgenerator_status
-{
-       ENUM_BLACKGENERATOR_OFF =       0,      //producing normal video output
-       ENUM_BLACKGENERATOR_ON =        1,      //producing black video output
-       ENUM_BLACKGENERATOR_SDI_SYNC_OFF =      2       //no valid SDI signal is coming out of our SDI output connector; only available in Epoch ASI firmware
-}blue_blackgenerator_status;
-
-typedef enum _EBlueExternalLtcSource
-{
-       EXT_LTC_SRC_BREAKOUT_HEADER = 0,        //default; header on the PCB board/Shield
-       EXT_LTC_SRC_GENLOCK_BNC = 1                     //Genlock BNC connector
-}EBlueExternalLtcSource;
-
-////the following macros are used with card property INTERLOCK_REFERENCE
-#define INTERLOCK_REFERENCE_GET_OUTPUT_ENABLED(value)          ((value)                & 0x01)
-#define INTERLOCK_REFERENCE_GET_INPUT_DETECTED(value)          ((value >> 1)   & 0x01)
-#define INTERLOCK_REFERENCE_GET_SLAVE_POSITION(value)          ((value >> 2)   & 0x1F)
-
-//the following macros are used with card property CARD_FEATURE_STREAM_INFO
-#define CARD_FEATURE_GET_SDI_OUTPUT_STREAM_COUNT(value)                ((value)                & 0xF)
-#define CARD_FEATURE_GET_SDI_INPUT_STREAM_COUNT(value)         ((value >> 4)   & 0xF)
-#define CARD_FEATURE_GET_ASI_OUTPUT_STREAM_COUNT(value)                ((value >> 8)   & 0xF)
-#define CARD_FEATURE_GET_ASI_INPUT_STREAM_COUNT(value)         ((value >> 12)  & 0xF)
-#define CARD_FEATURE_GET_3G_SUPPORT(value)                                     ((value >> 13)  & 0xF)
-
-//the following macros are used with card property CARD_FEATURE_CONNECTOR_INFO
-#define CARD_FEATURE_GET_SDI_OUTPUT_CONNECTOR_COUNT(value)     ((value)                & 0xF)
-#define CARD_FEATURE_GET_SDI_INPUT_CONNECTOR_COUNT(value)      ((value >> 4)   & 0xF)
-#define CARD_FEATURE_GET_AES_CONNECTOR_SUPPORT(value)          ((value >> 8)   & 0x1)
-#define CARD_FEATURE_GET_RS422_CONNECTOR_SUPPORT(value)                ((value >> 9)   & 0x1)
-#define CARD_FEATURE_GET_LTC_CONNECTOR_SUPPORT(value)          ((value >> 10)  & 0x1)
-#define CARD_FEATURE_GET_GPIO_CONNECTOR_SUPPORT(value)         ((value >> 11)  & 0x1)
-#define CARD_FEATURE_GET_HDMI_CONNECTOR_SUPPORT(value)         ((value >> 12)  & 0x1)
-
-//the following macros are used with card property VIDEO_ONBOARD_KEYER
-#define VIDEO_ONBOARD_KEYER_GET_STATUS_ENABLED(value)                          ((value) & 0x1)
-#define VIDEO_ONBOARD_KEYER_GET_STATUS_OVER_BLACK(value)                       ((value) & 0x2)
-#define VIDEO_ONBOARD_KEYER_GET_STATUS_USE_INPUT_ANCILLARY(value)      ((value) & 0x4)
-#define VIDEO_ONBOARD_KEYER_GET_STATUS_DATA_IS_PREMULTIPLIED(value)    ((value) & 0x8)
-#define VIDEO_ONBOARD_KEYER_SET_STATUS_ENABLED(value)                          (value |= 0x1)
-#define VIDEO_ONBOARD_KEYER_SET_STATUS_DISABLED(value)                         (value &= ~(0x1))
-#define VIDEO_ONBOARD_KEYER_SET_STATUS_ENABLE_OVER_BLACK(value)                (value |= 0x2)
-#define VIDEO_ONBOARD_KEYER_SET_STATUS_DISABLE_OVER_BLACK(value)       (value &= ~(0x2))
-#define VIDEO_ONBOARD_KEYER_SET_STATUS_USE_INPUT_ANCILLARY(value)      (value |= 0x4)          //only use this setting when keying over valid input (input must also match output video mode), includes HANC and VANC
-#define VIDEO_ONBOARD_KEYER_SET_STATUS_USE_OUTPUT_ANCILLARY(value)     (value &= ~(0x4))
-#define VIDEO_ONBOARD_KEYER_SET_STATUS_DATA_IS_PREMULTIPLIED(value)    (value |= 0x8)
-#define VIDEO_ONBOARD_KEYER_SET_STATUS_DATA_IS_NOT_PREMULTIPLIED(value)        (value &= ~(0x8))
-
-//the following macros are used with card property EPOCH_HANC_INPUT_FLAGS
-#define HANC_FLAGS_IS_ARRI_RECORD_FLAG_SET(value)      ((value) & 0x1)
-
-//the following macros are used with card property EPOCH_RAW_VIDEO_INPUT_TYPE
-#define RAW_VIDEO_INPUT_TYPE_IS_10BIT          (0x01)
-#define RAW_VIDEO_INPUT_TYPE_IS_12BIT          (0x02)
-#define RAW_VIDEO_INPUT_TYPE_IS_WEISSCAM       (0x10)
-#define RAW_VIDEO_INPUT_TYPE_IS_ARRI           (0x20)
-
-//the following macros are used with card property EPOCH_PCIE_CONFIG_INFO
-#define PCIE_CONFIG_INFO_GET_MAX_PAYLOAD_SIZE(value) ((value) & 0xFFFF)
-#define PCIE_CONFIG_INFO_GET_MAX_READREQUEST_SIZE(value) ((value >> 16) & 0xFFFF)
diff --git a/modules/bluefish/interop/BlueHancUtils.h b/modules/bluefish/interop/BlueHancUtils.h
deleted file mode 100644 (file)
index 53f18f3..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-#pragma once
-#ifndef BLUE_LINUX_CODE
-#ifndef HANCUTILS_USE_STATIC_LIB
-       #ifdef HANCUTILS_EXPORTS
-               #define HANCUTILS_API __declspec(dllexport)
-       #elif defined(__APPLE__)
-               #define HANCUTILS_API
-               #define ATLTRACE        printf
-       #else
-               #define HANCUTILS_API __declspec(dllimport)
-       #endif
-#else
-       #define HANCUTILS_API
-#endif
-#else
-       #define HANCUTILS_API
-typedef bool BOOL;     
-#endif 
-#include "BlueDriver_p.h"
-
-
-
-
-extern "C"
-{
-/**
-@defgroup hanc_manipilation_function Embedded audio
-@{
-*/
-
-#pragma pack(push, hanc_struct, 1)
-
-/**
-@brief The structure is used to extract/insert  Embedded audio to and from the HANC stream of Greed and Leon based cards.*/
-
-struct hanc_stream_info_struct
-{
-       BLUE_INT32 AudioDBNArray[4];                    /**< Contains the DBN values that should be used for each of the embedded audio groups*/
-       BLUE_INT32 AudioChannelStatusBlock[4];  /**< channel status block information for each of the embedded audio group*/
-       BLUE_UINT32 flag_valid_time_code;               /**< flag which identifies the validity of the time code member in the #hanc_stream_info_struct*/
-       BLUE_UINT64     time_code;                                      /**< RP188 time code that was extracted from the HANC buffer or RP188 timecode which should be inserted 
-                                                                                                into the HANC buffer*/
-       BLUE_UINT32* hanc_data_ptr;                             /**< Hanc Buffer which should be used as the source or destination for either extraction or insertion */
-       BLUE_UINT32 video_mode;                                 /**< video mode which this hanc buffer which be used with. We need this information for do the required audio distribution 
-                                                                                                especially NTSC */
-       BLUE_UINT64 ltc_time_code;
-       BLUE_UINT64 sd_vitc_time_code;
-       BLUE_UINT64 rp188_ltc_time_code;
-       BLUE_UINT32 pad[126];
-};
-
-#define AUDIO_INPUT_SOURCE_EMB 0
-#define AUDIO_INPUT_SOURCE_AES 1
-struct hanc_decode_struct
-{
-       void* audio_pcm_data_ptr;                       // Buffer which would be used to store the extracted PCM
-                                                                               // audio data. Must be filled in by app before calling function.
-       BLUE_UINT32 audio_ch_required_mask;     // which all audio channels should be extracted from the 
-                                                                               // audio frame .Must be filled in by app before calling function.
-       BLUE_UINT32 type_of_sample_required;// type of destination  audio channel
-                                                                               //ie 16 bit ,24 bit or 32 bit PCM data .
-                                                                               //Must be filled in by app before calling function.
-       BLUE_UINT32 no_audio_samples;           // this would contain how many audio samples has been decoded from
-                                                                               // the hanc buffer.
-       BLUE_UINT64 timecodes[7];                       // Would extract the timecode information from the audio frame.
-       void * raw_custom_anc_pkt_data_ptr;                     // This buffer  would contain the raw ANC packets that was found in the orac hanc buffer.
-                                                                                               // this would contain any ANC packets that is not of type embedded audio and RP188 TC.
-                                                                                               //Must be filled in by app before calling function. can be NULL
-       BLUE_UINT32 sizeof_custom_anc_pkt_data_ptr; // size of the ANC buffer array
-                                                                                               //Must be filled in by app before calling function. can be NULL
-       BLUE_UINT32 avail_custom_anc_pkt_data_bytes;// how many custom ANC packets has been decoded into raw_hanc_pkt_data_ptr
-                                                                                               //Must be filled in by app before calling function. can be NULL
-       BLUE_UINT32 audio_input_source;         // Used to select the audio input source. 
-                                                                               // whether it is AES or Embedded.
-                                                                               //Must be filled in by app before calling function.
-       BLUE_UINT32 audio_temp_buffer[16];      // this is used to store split audio sample 
-                                                                               // which did not contain all its audio channels
-                                                                               // in one audio frame
-                                                                               //Must be initialised to zero by app before first instantiating the  function. 
-       BLUE_UINT32 audio_split_buffer_mask; // The mask would be used to make a note of 
-                                                                               // split audio sample information for a frame.
-                                                                               //Must be initialised to zero by app before first instantiating the  function. 
-       BLUE_UINT32 max_expected_audio_sample_count; // specify the maximum number of audio samples 
-                                                                                                // that the audio pcm buffer can contain.
-                                                                                               //Must be filled in by app before calling function.
-       BLUE_UINT32 pad[124];
-};
-
-#pragma pack(pop, hanc_struct)
-
-HANCUTILS_API BLUE_UINT32 encode_hanc_frame(struct hanc_stream_info_struct* hanc_stream_ptr,
-                                                                                       void* audio_pcm_ptr,
-                                                                                       BLUE_UINT32 no_audio_ch,
-                                                                                       BLUE_UINT32 no_audio_samples,
-                                                                                       BLUE_UINT32 nTypeOfSample,
-                                                                                       BLUE_UINT32 emb_audio_flag);
-
-HANCUTILS_API BLUE_UINT32 encode_hanc_frame_ex( BLUE_UINT32 card_type,
-                                                                                               struct hanc_stream_info_struct* hanc_stream_ptr,
-                                                                                               void* audio_pcm_ptr,
-                                                                                               BLUE_UINT32 no_audio_ch,
-                                                                                               BLUE_UINT32 no_audio_samples,
-                                                                                               BLUE_UINT32 nTypeOfSample,
-                                                                                               BLUE_UINT32 emb_audio_flag);
-
-
-HANCUTILS_API BLUE_UINT32 encode_hanc_frame_with_ucz(  BLUE_UINT32 card_type,
-                                                                                                               struct hanc_stream_info_struct* hanc_stream_ptr,
-                                                                                                               void* audio_pcm_ptr,
-                                                                                                               BLUE_UINT32 no_audio_ch,
-                                                                                                               BLUE_UINT32 no_audio_samples,
-                                                                                                               BLUE_UINT32 nTypeOfSample,
-                                                                                                               BLUE_UINT32 emb_audio_flag,
-                                                                                                               BLUE_UINT8* pUCZBuffer);
-
-HANCUTILS_API BLUE_UINT32 create_embed_audiosample(    void* raw_data_ptr,
-                                                                                                       BLUE_UINT32* emb_data_ptr,
-                                                                                                       BLUE_UINT32 channels_per_audio_sample,
-                                                                                                       BLUE_UINT32 bytes_per_ch,
-                                                                                                       BLUE_UINT32 no_samples,
-                                                                                                       BLUE_UINT32 emb_audio_flags,
-                                                                                                       BLUE_UINT8* Audio_Groups_DBN_Array,
-                                                                                                       BLUE_UINT8* Audio_Groups_statusblock_Array);
-
-HANCUTILS_API BLUE_UINT32* get_embed_audio_distribution_array(BLUE_UINT32 video_mode, BLUE_UINT32 sequence_no);
-//HANCUTILS_API BLUE_UINT32 * GetAudioFrameSequence(BLUE_UINT32 video_output_standard);
-
-HANCUTILS_API bool hanc_stream_analyzer(BLUE_UINT32 *src_hanc_buffer,struct hanc_stream_info_struct * hanc_stream_ptr);
-HANCUTILS_API bool orac_hanc_stream_analyzer(BLUE_UINT32 card_type,BLUE_UINT32 *src_hanc_buffer,struct hanc_decode_struct * decode_ptr,char * analyzer_output_file);
-HANCUTILS_API bool hanc_decoder_ex(    BLUE_UINT32 card_type,
-                                                                       BLUE_UINT32* src_hanc_buffer,
-                                                                       struct hanc_decode_struct* hanc_decode_struct_ptr);
-
-/**
-@}
-*/
-
-/**
-@defgroup vanc_manipilation_function vanc packet I/O 
-@{
-*/
-
-
-/**
-@brief enumerator used by VANC manipulation function on HD cards to notify whether 
-               VANC pakcet shoule be inserted/extracted from VANC Y buffers or VANC CbCr buffer.
-               This enumerator will only be used on  HD video modes as it is the only with 
-               2 type of ANC bufers ir Y and CbCr. On SD Modes the ANC data is inserted across 
-               both Y anc CbCr values.
-               
-*/
-enum blue_vanc_pkt_type_enum
-{
-       blue_vanc_pkt_y_comp=0, /**< ANC pkt should be inserted/extracted from the  Y component buffer*/
-       blue_vanc_pkt_cbcr_comp=1 /**< ANC pkt should be inserted/extracted from the  CbCr component buffer*/
-};
-
-/*!
-@brief Use this function to initialise VANC buffer before inserting any packets into the buffer
-@param CardType type of bluefish  card to which this vanc buffer was transferred to.
-@param nVideoMode video mode under which this vanc buffer will be used.
-@param pixels_per_line width in pixels of the vanc buffer that has to be initialised.
-@param lines_per_frame height of the vanc buffer that has to be initialised.
-@param pVancBuffer vanc buffer which has to be initialised.
-@remarks.
-
-*/
-HANCUTILS_API BLUE_UINT32 blue_init_vanc_buffer(BLUE_UINT32 CardType,BLUE_UINT32 nVideoMode,BLUE_UINT32 pixels_per_line,BLUE_UINT32 lines_per_frame,BLUE_UINT32 * pVancBuffer);
-/*!
-@brief this function can be used to extract ANC packet from HD cards. Currently we can only extract packets in the VANC space.
-@param CardType type of the card from which the vanc buffer was captured.
-@param vanc_pkt_type This parameter denotes whether to search for the VANC packet in Y Space or Cb/Cr Space.
-                                        The values this parameter accepts are defined in the enumerator #blue_vanc_pkt_type_enum
-@param src_vanc_buffer Vanc buffer which was captured from bluefish card
-@param src_vanc_buffer_size size of the vanc buffer which should be parsed for the specified vanc packet
-@param pixels_per_line specifies how many pixels are there in each line of VANC buffer
-@param vanc_pkt_did specifies the DID of the Vanc packet which should be extracted from the buffer
-@param vanc_pkt_sdid Returns the SDID of the extracted VANC packet
-@param vanc_pkt_data_length returns the size of the extracted VANC packet. The size is specifed as number of UDW words
-                                                       that was  contained in the packet
-@param vanc_pkt_data_ptr pointer to UDW of the VANC packets . The 10 bit UDW words are packed in a 16 bit integer. The bottom 10 bit of the 
-                                               16 bit word contains the UDW data.
-@param vanc_pkt_line_no line number  where the packet was found .
-
-@remarks.
-
-*/
-HANCUTILS_API BLUE_INT32  vanc_pkt_extract( 
-                                                                                       BLUE_UINT32 CardType,
-                                                                                       BLUE_UINT32 vanc_pkt_type,
-                                                                                       BLUE_UINT32 * src_vanc_buffer,
-                                                                                       BLUE_UINT32 src_vanc_buffer_size,
-                                                                                       BLUE_UINT32 pixels_per_line,
-                                                                                       BLUE_UINT32             vanc_pkt_did,
-                                                                                       BLUE_UINT16 * vanc_pkt_sdid,
-                                                                                       BLUE_UINT16 * vanc_pkt_data_length,
-                                                                                       BLUE_UINT16 * vanc_pkt_data_ptr,
-                                                                                       BLUE_UINT16 * vanc_pkt_line_no);
-
-/**
-@brief use this function to insert ANC packets into the VANC space of the HD cards.
-@param CardType type of the card from which the vanc buffer was captured.
-@param vanc_pkt_type This parameter denotes whether to search for the VANC packet in Y Space or Cb/Cr Space.
-                                        The values this parameter accepts are defined in the enumerator #blue_vanc_pkt_type_enum
-@param vanc_pkt_line_no line in th VANC buffer where the ANC packet should inserted.
-@param vanc_pkt_buffer vanc ANC packet which should be inserted into the VANC buffer.
-@param vanc_pkt_buffer_size size of the ANC packet including the checksum ,ADF , SDID, DID and Data Count
-@param dest_vanc_buffer VANC buffer into which the ANC packet will be inserted into.
-@param pixels_per_line specifies how many pixels are there in each line of VANC buffer
-*/
-HANCUTILS_API BLUE_INT32  vanc_pkt_insert(
-                                                                                       BLUE_UINT32 CardType,
-                                                                                       BLUE_UINT32 vanc_pkt_type,
-                                                                                       BLUE_UINT32 vanc_pkt_line_no,
-                                                                                       BLUE_UINT32 * vanc_pkt_buffer,
-                                                                                       BLUE_UINT32 vanc_pkt_buffer_size,
-                                                                                       BLUE_UINT32 * dest_vanc_buffer,
-                                                                                       BLUE_UINT32 pixels_per_line);
-
-/** @} */
-
-/**
-@defgroup vanc_decode_encoder_helper ANC encoder/decoder 
-       @{
-*/
-HANCUTILS_API BLUE_UINT32 decode_eia_708b_pkt(BLUE_UINT32 CardType,BLUE_UINT16 * vanc_pkt_data_ptr,BLUE_UINT16 pkt_udw_count,BLUE_UINT16 eia_pkt_subtype,BLUE_UINT8 * decoded_ch_str);
-//#ifndef BLUE_LINUX_CODE
-//HANCUTILS_API BLUE_UINT64 decode_rp188_packet(BLUE_UINT32 CardType,BLUE_UINT32 * src_vanc_buffer,BLUE_UINT32 UDW_Count,BLUE_UINT64 *rp188_dbb);
-//HANCUTILS_API bool blue_vitc_decoder_8bit_fmt(BLUE_UINT8 * raw_vbi_ptr,BLUE_UINT32 pixels_per_line,BLUE_UINT32 mem_fmt,BLUE_UINT32 vitc_line_no,BLUE_UINT64 * vitc_time_code);
-//HANCUTILS_API bool blue_vitc_decoder_10bit_v210(BLUE_UINT8 * raw_vbi_ptr, BLUE_UINT32 vitc_line_no, BLUE_UINT64 * vitc_time_code);
-//HANCUTILS_API unsigned int create_rp188_pkt(
-//                                                       BLUE_UINT32 cardType,
-//                                                       BLUE_UINT32 * emb_data_ptr,
-//                                                       BLUE_UINT32 line_no,
-//                                                       BLUE_UINT32 start_new_line,
-//                                                       BLUE_UINT64 timecode,
-//                                                       BLUE_UINT64 rp188_dbb);
-//#endif
-
-
-/** @} */
-}
diff --git a/modules/bluefish/interop/BlueVelvetC.h b/modules/bluefish/interop/BlueVelvetC.h
deleted file mode 100644 (file)
index c613880..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-//
-//  Copyright (c) 2014 Bluefish444. All rights reserved.
-//
-
-#ifndef HG_BLUEVELVET_C
-#define HG_BLUEVELVET_C
-
-
-#if defined (_WIN32)
-       #include "BlueDriver_p.h"
-       #include "BlueHancUtils.h"
-    #ifdef BLUEVELVETC_EXPORTS
-        #define BLUEVELVETC_API __declspec(dllexport)
-    #else
-        #define BLUEVELVETC_API __declspec(dllimport)
-    #endif
-#elif defined (__APPLE__)
-    #define DLLEXPORT __attribute__ ((visibility("default")))
-    #define DLLLOCAL __attribute__ ((visibility("hidden")))
-    #define BLUEVELVETC_API DLLEXPORT
-
-       #include <dispatch/dispatch.h>
-    #include "BlueDriver_p.h"
-       #include "BlueVelvetCDefines.h"
-#elif defined (__linux__)
-       #define BLUEVELVETC_API
-
-    #include <BlueDriver_p.h>
-       #include "BlueVelvetCDefines.h"
-#endif
-
-
-//----------------------------------------------------------------------------
-typedef void* BLUEVELVETC_HANDLE;
-
-typedef int BErr;
-
-#define        BLUE_OK(a)                              (!a)            // Test for succcess of a method returning BErr
-#define        BLUE_FAIL(a)                    (a)                     // Test for failure of a method returning BErr
-//----------------------------------------------------------------------------
-
-
-#if defined (_WIN32) || defined (__linux__)
-extern "C" {
-#endif 
-
-    BLUEVELVETC_API const char* bfcGetVersion();
-       BLUEVELVETC_API const wchar_t* bfcGetVersionW();
-       BLUEVELVETC_API BLUEVELVETC_HANDLE bfcFactory();
-       BLUEVELVETC_API void bfcDestroy(BLUEVELVETC_HANDLE pHandle);
-       BLUEVELVETC_API BErr bfcEnumerate(BLUEVELVETC_HANDLE pHandle, int& iDevices);
-
-// Get the card type of the Card indicated by iDeviceID, if iDeviceID is 0, then get the cardtype for that card that this pHandle is attached to.
-       BLUEVELVETC_API BErr bfcQueryCardType(BLUEVELVETC_HANDLE pHandle, int& iCardType, int iDeviceID = 0);
-       BLUEVELVETC_API BErr bfcAttach(BLUEVELVETC_HANDLE pHandle, int iDeviceId);
-       BLUEVELVETC_API BErr bfcDetach(BLUEVELVETC_HANDLE pHandle);
-  
-       BLUEVELVETC_API BErr bfcQueryCardProperty32(BLUEVELVETC_HANDLE pHandle, const int iProperty, unsigned int& nValue);
-    BLUEVELVETC_API BErr bfcSetCardProperty32(BLUEVELVETC_HANDLE pHandle, const int iProperty, const unsigned int nValue);
-       BLUEVELVETC_API BErr bfcQueryCardProperty64(BLUEVELVETC_HANDLE pHandle, const int iProperty, unsigned long long& ullValue);
-    BLUEVELVETC_API BErr bfcSetCardProperty64(BLUEVELVETC_HANDLE pHandle, const int iProperty, const unsigned long long ullValue);
-
-       BLUEVELVETC_API BErr bfcGetCardSerialNumber(BLUEVELVETC_HANDLE pHandle, char* pSerialNumber, unsigned int nStringSize); //nStringSize must be at least 20
-       BLUEVELVETC_API BErr bfcGetCardFwVersion(BLUEVELVETC_HANDLE pHandle, unsigned int& nValue);
-
-       //Interrupt related functions
-#if defined(_WIN32)
-       BLUEVELVETC_API BErr bfcWaitVideoSyncAsync(BLUEVELVETC_HANDLE pHandle, OVERLAPPED* pOverlap, blue_video_sync_struct* pSyncData);
-#endif
-       BLUEVELVETC_API BErr bfcWaitVideoInputSync(BLUEVELVETC_HANDLE pHandle, unsigned long ulUpdateType, unsigned long& ulFieldCount);
-       BLUEVELVETC_API BErr bfcWaitVideoOutputSync(BLUEVELVETC_HANDLE pHandle, unsigned long ulUpdateType, unsigned long& ulFieldCount);
-       BLUEVELVETC_API BErr bfcGetVideoOutputCurrentFieldCount(BLUEVELVETC_HANDLE pHandle, unsigned long& ulFieldCount);
-    BLUEVELVETC_API BErr bfcGetVideoInputCurrentFieldCount(BLUEVELVETC_HANDLE pHandle, unsigned long& ulFieldCount);
-
-       //FIFO functions
-       BLUEVELVETC_API BErr bfcVideoCaptureStart(BLUEVELVETC_HANDLE pHandle);
-       BLUEVELVETC_API BErr bfcVideoCaptureStop(BLUEVELVETC_HANDLE pHandle);
-       BLUEVELVETC_API BErr bfcVideoPlaybackStart(BLUEVELVETC_HANDLE pHandle, int iStep, int iLoop);
-       BLUEVELVETC_API BErr bfcVideoPlaybackStop(BLUEVELVETC_HANDLE pHandle, int iWait, int iFlush);
-       BLUEVELVETC_API BErr bfcVideoPlaybackAllocate(BLUEVELVETC_HANDLE pHandle, void** pAddress, unsigned long& ulBufferID, unsigned long& ulUnderrun);
-       BLUEVELVETC_API BErr bfcVideoPlaybackPresent(BLUEVELVETC_HANDLE pHandle, unsigned long& ulUniqueID, unsigned long ulBufferID, unsigned long ulCount, int iKeep, int iOdd=0);
-       BLUEVELVETC_API BErr bfcVideoPlaybackRelease(BLUEVELVETC_HANDLE pHandle, unsigned long ulBufferID);
-       
-#if defined (_WIN32)
-       BLUEVELVETC_API BErr bfcGetCaptureVideoFrameInfoEx(BLUEVELVETC_HANDLE pHandle, OVERLAPPED* pOverlap, struct blue_videoframe_info_ex& VideoFrameInfo, int iCompostLater, unsigned int* nCaptureFifoSize);
-#elif defined (__APPLE__)
-       BLUEVELVETC_API BErr bfcGetCaptureVideoFrameInfoEx(BLUEVELVETC_HANDLE pHandle, struct blue_videoframe_info_ex& VideoFrameInfo, int iCompostLater, unsigned int* nCaptureFifoSize);
-#elif defined(__linux__)
-       BLUEVELVETC_API BErr bfcGetCaptureVideoFrameInfoEx(BLUEVELVETC_HANDLE pHandle, struct blue_videoframe_info_ex& VideoFrameInfo);
-#endif
-
-       //FRAMESTORE functions
-       BLUEVELVETC_API BErr bfcRenderBufferCapture(BLUEVELVETC_HANDLE pHandle, unsigned long ulBufferID);
-       BLUEVELVETC_API BErr bfcRenderBufferUpdate(BLUEVELVETC_HANDLE pHandle, unsigned long ulBufferID);
-       BLUEVELVETC_API BErr bfcGetRenderBufferCount(BLUEVELVETC_HANDLE pHandle, unsigned long& ulCount);
-
-       //AUDIO Helper functions (BlueHancUtils)
-       BLUEVELVETC_API BErr bfcEncodeHancFrameEx(BLUEVELVETC_HANDLE pHandle, unsigned int nCardType, struct hanc_stream_info_struct* pHancEncodeInfo, void* pAudioBuffer, unsigned int nAudioChannels, unsigned int nAudioSamples, unsigned int nSampleType, unsigned int nAudioFlags);
-       BLUEVELVETC_API BErr bfcDecodeHancFrameEx(BLUEVELVETC_HANDLE pHandle, unsigned int nCardType, unsigned int* pHancBuffer, struct hanc_decode_struct* pHancDecodeInfo);
-
-       //DMA functions
-#if defined(_WIN32)
-    BLUEVELVETC_API BErr bfcSystemBufferReadAsync(BLUEVELVETC_HANDLE pHandle, unsigned char* pPixels, unsigned long ulSize, OVERLAPPED* pOverlap, unsigned long ulBufferID, unsigned long ulOffset=0);
-    BLUEVELVETC_API BErr bfcSystemBufferWriteAsync(BLUEVELVETC_HANDLE pHandle, unsigned char* pPixels, unsigned long ulSize, OVERLAPPED* pOverlap, unsigned long ulBufferID, unsigned long ulOffset=0);
-#elif defined(__APPLE__) || defined (__linux__)
-    BLUEVELVETC_API BErr bfcSystemBufferRead(BLUEVELVETC_HANDLE pHandle, unsigned char* pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset=0);
-    BLUEVELVETC_API BErr bfcSystemBufferWrite(BLUEVELVETC_HANDLE pHandle, unsigned char* pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset=0);
-#endif
-
-#if defined(__APPLE__)
-       BLUEVELVETC_API BErr bfcSystemBufferReadAsync(BLUEVELVETC_HANDLE pHandle, unsigned char* pPixels, unsigned long ulSize, dispatch_semaphore_t* sem, unsigned long ulBufferID, unsigned long ulOffset=0);
-    BLUEVELVETC_API BErr bfcSystemBufferWriteAsync(BLUEVELVETC_HANDLE pHandle, unsigned char* pPixels, unsigned long ulSize, dispatch_semaphore_t* sem, unsigned long ulBufferID, unsigned long ulOffset=0);
-#endif
-       
-       // RS422 Serial Port Functions
-       BLUEVELVETC_API BErr bfcSerialPortWaitForInputData(BLUEVELVETC_HANDLE pHandle, unsigned int nPortFlags, unsigned int& nBufferLength);
-       BLUEVELVETC_API BErr bfcSerialPortRead(BLUEVELVETC_HANDLE pHandle, unsigned int nPortFlags, unsigned char* pBuffer, unsigned int nReadLength);
-       BLUEVELVETC_API BErr bfcSerialPortWrite(BLUEVELVETC_HANDLE pHandle, unsigned int nPortFlags, unsigned char* pBuffer, unsigned int nWriteLength);
-
-#if defined (_WIN32)
-       //Miscellaneous functions
-       BLUEVELVETC_API BErr bfcGetReferenceClockPhaseSettings(BLUEVELVETC_HANDLE pHandle, unsigned int& nHPhase, unsigned int& nVPhase, unsigned int& nHPhaseMax, unsigned int& nVPhaseMax);
-       BLUEVELVETC_API BErr bfcLoadOutputLUT1D(BLUEVELVETC_HANDLE pHandle, struct blue_1d_lookup_table_struct* pLutData);
-       BLUEVELVETC_API BErr bfcControlVideoScaler(BLUEVELVETC_HANDLE pHandle,  unsigned int nScalerId,
-                                                                                                                                                       bool bOnlyReadValue,
-                                                                                                                                                       float* pSrcVideoHeight,
-                                                                                                                                                       float* pSrcVideoWidth,
-                                                                                                                                                       float* pSrcVideoYPos,
-                                                                                                                                                       float* pSrcVideoXPos,
-                                                                                                                                                       float* pDestVideoHeight,
-                                                                                                                                                       float* pDestVideoWidth,
-                                                                                                                                                       float* pDestVideoYPos,
-                                                                                                                                                       float* pDestVideoXPos);
-#endif
-
-    // Video mode and Format information functions
-       BLUEVELVETC_API BErr bfcGetBytesForGroupPixels(EMemoryFormat nMemoryFormat, unsigned int nVideoWidth, unsigned int& nVideoPitchBytes);
-       BLUEVELVETC_API BErr bfcGetPixelsPerLine(EVideoMode nVideoMode, unsigned int& nPixelsPerLine);
-    BLUEVELVETC_API BErr bfcGetLinesPerFrame(EVideoMode nVideoMode, EUpdateMethod nUpdateMethod, unsigned int& nLinesPerFrame);
-    BLUEVELVETC_API BErr bfcGetBytesPerLine(EVideoMode nVideoMode, EMemoryFormat nMemoryFormat, unsigned int& nBytesPerLine);
-    BLUEVELVETC_API BErr bfcGetBytesPerFrame(EVideoMode nVideoMode, EMemoryFormat nMemoryFormat, EUpdateMethod nUpdateMethod, unsigned int& nBytesPerFrame);
-    BLUEVELVETC_API BErr bfcGetGoldenValue(EVideoMode nVideoMode, EMemoryFormat nMemoryFormat, EUpdateMethod nUpdateMethod, unsigned int& nGoldenFrameSize);
-    BLUEVELVETC_API BErr bfcGetVBILines(EVideoMode nVideoMode, EUpdateMethod nUpdateMethod, unsigned int& nVBILinesPerFrame);
-    
-    BLUEVELVETC_API BErr bfcGetVANCGoldenValue(unsigned int nCardType, EVideoMode nVideoMode, EMemoryFormat nMemoryFormat, EDMADataType nDataFormat, unsigned int& nVANCGoldenValue);
-    BLUEVELVETC_API BErr bfcGetVANCLineBytes(unsigned int nCardType, EVideoMode nVideoMode, EMemoryFormat nMemoryFormat, unsigned int& nVANCLineBytes);
-    BLUEVELVETC_API BErr bfcGetVANCLineCount(unsigned int nCardType, EVideoMode nVideoMode, EDMADataType nDataFormat, unsigned int& nVANCLineCount);
-    
-
-#if defined (_WIN32)   
-       //AMD SDI-Link support
-       BLUEVELVETC_API BErr bfcDmaWaitMarker(BLUEVELVETC_HANDLE pHandle,       OVERLAPPED* pOverlap,
-                                                                                                                                       unsigned int nVideoChannel,
-                                                                                                                                       unsigned int nBufferId,
-                                                                                                                                       unsigned int nMarker);
-       BLUEVELVETC_API BErr bfcDmaReadToBusAddressWithMarker(  BLUEVELVETC_HANDLE pHandle,
-                                                                                                                       unsigned int nVideoChannel,
-                                                                                                                       unsigned long long n64DataAddress,
-                                                                                                                       unsigned int nSize,
-                                                                                                                       OVERLAPPED* pOverlap,
-                                                                                                                       unsigned int BufferID,
-                                                                                                                       unsigned long Offset,
-                                                                                                                       unsigned long long n64MarkerAddress,
-                                                                                                                       unsigned int nMarker);
-       BLUEVELVETC_API BErr bfcDmaReadToBusAddress(    BLUEVELVETC_HANDLE pHandle,
-                                                                                               unsigned int nVideoChannel,
-                                                                                               unsigned long long n64DataAddress,
-                                                                                               unsigned int nSize,
-                                                                                               OVERLAPPED* pOverlap,
-                                                                                               unsigned int BufferID,
-                                                                                               unsigned long Offset);
-       BLUEVELVETC_API BErr bfcDmaWriteMarker( BLUEVELVETC_HANDLE pHandle,
-                                                                                       unsigned long long n64MarkerAddress,
-                                                                                       unsigned int nMarker);
-
-       //misc
-       BLUEVELVETC_API BErr bfcGetWindowsDriverHandle(BLUEVELVETC_HANDLE pHandle, HANDLE* pDriverHandle);
-       BLUEVELVETC_API BErr bfcSetDynamicMemoryFormatChange(BLUEVELVETC_HANDLE pHandle, OVERLAPPED* pOverlap, unsigned int nUniqueId, EMemoryFormat nMemoryFormat);
-#endif
-
-
-#if defined (_WIN32) || defined (__linux__)
-} //extern "C"
-#endif
-
-#endif //HG_BLUEVELVET_C
diff --git a/modules/bluefish/interop/BlueVelvetCUtils.h b/modules/bluefish/interop/BlueVelvetCUtils.h
deleted file mode 100644 (file)
index 69c8b5b..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-//
-//  BlueVelvetCUtils.h
-//  BlueVelvetC
-//
-//  Created by James on 21/05/2014.
-//  Copyright (c) 2014 Bluefish444. All rights reserved.
-//
-// A file that contains useful Util functions that can ssist in general development.
-// indente to be included as-is into BlueVelvetC projects and not part of a library.
-
-#ifndef BlueVelvetC_BlueVelvetCUtils_h
-#define BlueVelvetC_BlueVelvetCUtils_h
-
-#include "BlueVelvetC.h"
-
-
-#if defined (_WIN32)
-extern "C" {
-#endif
-
-// Memory Allocation and Free'ing of page Aligned memory
-       BLUEVELVETC_API void*                   bfAlloc(unsigned int nMemorySize);
-       BLUEVELVETC_API void                    bfFree(unsigned int nMemSize, void* pMemory);
-
-// Get strings that give information about the card or card state
-       BLUEVELVETC_API const char*             bfcUtilsGetStringForCardType(const int iCardType);
-       BLUEVELVETC_API const wchar_t*  bfcUtilsGetWStringForCardType(const int iCardType);
-
-       BLUEVELVETC_API const char*             bfcUtilsGetStringForBlueProductId(const unsigned int nProductId);
-       BLUEVELVETC_API const wchar_t*  bfcUtilsGetWStringForBlueProductId(const unsigned int nProductId);
-
-       BLUEVELVETC_API const char*             bfcUtilsGetStringForVideoMode(const unsigned int nVideoMode);
-       BLUEVELVETC_API const wchar_t*  bfcUtilsGetWStringForVideoMode(const unsigned int nVideoMode);
-
-       BLUEVELVETC_API const char*             bfcUtilsGetStringForMemoryFormat(const unsigned int nMemoryFormat);
-       BLUEVELVETC_API const wchar_t*  bfcUtilsGetWStringForMemoryFormat(const unsigned int nMemoryFormat);                    
-
-// Get/Set MR2 Video mode info
-       BLUEVELVETC_API int                             bfcUtilsGetScalerVideoMode(const BLUEVELVETC_HANDLE pHandle, const unsigned int nScalerMR2Node, unsigned int& nVideoMode);
-       BLUEVELVETC_API int                             bfcUtilsSetScalerVideoMode(const BLUEVELVETC_HANDLE pHandle, const unsigned int nScalerMR2Node, unsigned int nVideoMode);
-
-// Change MR2 Routing                          using the EEpochRoutingElements enum values as src and dest
-       BLUEVELVETC_API int                             bfcUtilsGetMR2Routing(const BLUEVELVETC_HANDLE pHandle, unsigned int& nSrcNode, const unsigned int nDestNode, unsigned int& nLinkType);
-       BLUEVELVETC_API int                             bfcUtilsSetMR2Routing(const BLUEVELVETC_HANDLE pHandle, const unsigned int nSrcNode, const unsigned int nDestNode, const unsigned int nLinkType);
-
-// Get/Set Audio routing.
-       BLUEVELVETC_API int                             bfcUtilsGetAudioOutputRouting(const BLUEVELVETC_HANDLE pHandle, const unsigned int nAudioConnectorType, unsigned int& nAudioSourceChannelId, unsigned int nAudioConnectorId);
-       BLUEVELVETC_API int                             bfcUtilsSetAudioOutputRouting(const BLUEVELVETC_HANDLE pHandle, const unsigned int nAudioConnectorType, unsigned int nAudioSourceChannelId, unsigned int nAudioConnectorId);
-
-// General Video format helper funcs
-       BLUEVELVETC_API bool                    bfcUtilsIsVideoModeProgressive(const unsigned int nVideoMode);
-       BLUEVELVETC_API bool                    bfcUtilsIsVideoMode1001Framerate(const unsigned int nVideoMode);
-       BLUEVELVETC_API int                             bfcUtilsGetFpsForVideoMode(const unsigned int nVideoMode);                                      // returns closest interger FPS, use bfcUtilsIsVideoMode1001Framerate(), to determine if div 1001 is needed.
-
-// Get the Bluefish _EVideoMode for the given width, height and fps
-       BLUEVELVETC_API int                             bfcUtilsGetVideoModeForFrameInfo(const BLUE_UINT32 nWidth, const BLUE_UINT32 nHeight, const BLUE_UINT32 nRate, const BLUE_UINT32 bIs1001, const BLUE_UINT32 bIsProgressive, BLUE_UINT32& nVideoMode);
-       BLUEVELVETC_API int                             bfcUtilsGetFrameInfoForVideoMode(const BLUE_UINT32 nVideoMode, BLUE_UINT32&  nWidth, BLUE_UINT32& nHeight, BLUE_UINT32& nRate, BLUE_UINT32& bIs1001, BLUE_UINT32& bIsProgressive);
-       
-       
-// Get the number of Audio Packets for a given frame of video in a specific mode.
-       BLUEVELVETC_API int                             bfcUtilsGetAudioSamplesPerFrame(const BLUE_UINT32 nVideoMode, const BLUE_UINT32 nFrameNo);
-
-
-// HANC / VANC utils
-
-/**
- @brief enumerator used by VANC manipulation function on HD cards to notify whether
- VANC pakcet shoule be inserted/extracted from VANC Y buffers or VANC CbCr buffer.
- This enumerator will only be used on  HD video modes as it is the only with
- 2 type of ANC bufers ir Y and CbCr. On SD Modes the ANC data is inserted across
- both Y anc CbCr values.
- */
-       enum BlueVancPktTypeEnum
-       {
-               BlueVancPktYComp=0,             /**< ANC pkt should be inserted/extracted from the Y component buffer*/
-               BlueVancPktCbcrComp=1,  /**< ANC pkt should be inserted/extracted from the CbCr component buffer*/
-               BlueVancPktAllComp=2    /**< ANC pkt should be inserted/extracted from all components (SD video modes)*/
-       };
-
-/*!
- @brief Use this function to initialise VANC buffer before inserting any packets into the buffer
- @param CardType type of bluefish  card to which this vanc buffer was transferred to.
- @param nVideoMode video mode under which this vanc buffer will be used.
- @param pixels_per_line width in pixels of the vanc buffer that has to be initialised.
- @param lines_per_frame height of the vanc buffer that has to be initialised.
- @param pVancBuffer vanc buffer which has to be initialised.
- @remarks.
- */
-       BLUEVELVETC_API BLUE_UINT32 bfcUtilsInitVancBuffer(BLUE_UINT32 nCardType,
-                                                                                                       BLUE_UINT32 nVideoMode, 
-                                                                                                       BLUE_UINT32 nPixelsPerLine, 
-                                                                                                       BLUE_UINT32 nLinesPerFrame, 
-                                                                                                       BLUE_UINT32* pVancBuffer);
-
-/*!
- @brief this function can be used to extract ANC packet from HD cards. Currently we can only extract packets in the VANC space.
- @param CardType type of the card from which the vanc buffer was captured.
- @param vanc_pkt_type This parameter denotes whether to search for the VANC packet in Y Space or Cb/Cr Space.
- The values this parameter accepts are defined in the enumerator #BlueVancPktTypeEnum
- @param src_vanc_buffer Vanc buffer which was captured from bluefish card
- @param src_vanc_buffer_size size of the vanc buffer which should be parsed for the specified vanc packet
- @param pixels_per_line specifies how many pixels are there in each line of VANC buffer
- @param vanc_pkt_did specifies the DID of the Vanc packet which should be extracted from the buffer
- @param vanc_pkt_sdid Returns the SDID of the extracted VANC packet
- @param vanc_pkt_data_length returns the size of the extracted VANC packet. The size is specifed as number of UDW words
- that was  contained in the packet
- @param vanc_pkt_data_ptr pointer to UDW of the VANC packets . The 10 bit UDW words are packed in a 16 bit integer. The bottom 10 bit of the
- 16 bit word contains the UDW data.
- @param vanc_pkt_line_no line number  where the packet was found .
- @remarks.
- */
-       BLUEVELVETC_API BLUE_INT32 bfcUtilsVancPktExtract(BLUE_UINT32 nCardType,
-                                                                                                       BLUE_UINT32 nVancPktType,
-                                                                                                       BLUE_UINT32* pSrcVancBuffer,
-                                                                                                       BLUE_UINT32 nSrcVancBufferSize,
-                                                                                                       BLUE_UINT32 nPixelsPerLine,
-                                                                                                       BLUE_UINT32     nVancPktDid,
-                                                                                                       BLUE_UINT16* pVancPktSdid,
-                                                                                                       BLUE_UINT16* pVancPktDataLength,
-                                                                                                       BLUE_UINT16* pVancPktData,
-                                                                                                       BLUE_UINT16* pVancPktLineNo);
-
-/**
- @brief use this function to insert ANC packets into the VANC space of the HD cards.
- @param CardType type of the card from which the vanc buffer was captured.
- @param vanc_pkt_type This parameter denotes whether to search for the VANC packet in Y Space or Cb/Cr Space.
- The values this parameter accepts are defined in the enumerator #blue_vanc_pkt_type_enum
- @param vanc_pkt_line_no line in th VANC buffer where the ANC packet should inserted.
- @param vanc_pkt_buffer vanc ANC packet which should be inserted into the VANC buffer.
- @param vanc_pkt_buffer_size size of the ANC packet including the checksum ,ADF , SDID, DID and Data Count
- @param dest_vanc_buffer VANC buffer into which the ANC packet will be inserted into.
- @param pixels_per_line specifies how many pixels are there in each line of VANC buffer
- */
-       BLUEVELVETC_API BLUE_INT32 bfcUtilsVancPktInsert(BLUE_UINT32 nCardType,
-                                                                                                       BLUE_UINT32 nVancPktType,
-                                                                                                       BLUE_UINT32 nVancPktLineNumber,
-                                                                                                       BLUE_UINT32* pVancPktBuffer,
-                                                                                                       BLUE_UINT32 nVancPktBufferSize,
-                                                                                                       BLUE_UINT32* pDestVancBuffer,
-                                                                                                       BLUE_UINT32 nPixelsPerLine);
-
-/** @} */
-
-/**
- @defgroup vanc_decode_encoder_helper ANC encoder/decoder
- @{
- */
-       BLUEVELVETC_API BLUE_UINT32 bfcUtilsDecodeEia708bPkt(BLUE_UINT32 nCardType, BLUE_UINT16* pVancPktData, BLUE_UINT16 usPktUdwCount, BLUE_UINT16 usEiaPktSubtype, BLUE_UINT8* pDecodedChStr);
-       
-#if defined (_WIN32)
-} //extern "C"
-#endif
-
-#endif // BlueVelvetC_BlueVelvetCUtils_h
\ No newline at end of file
index a8384f349a2af4d2db79d3e87bcd695604faf353..dcc52f07da13c719f5dda454a8a5150078dd68f8 100644 (file)
 #include "blue_velvet.h"
 #include <common/utf.h>        
 #include <core/video_format.h>
-#include <bluefish/interop/BlueVelvetCUtils.h>
+#include <BlueVelvetCUtils.h>
 
 #if defined(__APPLE__)
-       #include <dlfcn.h>
+#include <dlfcn.h>
 #endif
 
 #if defined(_WIN32)
-       #define GET_PROCADDR_FOR_FUNC(name, module) { name = (pFunc_##name)GetProcAddress(module, #name); if(!name) { return false; } }
+       #define GET_PROCADDR_FOR_FUNC(name, module) { name = (pFunc_##name)GetProcAddress(reinterpret_cast<HMODULE>(module), #name); if(!name) { return false; } }
+//     #define GET_PROCADDR_FOR_FUNC(name, module) { name = (pFunc_##name)GetProcAddress(module, #name); if(!name) { return false; } }
 #elif defined(__APPLE__)
        #define GET_PROCADDR_FOR_FUNC(name, module) { name = (pFunc_##name)dlsym(module, #name); if(!name) { return false; } }
 #endif
 
 namespace caspar { namespace bluefish {
 
-       BvcWrapper::BvcWrapper()
+       bvc_wrapper::bvc_wrapper()
        {
-               bvc = nullptr;
-               hModule = nullptr;
-               InitFunctionsPointers();
-               if (bfcFactory)
-                       bvc = bfcFactory();
+               bvc_ = nullptr;
+               h_module_ = nullptr;
+               init_function_pointers();
+               bvc_ = std::shared_ptr<void>(bfcFactory(), bfcDestroy);
+               
+               if (!bvc_)
+                       CASPAR_THROW_EXCEPTION(not_supported() << msg_info("Bluefish drivers not found."));
        }
 
-       BvcWrapper::~BvcWrapper()
+       bool bvc_wrapper::init_function_pointers()
        {
-               if (bvc)
-                       bfcDestroy(bvc);
-               if (hModule)
-               {
+               bool res = false;
+               bfcGetVersion = nullptr;
+               bfcFactory = nullptr;
+               bfcDestroy = nullptr;
+               bfcEnumerate = nullptr;
+               bfcQueryCardType = nullptr;
+               bfcAttach = nullptr;
+               bfcDetach = nullptr;
+               bfcQueryCardProperty32 = nullptr;
+               bfcQueryCardProperty64 = nullptr;
+               bfcSetCardProperty32 = nullptr;
+               bfcSetCardProperty64 = nullptr;
+               bfcGetCardSerialNumber = nullptr;
+               bfcGetCardFwVersion = nullptr;
+               bfcWaitVideoSyncAsync = nullptr;
+               bfcWaitVideoInputSync = nullptr;
+               bfcWaitVideoOutputSync = nullptr;
+               bfcGetVideoOutputCurrentFieldCount = nullptr;
+               bfcGetVideoInputCurrentFieldCount = nullptr;
+               bfcVideoCaptureStart = nullptr;
+               bfcVideoCaptureStop = nullptr;
+               bfcVideoPlaybackStart = nullptr;
+               bfcVideoPlaybackStop = nullptr;
+               bfcVideoPlaybackAllocate = nullptr;
+               bfcVideoPlaybackPresent = nullptr;
+               bfcVideoPlaybackRelease = nullptr;
+               bfcGetCaptureVideoFrameInfoEx = nullptr;
+               bfcRenderBufferCapture = nullptr;
+               bfcRenderBufferUpdate = nullptr;
+               bfcGetRenderBufferCount = nullptr;
+               bfcEncodeHancFrameEx = nullptr;
+               bfcDecodeHancFrameEx = nullptr;
 #if defined(_WIN32)
-                       FreeLibrary(hModule);
-#elif defined(__APPLE__)
-                       dlclose(hModule);
+               bfcSystemBufferReadAsync = nullptr;
+               bfcSystemBufferWriteAsync = nullptr;
+#else
+               bfcSystemBufferRead = nullptr;
+               bfcSystemBufferWrite = nullptr;
 #endif
-               }
-       }
-
-       bool BvcWrapper::InitFunctionsPointers()
-       {
-               bool bRes = false;
+               bfcGetBytesForGroupPixels = nullptr;
+               bfcGetPixelsPerLine = nullptr;
+               bfcGetLinesPerFrame = nullptr;
+               bfcGetBytesPerLine = nullptr;
+               bfcGetBytesPerFrame = nullptr;
+               bfcGetGoldenValue = nullptr;
+               bfcGetVBILines = nullptr;
+               bfcGetVANCGoldenValue = nullptr;
+               bfcGetVANCLineBytes = nullptr;
+               bfcGetVANCLineCount = nullptr;
+               bfcGetWindowsDriverHandle = nullptr;
+               bfcUtilsGetStringForCardType = nullptr;
+               bfcUtilsGetStringForBlueProductId = nullptr;
+               bfcUtilsGetStringForVideoMode = nullptr;
+               bfcUtilsGetStringForMemoryFormat = nullptr;
+               bfcUtilsGetMR2Routing = nullptr;
+               bfcUtilsSetMR2Routing = nullptr;
+               bfcUtilsGetAudioOutputRouting = nullptr;
+               bfcUtilsSetAudioOutputRouting = nullptr;
+               bfcUtilsIsVideoModeProgressive = nullptr;
+               bfcUtilsIsVideoMode1001Framerate = nullptr;
+               bfcUtilsGetFpsForVideoMode = nullptr;
+               bfcUtilsGetVideoModeForFrameInfo = nullptr;
+               bfcUtilsGetFrameInfoForVideoMode = nullptr;
+               bfcUtilsGetAudioSamplesPerFrame = nullptr;
 
 #if defined(_WIN32)
 #ifdef _DEBUG
-               hModule = LoadLibraryExA("BlueVelvetC64_d.dll", NULL, 0);
+               h_module_ = std::shared_ptr<void>(LoadLibraryExA("BlueVelvetC64_d.dll", NULL, 0), FreeLibrary);
 #else
-               hModule = LoadLibraryExA("BlueVelvetC64.dll", NULL, 0);
+               h_module_ = std::shared_ptr<void>(LoadLibraryExA("BlueVelvetC64.dll", NULL, 0), FreeLibrary);
 #endif
                
 #elif defined(__APPLE__)
                // Look for the framework and load it accordingly.
                char* libraryPath("/Library/Frameworks/BlueVelvetC.framework");         // full path may not be required, OSX might check in /l/f by default - MUST TEST!
-               hModule = dlopen(libraryPath, RTLD_NOW);
+               h_module_ = std::shared_ptr<void>(dlopen(libraryPath, RTLD_NOW), dlclose);
 #endif
                
-               if (hModule)
+               if (h_module_)
                {
-                       GET_PROCADDR_FOR_FUNC(bfcGetVersion, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcFactory, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcDestroy, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcEnumerate, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcQueryCardType, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcAttach, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcDetach, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcQueryCardProperty32, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcQueryCardProperty64, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcSetCardProperty32, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcSetCardProperty64, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetCardSerialNumber, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetCardFwVersion, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcWaitVideoSyncAsync, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcWaitVideoInputSync, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcWaitVideoOutputSync, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetVideoOutputCurrentFieldCount, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetVideoInputCurrentFieldCount, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcVideoCaptureStart, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcVideoCaptureStop, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackStart, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackStop, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackAllocate, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackPresent, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackRelease, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetCaptureVideoFrameInfoEx, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcRenderBufferCapture, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcRenderBufferUpdate, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetRenderBufferCount, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcEncodeHancFrameEx, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcDecodeHancFrameEx, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcSystemBufferReadAsync, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcSystemBufferWriteAsync, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetBytesForGroupPixels, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetPixelsPerLine, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetLinesPerFrame, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetBytesPerLine, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetBytesPerFrame, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetGoldenValue, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetVBILines, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetVANCGoldenValue, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetVANCLineBytes, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetVANCLineCount, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcGetWindowsDriverHandle, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetStringForCardType, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetStringForBlueProductId, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetStringForVideoMode, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetStringForMemoryFormat, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetMR2Routing, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsSetMR2Routing, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetAudioOutputRouting, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsSetAudioOutputRouting, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsIsVideoModeProgressive, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsIsVideoMode1001Framerate, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetFpsForVideoMode, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetVideoModeForFrameInfo, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetFrameInfoForVideoMode, hModule);
-                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetAudioSamplesPerFrame, hModule);
-
-                       bRes = true;
+                       GET_PROCADDR_FOR_FUNC(bfcGetVersion, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcFactory, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcDestroy, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcEnumerate, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcQueryCardType, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcAttach, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcDetach, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcQueryCardProperty32, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcQueryCardProperty64, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcSetCardProperty32, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcSetCardProperty64, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetCardSerialNumber, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetCardFwVersion, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcWaitVideoSyncAsync, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcWaitVideoInputSync, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcWaitVideoOutputSync, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetVideoOutputCurrentFieldCount, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetVideoInputCurrentFieldCount, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcVideoCaptureStart, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcVideoCaptureStop, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackStart, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackStop, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackAllocate, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackPresent, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcVideoPlaybackRelease, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetCaptureVideoFrameInfoEx, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcRenderBufferCapture, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcRenderBufferUpdate, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetRenderBufferCount, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcEncodeHancFrameEx, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcDecodeHancFrameEx, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcSystemBufferReadAsync, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcSystemBufferWriteAsync, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetBytesForGroupPixels, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetPixelsPerLine, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetLinesPerFrame, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetBytesPerLine, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetBytesPerFrame, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetGoldenValue, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetVBILines, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetVANCGoldenValue, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetVANCLineBytes, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetVANCLineCount, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcGetWindowsDriverHandle, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetStringForCardType, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetStringForBlueProductId, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetStringForVideoMode, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetStringForMemoryFormat, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetMR2Routing, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsSetMR2Routing, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetAudioOutputRouting, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsSetAudioOutputRouting, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsIsVideoModeProgressive, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsIsVideoMode1001Framerate, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetFpsForVideoMode, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetVideoModeForFrameInfo, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetFrameInfoForVideoMode, h_module_.get());
+                       GET_PROCADDR_FOR_FUNC(bfcUtilsGetAudioSamplesPerFrame, h_module_.get());
+                       res = true;
                }
-
-               return bRes;
-       }
-
-       bool BvcWrapper::IsBvcValid()
-       {
-               if (bvc)
-                       return true;
-               else
-                       return false;
+               return res;
        }
 
-       const char * BvcWrapper::GetVersion()
+       const char * bvc_wrapper::get_version()
        {
                return bfcGetVersion();
        }
 
-       BLUE_UINT32 BvcWrapper::Attach(int iDeviceId)
+       BLUE_UINT32 bvc_wrapper::attach(int iDeviceId)
        {
-               return bfcAttach(bvc, iDeviceId);
+               return bfcAttach((BLUEVELVETC_HANDLE)bvc_.get(), iDeviceId);
        }
 
-       BLUE_UINT32 BvcWrapper::Detach()
+       BLUE_UINT32 bvc_wrapper::detach()
        {
-               return bfcDetach(bvc);
+               return bfcDetach((BLUEVELVETC_HANDLE)bvc_.get());
        }
 
-       BLUE_UINT32 BvcWrapper::QueryCardProperty32(const int iProperty, unsigned int & nValue)
+       BLUE_UINT32 bvc_wrapper::get_card_property32(const int iProperty, unsigned int & nValue)
        {
-               if (bvc)
-                       return (BLUE_UINT32)bfcQueryCardProperty32(bvc, iProperty, nValue);
+               if (bvc_)
+                       return (BLUE_UINT32)bfcQueryCardProperty32((BLUEVELVETC_HANDLE)bvc_.get(), iProperty, nValue);
                else
                        return 0;
        }
 
-       BLUE_UINT32 BvcWrapper::SetCardProperty32(const int iProperty, const unsigned int nValue)
+       BLUE_UINT32 bvc_wrapper::set_card_property32(const int iProperty, const unsigned int nValue)
        {
-               return bfcSetCardProperty32(bvc, iProperty, nValue);
+               return bfcSetCardProperty32((BLUEVELVETC_HANDLE)bvc_.get(), iProperty, nValue);
        }
 
-       BLUE_UINT32 BvcWrapper::Enumerate(int & iDevices)
+       BLUE_UINT32 bvc_wrapper::enumerate(int & iDevices)
        {
-               return bfcEnumerate(bvc, iDevices);
+               return bfcEnumerate((BLUEVELVETC_HANDLE)bvc_.get(), iDevices);
        }
 
-       BLUE_UINT32 BvcWrapper::QueryCardType(int & iCardType, int iDeviceID)
+       BLUE_UINT32 bvc_wrapper::query_card_type(int & iCardType, int iDeviceID)
        {
-               return bfcQueryCardType(bvc, iCardType, iDeviceID);
+               return bfcQueryCardType((BLUEVELVETC_HANDLE)bvc_.get(), iCardType, iDeviceID);
        }
 
-       BLUE_UINT32 BvcWrapper::SystemBufferWrite(unsigned char * pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset)
+       BLUE_UINT32 bvc_wrapper::system_buffer_write(unsigned char * pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset)
        {
-               return bfcSystemBufferWriteAsync(bvc, pPixels, ulSize, nullptr, ulBufferID, ulOffset);
+               return bfcSystemBufferWriteAsync((BLUEVELVETC_HANDLE)bvc_.get(), pPixels, ulSize, nullptr, ulBufferID, ulOffset);
        }
 
-       BLUE_UINT32 BvcWrapper::SystemBufferRead(unsigned char* pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset)
+       BLUE_UINT32 bvc_wrapper::system_buffer_read(unsigned char* pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset)
        {
-               return bfcSystemBufferReadAsync(bvc, pPixels, ulSize, nullptr, ulBufferID, ulOffset);
+               return bfcSystemBufferReadAsync((BLUEVELVETC_HANDLE)bvc_.get(), pPixels, ulSize, nullptr, ulBufferID, ulOffset);
        }
 
-       BLUE_UINT32 BvcWrapper::VideoPlaybackStop(int iWait, int iFlush)
+       BLUE_UINT32 bvc_wrapper::video_playback_stop(int iWait, int iFlush)
        {
-               return bfcVideoPlaybackStop(bvc, iWait, iFlush);
+               return bfcVideoPlaybackStop((BLUEVELVETC_HANDLE)bvc_.get(), iWait, iFlush);
        }
 
-       BLUE_UINT32 BvcWrapper::WaitVideoOutputSync(unsigned long ulUpdateType, unsigned long & ulFieldCount)
+       BLUE_UINT32 bvc_wrapper::wait_video_output_sync(unsigned long ulUpdateType, unsigned long & ulFieldCount)
        {
-               return bfcWaitVideoOutputSync(bvc, ulUpdateType, ulFieldCount);
+               return bfcWaitVideoOutputSync((BLUEVELVETC_HANDLE)bvc_.get(), ulUpdateType, ulFieldCount);
        }
 
-       BLUE_UINT32 BvcWrapper::WaitVideoInputSync(unsigned long ulUpdateType, unsigned long & ulFieldCount)
+       BLUE_UINT32 bvc_wrapper::wait_video_input_sync(unsigned long ulUpdateType, unsigned long & ulFieldCount)
        {
-               return bfcWaitVideoInputSync(bvc, ulUpdateType, ulFieldCount);
+               return bfcWaitVideoInputSync((BLUEVELVETC_HANDLE)bvc_.get(), ulUpdateType, ulFieldCount);
        }
 
-       BLUE_UINT32 BvcWrapper::RenderBufferUpdate( unsigned long ulBufferID)
+       BLUE_UINT32 bvc_wrapper::render_buffer_update( unsigned long ulBufferID)
        {
-               return bfcRenderBufferUpdate(bvc, ulBufferID);
+               return bfcRenderBufferUpdate((BLUEVELVETC_HANDLE)bvc_.get(), ulBufferID);
        }
 
-       BLUE_UINT32 BvcWrapper::RenderBufferCapture(unsigned long ulBufferID)
+       BLUE_UINT32 bvc_wrapper::render_buffer_capture(unsigned long ulBufferID)
        {
-               return bfcRenderBufferCapture(bvc, ulBufferID);
+               return bfcRenderBufferCapture((BLUEVELVETC_HANDLE)bvc_.get(), ulBufferID);
        }
 
-       BLUE_UINT32 BvcWrapper::EncodeHancFrameEx(unsigned int nCardType, hanc_stream_info_struct * pHancEncodeInfo, void * pAudioBuffer, unsigned int nAudioChannels, unsigned int nAudioSamples, unsigned int nSampleType, unsigned int nAudioFlags)
+       BLUE_UINT32 bvc_wrapper::encode_hanc_frame(unsigned int nCardType, hanc_stream_info_struct * pHancEncodeInfo, void * pAudioBuffer, unsigned int nAudioChannels, unsigned int nAudioSamples, unsigned int nSampleType, unsigned int nAudioFlags)
        {
-               return bfcEncodeHancFrameEx(bvc, CRD_BLUE_NEUTRON, pHancEncodeInfo, pAudioBuffer, nAudioChannels, nAudioSamples, nSampleType, nAudioFlags);
+               return bfcEncodeHancFrameEx((BLUEVELVETC_HANDLE)bvc_.get(), CRD_BLUE_NEUTRON, pHancEncodeInfo, pAudioBuffer, nAudioChannels, nAudioSamples, nSampleType, nAudioFlags);
        }
 
-       BLUE_UINT32 BvcWrapper::DecodeHancFrameEx(unsigned int nCardType, unsigned int * pHancBuffer, hanc_decode_struct * pHancDecodeInfo)
+       BLUE_UINT32 bvc_wrapper::decode_hanc_frame(unsigned int nCardType, unsigned int * pHancBuffer, hanc_decode_struct * pHancDecodeInfo)
        {
-               return bfcDecodeHancFrameEx(bvc, CRD_BLUE_NEUTRON, pHancBuffer, pHancDecodeInfo);
+               return bfcDecodeHancFrameEx((BLUEVELVETC_HANDLE)bvc_.get(), CRD_BLUE_NEUTRON, pHancBuffer, pHancDecodeInfo);
        }
 
-       BLUE_UINT32 BvcWrapper::GetFrameInfoForVideoVode(const unsigned int nVideoMode, unsigned int&  nWidth, unsigned int& nHeight, unsigned int& nRate, unsigned int& bIs1001, unsigned int& bIsProgressive)
+       BLUE_UINT32 bvc_wrapper::get_frame_info_for_video_mode(const unsigned int nVideoMode, unsigned int&  nWidth, unsigned int& nHeight, unsigned int& nRate, unsigned int& bIs1001, unsigned int& bIsProgressive)
        {
                return bfcUtilsGetFrameInfoForVideoMode(nVideoMode, nWidth, nHeight, nRate, bIs1001, bIsProgressive);
        }
 
-       BLUE_UINT32 BvcWrapper::GetBytesPerFrame(EVideoMode nVideoMode, EMemoryFormat nMemoryFormat, EUpdateMethod nUpdateMethod, unsigned int& nBytesPerFrame)
+       BLUE_UINT32 bvc_wrapper::get_bytes_per_frame(EVideoMode nVideoMode, EMemoryFormat nMemoryFormat, EUpdateMethod nUpdateMethod, unsigned int& nBytesPerFrame)
        {
                return bfcGetBytesPerFrame(nVideoMode, nMemoryFormat, nUpdateMethod, nBytesPerFrame);
        }
@@ -276,13 +318,13 @@ EVideoMode vid_fmt_from_video_format(const core::video_format& fmt)
        }
 }
 
-bool is_epoch_card(BvcWrapper& blue)
+bool is_epoch_card(bvc_wrapper& blue)
 {
-       int iDeviceID = 1;
-       int iCardType = 0;
-       blue.QueryCardType(iCardType, iDeviceID);
+       int device_id = 1;
+       int card_type = 0;
+       blue.query_card_type(card_type, device_id);
 
-       switch(iCardType)
+       switch(card_type)
        {
                case CRD_BLUE_EPOCH_HORIZON:
                case CRD_BLUE_EPOCH_CORE:
@@ -303,21 +345,20 @@ bool is_epoch_card(BvcWrapper& blue)
        }
 }
 
-bool is_epoch_neutron_1i2o_card(BvcWrapper& blue)
+bool is_epoch_neutron_1i2o_card(bvc_wrapper& blue)
 {
        BLUE_UINT32 val = 0;
-       blue.QueryCardProperty32(EPOCH_GET_PRODUCT_ID, val);
-
+       blue.get_card_property32(EPOCH_GET_PRODUCT_ID, val);
        if (val == ORAC_NEUTRON_1_IN_2_OUT_FIRMWARE_PRODUCTID)
                return true;
        else
                return false;
 }
 
-bool is_epoch_neutron_3o_card(BvcWrapper& blue)
+bool is_epoch_neutron_3o_card(bvc_wrapper& blue)
 {
        BLUE_UINT32 val = 0;
-       blue.QueryCardProperty32(EPOCH_GET_PRODUCT_ID, val);
+       blue.get_card_property32(EPOCH_GET_PRODUCT_ID, val);
 
        if (val == ORAC_NEUTRON_0_IN_3_OUT_FIRMWARE_PRODUCTID)
                return true;
@@ -325,13 +366,12 @@ bool is_epoch_neutron_3o_card(BvcWrapper& blue)
                return false;
 }
 
-
-std::wstring get_card_desc(BvcWrapper& blue, int iDeviceID)
+std::wstring get_card_desc(bvc_wrapper& blue, int device_id)
 {
-       int iCardType = 0;
-       blue.QueryCardType(iCardType, iDeviceID);
+       int card_type = 0;
+       blue.query_card_type(card_type, device_id);
 
-       switch(iCardType) 
+       switch(card_type)
        {
                case CRD_BLUEDEEP_LT:                           return L"Deepblue LT";// D64 Lite
                case CRD_BLUEDEEP_SD:                           return L"Iridium SD";// Iridium SD
@@ -374,38 +414,35 @@ std::wstring get_card_desc(BvcWrapper& blue, int iDeviceID)
        }
 }
 
-EVideoMode get_video_mode(BvcWrapper& blue, const core::video_format_desc& format_desc)
+EVideoMode get_video_mode(bvc_wrapper& blue, const core::video_format_desc& format_desc)
 {
        EVideoMode vid_fmt = VID_FMT_INVALID;
-       BLUE_UINT32 inValidFmt = 0;
+       BLUE_UINT32 invalid_fmt = 0;
        BErr err = 0;
-       err = blue.QueryCardProperty32(INVALID_VIDEO_MODE_FLAG, inValidFmt);
+       err = blue.get_card_property32(INVALID_VIDEO_MODE_FLAG, invalid_fmt);
        vid_fmt = vid_fmt_from_video_format(format_desc.format);
 
        if (vid_fmt == VID_FMT_INVALID)
                CASPAR_THROW_EXCEPTION(not_supported() << msg_info(L"video-mode not supported: " + format_desc.name));
 
 
-       if ((unsigned int)vid_fmt >= inValidFmt)
+       if ((unsigned int)vid_fmt >= invalid_fmt)
                CASPAR_THROW_EXCEPTION(not_supported() << msg_info(L"video-mode not supported - Outside of valid range: " + format_desc.name));
 
        return vid_fmt;
 }
 
-spl::shared_ptr<BvcWrapper> create_blue()
+spl::shared_ptr<bvc_wrapper> create_blue()
 {
-       auto pWrap = new BvcWrapper();
-       if (!pWrap->IsBvcValid())
-               CASPAR_THROW_EXCEPTION(not_supported() << msg_info("Bluefish drivers not found."));
-
-       return spl::shared_ptr<BvcWrapper>(pWrap);
+       auto pWrap = new bvc_wrapper();
+       return spl::shared_ptr<bvc_wrapper>(pWrap);
 }
 
-spl::shared_ptr<BvcWrapper> create_blue(int device_index)
+spl::shared_ptr<bvc_wrapper> create_blue(int device_index)
 {
        auto blue = create_blue();
        
-       if(BLUE_FAIL(blue->Attach(device_index)))
+       if(BLUE_FAIL(blue->attach(device_index)))
                CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info("Failed to attach device."));
 
        return blue;
@@ -440,15 +477,15 @@ core::video_format video_format_from_vid_fmt(EVideoMode fmt)
        }
 }
 
-core::video_format_desc get_format_desc(BvcWrapper& blue, EVideoMode vid_fmt, EMemoryFormat mem_fmt)
+core::video_format_desc get_format_desc(bvc_wrapper& blue, EVideoMode vid_fmt, EMemoryFormat mem_fmt)
 {
        core::video_format_desc fmt;
        unsigned int width, height, duration = 0, time_scale = 0, rate = 0, bIs1001 = 0, bIsProgressive = 0, size = 0;
        std::vector<int>        audio_cadence;
        core::field_mode video_field_mode = core::field_mode::progressive;
 
-       blue.GetFrameInfoForVideoVode(vid_fmt, width, height, rate, bIs1001, bIsProgressive);
-       blue.GetBytesPerFrame(vid_fmt, mem_fmt, UPD_FMT_FRAME, size);
+       blue.get_frame_info_for_video_mode(vid_fmt, width, height, rate, bIs1001, bIsProgressive);
+       blue.get_bytes_per_frame(vid_fmt, mem_fmt, UPD_FMT_FRAME, size);
 
        switch (vid_fmt)
        {
index 0f1fec754ac50280c0dfa629ae704d4bfe3d7c5e..a44683653e93cc26ed085ad4211d9d6d2e166377 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <Windows.h>
 
-#include <bluefish/interop/BlueVelvetC.h>
+#include <BlueVelvetC.h>
 
 #include <common/memory.h>
 #include <common/except.h>
 
 namespace caspar { namespace bluefish {
 
-
-template<typename T>
-int set_card_property(T& pSdk, ULONG prop, ULONG value)
-{
-       return (pSdk->SetCardProperty32(prop, value));
-}
-
-template<typename T>
-int get_card_property(T& pSdk, ULONG prop, ULONG& value)
-{
-       unsigned int val = 0;
-       int retVal = pSdk->QueryCardProperty32(prop, val);
-       value = val;
-       return retVal;
-}
-
-class BvcWrapper
+class bvc_wrapper
 {
        // Define a different type for each of the function ptrs.
        typedef const char* (__cdecl *pFunc_bfcGetVersion)();
@@ -121,45 +105,44 @@ class BvcWrapper
 
 public:
 
-       BvcWrapper();                                           // bfcFactory
-       ~BvcWrapper();                                          // bfcDestory
+       bvc_wrapper();                                          // bfcFactory + function pointer lookups
 
-       bool            IsBvcValid();
-       const char*     GetVersion();
+       const char*     get_version();
 
-       BLUE_UINT32 Enumerate(int& iDevices);
-       BLUE_UINT32 QueryCardType(int& iCardType, int iDeviceID);
+       BLUE_UINT32 enumerate(int& iDevices);
+       BLUE_UINT32 query_card_type(int& iCardType, int iDeviceID);
 
-       BLUE_UINT32 Attach(int iDeviceId);
-       BLUE_UINT32 Detach();
+       BLUE_UINT32 attach(int iDeviceId);
+       BLUE_UINT32 detach();
 
-       BLUE_UINT32 QueryCardProperty32(const int iProperty, unsigned int& nValue);
-       BLUE_UINT32 SetCardProperty32(const int iProperty, const unsigned int nValue);
+       BLUE_UINT32 get_card_property32(const int iProperty, unsigned int& nValue);
+       BLUE_UINT32 set_card_property32(const int iProperty, const unsigned int nValue);
        
-       BLUE_UINT32 SystemBufferWrite(unsigned char* pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset);
-       BLUE_UINT32 SystemBufferRead(unsigned char* pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset);
+       BLUE_UINT32 system_buffer_write(unsigned char* pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset);
+       BLUE_UINT32 system_buffer_read(unsigned char* pPixels, unsigned long ulSize, unsigned long ulBufferID, unsigned long ulOffset);
 
-       BLUE_UINT32 VideoPlaybackStop(int iWait, int iFlush);
-       BLUE_UINT32 WaitVideoOutputSync(unsigned long ulUpdateType, unsigned long& ulFieldCount);
-       BLUE_UINT32 WaitVideoInputSync(unsigned long ulUpdateType, unsigned long & ulFieldCount);
+       BLUE_UINT32 video_playback_stop(int iWait, int iFlush);
+       BLUE_UINT32 wait_video_output_sync(unsigned long ulUpdateType, unsigned long& ulFieldCount);
+       BLUE_UINT32 wait_video_input_sync(unsigned long ulUpdateType, unsigned long & ulFieldCount);
 
-       BLUE_UINT32 RenderBufferUpdate(unsigned long ulBufferID);
-       BLUE_UINT32 RenderBufferCapture(unsigned long ulBufferID);
+       BLUE_UINT32 render_buffer_update(unsigned long ulBufferID);
+       BLUE_UINT32 render_buffer_capture(unsigned long ulBufferID);
 
-       BLUE_UINT32 EncodeHancFrameEx(unsigned int nCardType, struct hanc_stream_info_struct* pHancEncodeInfo, void* pAudioBuffer, unsigned int nAudioChannels, unsigned int nAudioSamples, unsigned int nSampleType, unsigned int nAudioFlags);
-       BLUE_UINT32 DecodeHancFrameEx(unsigned int nCardType, unsigned int* pHancBuffer, struct hanc_decode_struct* pHancDecodeInfo);
+       BLUE_UINT32 encode_hanc_frame(unsigned int nCardType, struct hanc_stream_info_struct* pHancEncodeInfo, void* pAudioBuffer, unsigned int nAudioChannels, unsigned int nAudioSamples, unsigned int nSampleType, unsigned int nAudioFlags);
+       BLUE_UINT32 decode_hanc_frame(unsigned int nCardType, unsigned int* pHancBuffer, struct hanc_decode_struct* pHancDecodeInfo);
 
-       BLUE_UINT32 GetFrameInfoForVideoVode(const unsigned int nVideoMode, unsigned int&  nWidth, unsigned int& nHeight, unsigned int& nRate, unsigned int& bIs1001, unsigned int& bIsProgressive);
-       BLUE_UINT32 GetBytesPerFrame(EVideoMode nVideoMode, EMemoryFormat nMemoryFormat, EUpdateMethod nUpdateMethod, unsigned int& nBytesPerFrame);
+       BLUE_UINT32 get_frame_info_for_video_mode(const unsigned int nVideoMode, unsigned int&  nWidth, unsigned int& nHeight, unsigned int& nRate, unsigned int& bIs1001, unsigned int& bIsProgressive);
+       BLUE_UINT32 get_bytes_per_frame(EVideoMode nVideoMode, EMemoryFormat nMemoryFormat, EUpdateMethod nUpdateMethod, unsigned int& nBytesPerFrame);
 
 private:
-       bool                            InitFunctionsPointers();
-       BLUEVELVETC_HANDLE      bvc;
-#if defined(_WIN32)
-       HMODULE                         hModule;
-#else
-       void*                           hModule;
-#endif
+       bool                                    init_function_pointers();
+       
+
+//     HMODULE                                 h_module_;
+//     BLUEVELVETC_HANDLE              bvc_;
+
+       std::shared_ptr<void>   h_module_;
+       std::shared_ptr<void>   bvc_;
 
 //BlueVelvetC function pointers members
        pFunc_bfcGetVersion bfcGetVersion;
@@ -228,17 +211,17 @@ private:
 
 };
 
-spl::shared_ptr<BvcWrapper> create_blue();
-spl::shared_ptr<BvcWrapper> create_blue(int device_index);
+spl::shared_ptr<bvc_wrapper> create_blue();
+spl::shared_ptr<bvc_wrapper> create_blue(int device_index);
 
 //spl::shared_ptr<BvcWrapper> create_blue();
 
-bool is_epoch_card(BvcWrapper& blue);
-bool is_epoch_neutron_1i2o_card(BvcWrapper& blue);
-bool is_epoch_neutron_3o_card(BvcWrapper& blue);
-std::wstring get_card_desc(BvcWrapper& blue, int device_index);
-EVideoMode get_video_mode(BvcWrapper& blue, const core::video_format_desc& format_desc);
-core::video_format_desc get_format_desc(BvcWrapper& blue, EVideoMode vid_fmt, EMemoryFormat mem_fmt);
+bool is_epoch_card(bvc_wrapper& blue);
+bool is_epoch_neutron_1i2o_card(bvc_wrapper& blue);
+bool is_epoch_neutron_3o_card(bvc_wrapper& blue);
+std::wstring get_card_desc(bvc_wrapper& blue, int device_id);
+EVideoMode get_video_mode(bvc_wrapper& blue, const core::video_format_desc& format_desc);
+core::video_format_desc get_format_desc(bvc_wrapper& blue, EVideoMode vid_fmt, EMemoryFormat mem_fmt);
 
 
 }}
\ No newline at end of file