PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusDeckLinkVideoSource.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2 Program: Plus
3 Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4 See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef __vtkPlusDeckLinkVideoSource_h
8 #define __vtkPlusDeckLinkVideoSource_h
9 
10 #include "vtkPlusDataCollectionExport.h"
11 #include "vtkPlusDevice.h"
12 
13 // DeckLink includes
14 #if WIN32
15  // Windows includes
16  #include <comutil.h>
17 #endif
18 #include <DeckLinkAPI.h>
19 
20 // STL includes
21 #include <atomic>
22 
28 class vtkPlusDataCollectionExport vtkPlusDeckLinkVideoSource : public vtkPlusDevice, public IDeckLinkInputCallback
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent);
34 
35  /* Device is a hardware tracker. */
36  virtual bool IsTracker() const;
37  virtual bool IsVirtual() const;
38 
39  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* config);
40  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* config);
41  virtual PlusStatus InternalConnect();
45  virtual PlusStatus Probe();
46  virtual PlusStatus NotifyConfigured();
47 
48 protected:
51 
52 protected:
53  // IDeckLinkInputCallback interface
54  virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents notificationEvents, IDeckLinkDisplayMode* newDisplayMode, BMDDetectedVideoInputFormatFlags detectedSignalFlags);
55  virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame* videoFrame, IDeckLinkAudioInputPacket* audioPacket);
56 
57  // IUnknown interface
58  virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID* ppv);
59  virtual ULONG STDMETHODCALLTYPE AddRef();
60  virtual ULONG STDMETHODCALLTYPE Release();
61 
62 protected:
63  std::atomic<ULONG> ReferenceCount;
64 
65 private:
66  vtkPlusDeckLinkVideoSource(const vtkPlusDeckLinkVideoSource&); // Not implemented
67  void operator=(const vtkPlusDeckLinkVideoSource&); // Not implemented
68 
69  class vtkInternal;
70  vtkInternal* Internal;
71 
72 };
73 
74 #endif
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual PlusStatus InternalStopRecording()
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
virtual PlusStatus InternalConnect()
igsioStatus PlusStatus
Definition: PlusCommon.h:40
virtual bool IsTracker() const
virtual PlusStatus Probe()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
virtual PlusStatus InternalStartRecording()
unsigned long ULONG
Definition: ATC3DGm.h:432
virtual PlusStatus NotifyConfigured()
virtual PlusStatus InternalDisconnect()
Interface to a BlackMagic DeckLink capture card.
virtual bool IsVirtual() const
static vtkPlusDevice * New()