PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
nvSDIout.h
Go to the documentation of this file.
1 /***************************************************************************\
2 |* *|
3 |* Copyright 2007 NVIDIA Corporation. All rights reserved. *|
4 |* *|
5 |* NOTICE TO USER: *|
6 |* *|
7 |* This source code is subject to NVIDIA ownership rights under U.S. *|
8 |* and international Copyright laws. Users and possessors of this *|
9 |* source code are hereby granted a nonexclusive, royalty-free *|
10 |* license to use this code in individual and commercial software. *|
11 |* *|
12 |* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE *|
13 |* CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR *|
14 |* IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH *|
15 |* REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF *|
16 |* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR *|
17 |* PURPOSE. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, *|
18 |* INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES *|
19 |* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN *|
20 |* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING *|
21 |* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE *|
22 |* CODE. *|
23 |* *|
24 |* U.S. Government End Users. This source code is a "commercial item" *|
25 |* as that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting *|
26 |* of "commercial computer software" and "commercial computer software *|
27 |* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) *|
28 |* and is provided to the U.S. Government only as a commercial end item. *|
29 |* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through *|
30 |* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the *|
31 |* source code with only those rights set forth herein. *|
32 |* *|
33 |* Any use of this source code in individual and commercial software must *|
34 |* include, in the user documentation and internal comments to the code, *|
35 |* the above Disclaimer and U.S. Government End Users Notice. *|
36 |* *|
37 |* *|
38 \***************************************************************************/
39 
40 #ifndef NVSDIOUT_H
41 #define NVSDIOUT_H
42 
43 #if WIN32
44 #include <windows.h>
45 #endif
46 #include <assert.h>
47 #include <stdio.h>
48 
49 #include "nvConfigure.h"
50 #include <GL/glu.h>
51 
52 #include "nvapi.h"
53 #include "nvGPUutil.h"
54 
55 struct nvOptions;
56 
57 //----------------------------------------------------------------------------
58 typedef class CNvSDIoutGpu : public virtual CNvGpu
59 {
60 public:
61  CNvSDIoutGpu();
62  virtual ~CNvSDIoutGpu();
63 
64  bool Init( HGPUNV gpuAffinityHandle, bool bPrimary, bool bDisplay, bool bSDIOutput, NvVioHandle hVioHandle );
65  bool IsSDIoutput();
66  NvVioHandle GetVioHandle();
67 
68 protected:
70  NvVioHandle m_hVioHandle;
71 } CNvSDIoutGpu;
72 
73 //----------------------------------------------------------------------------
74 typedef class CNvSDIoutGpuTopology : public virtual CNvGpuTopology
75 {
76 public:
78  virtual CNvSDIoutGpu* GetGpu( int index );
79  virtual CNvSDIoutGpu* GetPrimaryGpu();
80 
81 protected:
83  virtual ~CNvSDIoutGpuTopology();
84 
85  bool Init();
87 
88 //----------------------------------------------------------------------------
89 typedef class CNvSDIout
90 {
91 public:
92  CNvSDIout();
93  ~CNvSDIout();
94 
95  HRESULT Init( nvOptions* options, CNvSDIoutGpu* SdiOutGpu = NULL );
96  HRESULT Cleanup();
97 
98  NvVioHandle GetHandle();
99 
100  unsigned int GetWidth();
101  unsigned int GetHeight();
102 
103  float GetFrameRate();
104 
105  BOOL IsInterlaced();
106 
107  HRESULT DisplayVideoStatus();
108  HRESULT DisplaySignalFormatInfo();
109  HRESULT DisplayDataFormatInfo();
110  HRESULT GetFrameRate( float* rate );
111 
112  HRESULT SetCSC( NVVIOCOLORCONVERSION* csc, bool enable );
113  HRESULT GetCSC( NVVIOCOLORCONVERSION* csc, bool* enable );
114 
115  HRESULT GetSyncDelay( NVVIOSYNCDELAY* delay );
116  HRESULT SetSyncDelay( NVVIOSYNCDELAY* delay );
117 
118 private:
119  NvVioHandle m_vioHandle; // Video device handle
120 
121  float m_frameRate; // Video frame rate
122 
123  unsigned int m_videoWidth; // Video format resolution in pixels
124  unsigned int m_videoHeight; // Video format resolution in lines
125 
126  BOOL m_bInterlaced; // Interlaced flag.
127 } CNvSDIout;
128 
129 #endif NVSDIOUT_H
CNvSDIoutGpuTopology CNvSDIoutGpuTopology
BOOL IsInterlaced()
Definition: nvSDIout.cpp:889
HRESULT DisplaySignalFormatInfo()
Definition: nvSDIout.cpp:662
~CNvSDIout()
Definition: nvSDIout.cpp:53
virtual CNvSDIoutGpu * GetGpu(int index)
Definition: nvSDIout.cpp:1274
CNvSDIoutGpu CNvSDIoutGpu
virtual ~CNvSDIoutGpu()
Definition: nvSDIout.cpp:1303
bool m_bSDIoutput
Definition: nvSDIout.h:69
HRESULT SetCSC(NVVIOCOLORCONVERSION *csc, bool enable)
Definition: nvSDIout.cpp:895
bool Init(HGPUNV gpuAffinityHandle, bool bPrimary, bool bDisplay, bool bSDIOutput, NvVioHandle hVioHandle)
Definition: nvSDIout.cpp:1309
NvVioHandle GetHandle()
Definition: nvSDIout.cpp:412
float GetFrameRate()
Definition: nvSDIout.cpp:883
HRESULT GetCSC(NVVIOCOLORCONVERSION *csc, bool *enable)
Definition: nvSDIout.cpp:956
unsigned int GetWidth()
Definition: nvSDIout.cpp:418
NvVioHandle m_hVioHandle
Definition: nvSDIout.h:70
HRESULT DisplayDataFormatInfo()
Definition: nvSDIout.cpp:769
static CNvSDIoutGpuTopology & Instance()
Definition: nvSDIout.cpp:1266
bool IsSDIoutput()
Definition: nvSDIout.cpp:1318
class CNvSDIout CNvSDIout
virtual ~CNvSDIoutGpuTopology()
Definition: nvSDIout.cpp:1064
NvVioHandle GetVioHandle()
Definition: nvSDIout.cpp:1324
HRESULT Cleanup()
Definition: nvSDIout.cpp:399
HRESULT SetSyncDelay(NVVIOSYNCDELAY *delay)
Definition: nvSDIout.cpp:1003
HRESULT DisplayVideoStatus()
Definition: nvSDIout.cpp:430
HRESULT GetSyncDelay(NVVIOSYNCDELAY *delay)
Definition: nvSDIout.cpp:1028
int BOOL
Definition: ATC3DGm.h:446
HRESULT Init(nvOptions *options, CNvSDIoutGpu *SdiOutGpu=NULL)
Definition: nvSDIout.cpp:58
virtual CNvSDIoutGpu * GetPrimaryGpu()
Definition: nvSDIout.cpp:1284
unsigned int GetHeight()
Definition: nvSDIout.cpp:424