PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
PlusOutputVideoFrame.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 __PlusOutputVideoFrame_h__
8 #define __PlusOutputVideoFrame_h__
9 
10 // DeckLink includes
11 #if WIN32
12  // Windows includes
13  #include <comutil.h>
14 #endif
15 #include <DeckLinkAPI.h>
16 
17 // STL includes
18 #include <atomic>
19 #include <mutex>
20 
21 class PlusOutputVideoFrame : public IDeckLinkVideoFrame
22 {
23 public:
24  PlusOutputVideoFrame(long width, long height, BMDPixelFormat pixelFormat, BMDFrameFlags frameFlags);
25  virtual ~PlusOutputVideoFrame();
26 
27  virtual long STDMETHODCALLTYPE GetWidth();
28  virtual long STDMETHODCALLTYPE GetHeight();
29  virtual long STDMETHODCALLTYPE GetRowBytes();
30  virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat();
31  virtual BMDFrameFlags STDMETHODCALLTYPE GetFlags();
32  virtual void STDMETHODCALLTYPE SetFlags(BMDFrameFlags flags);
33  virtual HRESULT STDMETHODCALLTYPE GetBytes(void** buffer);
34 
35  virtual HRESULT STDMETHODCALLTYPE GetTimecode(BMDTimecodeFormat format, IDeckLinkTimecode** timecode) {return E_NOTIMPL;}
36  virtual HRESULT STDMETHODCALLTYPE GetAncillaryData(IDeckLinkVideoFrameAncillary** ancillary) {return E_NOTIMPL;}
37 
38  // IUnknown interface
39  virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID* ppv);
40  virtual ULONG STDMETHODCALLTYPE AddRef();
41  virtual ULONG STDMETHODCALLTYPE Release();
42 
43 protected:
44  long Width;
45  long Height;
46  BMDPixelFormat PixelFormat;
47  BMDFrameFlags FrameFlags;
48  BMDTimecodeFormat TimecodeFormat;
49  void* Pixels;
50  std::mutex Mutex;
51 
52 protected:
53  std::atomic<ULONG> ReferenceCount;
54 };
55 
56 #endif
virtual void STDMETHODCALLTYPE SetFlags(BMDFrameFlags flags)
virtual long STDMETHODCALLTYPE GetWidth()
virtual ULONG STDMETHODCALLTYPE AddRef()
virtual HRESULT STDMETHODCALLTYPE GetAncillaryData(IDeckLinkVideoFrameAncillary **ancillary)
PlusOutputVideoFrame(long width, long height, BMDPixelFormat pixelFormat, BMDFrameFlags frameFlags)
virtual HRESULT STDMETHODCALLTYPE GetBytes(void **buffer)
PhidgetLCD_Font int * width
Definition: phidget22.h:4275
virtual long STDMETHODCALLTYPE GetRowBytes()
BMDTimecodeFormat TimecodeFormat
const char int const char int flags
Definition: phidget22.h:2552
unsigned long ULONG
Definition: ATC3DGm.h:432
PhidgetLCD_Font int int * height
Definition: phidget22.h:4275
virtual long STDMETHODCALLTYPE GetHeight()
virtual BMDFrameFlags STDMETHODCALLTYPE GetFlags()
virtual HRESULT STDMETHODCALLTYPE GetTimecode(BMDTimecodeFormat format, IDeckLinkTimecode **timecode)
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv)
virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat()
std::atomic< ULONG > ReferenceCount
virtual ULONG STDMETHODCALLTYPE Release()