My Project
 All Classes
MWCapture.h
1 /************************************************************************************************/
2 // MWCapture.h : header file
3 
4 // MAGEWELL PROPRIETARY INFORMATION
5 
6 // The following license only applies to head files and library within Magewell's SDK
7 // and not to Magewell's SDK as a whole.
8 
9 // Copyrights © Nanjing Magewell Electronics Co., Ltd. ("Magewell") All rights reserved.
10 
11 // Magewell grands to any person who obtains the copy of Magewell's head files and library
12 // the rights,including without limitation, to use on the condition that the following terms are met:
13 // - The above copyright notice shall be retained in any circumstances.
14 // -The following disclaimer shall be included in the software and documentation and/or
15 // other materials provided for the purpose of publish, distribution or sublicense.
16 
17 // THE SOFTWARE IS PROVIDED BY MAGEWELL "AS IS" AND ANY EXPRESS, INCLUDING BUT NOT LIMITED TO,
18 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 // IN NO EVENT SHALL MAGEWELL BE LIABLE
20 
21 // FOR ANY CLAIM, DIRECT OR INDIRECT DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT,
22 // TORT OR OTHERWISE, ARISING IN ANY WAY OF USING THE SOFTWARE.
23 
24 // CONTACT INFORMATION:
25 // SDK@magewell.net
26 // http://www.magewell.com/
27 //
28 /************************************************************************************************/
29 #pragma once
30 
31 #ifdef LIBMWCAPTURE_EXPORTS
32 #define LIBMWCAPTURE_API __declspec(dllexport)
33 #elif LIBMWCAPTURE_DLL
34 #define LIBMWCAPTURE_API __declspec(dllimport)
35 #else
36 #define LIBMWCAPTURE_API
37 #endif
38 
39 #include <stdint.h>
40 #include "MWLinux.h"
41 #include "MWProCapture.h"
42 #include "MWCaptureExtension.h"
43 #include "MWUSBCapture.h"
44 #include "MWUSBCaptureExtension.h"
45 
46 #ifdef __cplusplus
47 
48 extern "C"
49 {
50 #endif
51 
60 MW_RESULT
61 LIBMWCAPTURE_API
62 MWGetVersion(
63  BYTE* pbyMaj,
64  BYTE* pbyMin,
65  WORD* pwBuild
66  );
67 
71 BOOL
72 LIBMWCAPTURE_API
73 MWCaptureInitInstance(
74  );
75 
76 
80 void
81 LIBMWCAPTURE_API
82 MWCaptureExitInstance(
83  );
84 
88 MW_RESULT
89 LIBMWCAPTURE_API
90 MWRefreshDevice(
91  );
92 
97 int
98 LIBMWCAPTURE_API
99 MWGetChannelCount(
100  );
101 
109 MW_RESULT
110 LIBMWCAPTURE_API
111 MWGetChannelInfoByIndex(
112  int nIndex,
113  MWCAP_CHANNEL_INFO * pChannelInfo
114  );
115 
123 MW_RESULT
124 LIBMWCAPTURE_API
125 MWGetFamilyInfoByIndex(
126  int nIndex,
127  LPVOID pFamilyInfo,
128  DWORD dwSize
129  );
130 
137 MW_RESULT
138 LIBMWCAPTURE_API
139 MWGetDevicePath(
140  int nIndex,
141  char* pDevicePath
142 );
143 
150 HCHANNEL
151 LIBMWCAPTURE_API
152 MWOpenChannelByPath(
153  const char* pszDevicePath
154  );
155 
160 void
161 LIBMWCAPTURE_API
162 MWCloseChannel(
163  HCHANNEL hChannel
164  );
165 
172 MW_RESULT
173 LIBMWCAPTURE_API
174 MWGetChannelInfo(
175  HCHANNEL hChannel,
176  MWCAP_CHANNEL_INFO * pChannelInfo
177  );
178 
186 MW_RESULT
187 LIBMWCAPTURE_API
188 MWGetFamilyInfo(
189  HCHANNEL hChannel,
190  LPVOID pFamilyInfo,
191  DWORD dwSize
192  );
193 
200 MW_RESULT
201 LIBMWCAPTURE_API
202 MWGetVideoCaps(
203  HCHANNEL hChannel,
204  MWCAP_VIDEO_CAPS* pVideoCaps
205  );
206 
213 MW_RESULT
214 LIBMWCAPTURE_API
215 MWGetAudioCaps(
216  HCHANNEL hChannel,
217  MWCAP_AUDIO_CAPS* pAudioCaps
218  );
219 
227 MW_RESULT
228 LIBMWCAPTURE_API
229 MWGetVideoInputSourceArray(
230  HCHANNEL hChannel,
231  DWORD* pdwInputSource,
232  DWORD* pdwInputCount
233  );
234 
242 MW_RESULT
243 LIBMWCAPTURE_API
244 MWGetAudioInputSourceArray(
245  HCHANNEL hChannel,
246  DWORD* pdwInputSource,
247  DWORD* pdwInputCount
248  );
249 
250 
257 MW_RESULT
258 LIBMWCAPTURE_API
259 MWGetInputSourceScan(
260  HCHANNEL hChannel,
261  BOOLEAN* pbScan
262  );
263 
270 MW_RESULT
271 LIBMWCAPTURE_API
272 MWSetInputSourceScan(
273  HCHANNEL hChannel,
274  BOOLEAN bScan
275  );
276 
283 MW_RESULT
284 LIBMWCAPTURE_API
285 MWGetAVInputSourceLink(
286  HCHANNEL hChannel,
287  BOOLEAN* pbLink
288  );
289 
296 MW_RESULT
297 LIBMWCAPTURE_API
298 MWSetAVInputSourceLink(
299  HCHANNEL hChannel,
300  BOOLEAN bLink
301  );
302 
309 MW_RESULT
310 LIBMWCAPTURE_API
311 MWGetVideoInputSource(
312  HCHANNEL hChannel,
313  DWORD* pdwSource
314  );
315 
322 MW_RESULT
323 LIBMWCAPTURE_API
324 MWSetVideoInputSource(
325  HCHANNEL hChannel,
326  DWORD dwSource
327  );
328 
335 MW_RESULT
336 LIBMWCAPTURE_API
337 MWGetAudioInputSource(
338  HCHANNEL hChannel,
339  DWORD* pdwSource
340  );
341 
348 MW_RESULT
349 LIBMWCAPTURE_API
350 MWSetAudioInputSource(
351  HCHANNEL hChannel,
352  DWORD dwSource
353  );
354 
355 // EDID
363 MW_RESULT
364 LIBMWCAPTURE_API
365 MWGetEDID(
366  HCHANNEL hChannel,
367  BYTE* pbyData,
368  ULONG* pulSize
369  );
370 
378 MW_RESULT
379 LIBMWCAPTURE_API
380 MWSetEDID(
381  HCHANNEL hChannel,
382  BYTE* pbyData,
383  ULONG ulSize
384  );
385 
386 // Signal Status
393 MW_RESULT
394 LIBMWCAPTURE_API
395 MWGetInputSpecificStatus(
396  HCHANNEL hChannel,
397  MWCAP_INPUT_SPECIFIC_STATUS * pInputStatus
398  );
399 
406 MW_RESULT
407 LIBMWCAPTURE_API
408 MWGetVideoSignalStatus(
409  HCHANNEL hChannel,
410  MWCAP_VIDEO_SIGNAL_STATUS * pSignalStatus
411  );
412 
419 MW_RESULT
420 LIBMWCAPTURE_API
421 MWGetAudioSignalStatus(
422  HCHANNEL hChannel,
423  MWCAP_AUDIO_SIGNAL_STATUS * pSignalStatus
424  );
425 
426 // HDMI InfoFrame
433 MW_RESULT
434 LIBMWCAPTURE_API
435 MWGetHDMIInfoFrameValidFlag(
436  HCHANNEL hChannel,
437  DWORD* pdwValidFlag
438  );
439 
447 MW_RESULT
448 LIBMWCAPTURE_API
449 MWGetHDMIInfoFramePacket(
450  HCHANNEL hChannel,
451  MWCAP_HDMI_INFOFRAME_ID id,
452  HDMI_INFOFRAME_PACKET* pPacket
453  );
454 
455 // Video processing
463 MW_RESULT
464 LIBMWCAPTURE_API
465 MWSetVideoInputAspectRatio(
466  HCHANNEL hChannel,
467  int nAspectX,
468  int nAspectY
469  );
470 
478 MW_RESULT
479 LIBMWCAPTURE_API
480 MWGetVideoInputAspectRatio(
481  HCHANNEL hChannel,
482  int* pnAspectX,
483  int* pnAspectY
484  );
485 
492 MW_RESULT
493 LIBMWCAPTURE_API
494 MWSetVideoInputColorFormat(
495  HCHANNEL hChannel,
496  MWCAP_VIDEO_COLOR_FORMAT colorFormat
497  );
498 
505 MW_RESULT
506 LIBMWCAPTURE_API
507 MWGetVideoInputColorFormat(
508  HCHANNEL hChannel,
509  MWCAP_VIDEO_COLOR_FORMAT * pColorFormat
510  );
511 
518 MW_RESULT
519 LIBMWCAPTURE_API
520 MWSetVideoInputQuantizationRange(
521  HCHANNEL hChannel,
522  MWCAP_VIDEO_QUANTIZATION_RANGE quantRange
523  );
524 
531 MW_RESULT
532 LIBMWCAPTURE_API
533 MWGetVideoInputQuantizationRange(
534  HCHANNEL hChannel,
535  MWCAP_VIDEO_QUANTIZATION_RANGE* pQuantRange
536  );
537 
538 // LED Mode
545 MW_RESULT
546 LIBMWCAPTURE_API
547 MWSetLEDMode(
548  HCHANNEL hChannel,
549  DWORD dwMode
550  );
551 
552 // Upgrade Firmware
559 MW_RESULT
560 LIBMWCAPTURE_API
561 MWGetFirmwareStorageInfo(
562  HCHANNEL hChannel,
563  MWCAP_FIRMWARE_STORAGE * pFirmwareStorageInfo
564  );
565 
573 MW_RESULT
574 LIBMWCAPTURE_API
575 MWEraseFirmwareData(
576  HCHANNEL hChannel,
577  DWORD cbOffset,
578  DWORD cbErase
579  );
580 
590 MW_RESULT
591 LIBMWCAPTURE_API
592 MWReadFirmwareData(
593  HCHANNEL hChannel,
594  DWORD cbOffset,
595  BYTE * pbyData,
596  DWORD cbToRead,
597  DWORD * pcbRead
598  );
599 
608 MW_RESULT
609 LIBMWCAPTURE_API
610 MWWriteFirmwareData(
611  HCHANNEL hChannel,
612  DWORD cbOffset,
613  BYTE * pbyData,
614  DWORD cbData
615  );
616 
617 
629 HANDLE
630 LIBMWCAPTURE_API
631 MWCreateVideoCapture(
632  HCHANNEL hChannel,
633  int nWidth,
634  int nHeight,
635  int nFourcc,
636  int nFrameDuration,
637  VIDEO_CAPTURE_CALLBACK callback,
638  void* pParam
639  );
640 
646 MW_RESULT
647 LIBMWCAPTURE_API
648 MWDestoryVideoCapture(
649  HANDLE hVideo
650  );
651 
659 HANDLE
660 LIBMWCAPTURE_API
661 MWCreateAudioCapture(
662  HCHANNEL hChannel,
663  MWCAP_AUDIO_CAPTURE_NODE captureNode,
664  DWORD dwSamplesPerSec,
665  WORD wBitsPerSample,
666  WORD wChannels,
667  AUDIO_CAPTURE_CALLBACK callback,
668  void* pParam
669  );
670 
676 MW_RESULT
677 LIBMWCAPTURE_API
678 MWDestoryAudioCapture(
679  HANDLE hAudio
680  );
681 
689 MW_RESULT
690  LIBMWCAPTURE_API
691  MWGetAudioVolume(
692  HCHANNEL hChannel,
693  MWCAP_AUDIO_NODE audioNode,
694  MWCAP_AUDIO_VOLUME* pVolume
695  );
696 
704 MW_RESULT
705  LIBMWCAPTURE_API
706  MWSetAudioVolume(
707  HCHANNEL hChannel,
708  MWCAP_AUDIO_NODE audioNode,
709  MWCAP_AUDIO_VOLUME* pVolume
710  );
711 
712 
722 MW_RESULT
723  LIBMWCAPTURE_API
724  MWCaptureSetSDIANCType(
725  HCHANNEL hChannel,
726  BYTE byIndex,
727  BOOLEAN bHANC,
728  BOOLEAN bVANC,
729  BYTE byDID,
730  BYTE bySDID
731  );
732 
743 MW_RESULT
744  LIBMWCAPTURE_API
745  MWCaptureGetSDIANCPacket(
746  HCHANNEL hChannel,
747  MWCAP_SDI_ANC_PACKET* pPacket
748  );
749 
750 #ifdef __cplusplus
751 }
752 #endif
Definition: MWCaptureExtension.h:324
Definition: MWCaptureExtension.h:426
Definition: MWCaptureExtension.h:297
Definition: MWUSBCaptureExtension.h:159
Definition: MWCaptureExtension.h:866
Definition: MWCaptureExtension.h:444
Definition: MWCaptureExtension.h:337
Definition: MWCaptureExtension.h:463
Definition: MWHDMIPackets.h:345
Definition: MWCaptureExtension.h:332