LibMWCapture  3.3.1
LibMWCapture Documentation
MWCapture.h
Go to the documentation of this file.
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
63  BYTE* pbyMaj,
64  BYTE* pbyMin,
65  WORD* pwBuild
66  );
67 
71 BOOL
74  );
75 
76 
80 void
83  );
84 
88 MW_RESULT
91  );
92 
97 int
100  );
101 
109 MW_RESULT
112  int nIndex,
113  MWCAP_CHANNEL_INFO * pChannelInfo
114  );
115 
123 MW_RESULT
126  int nIndex,
127  LPVOID pFamilyInfo,
128  DWORD dwSize
129  );
130 
137 MW_RESULT
140  int nIndex,
141  char* pDevicePath
142 );
143 
150 HCHANNEL
153  const char* pszDevicePath
154  );
155 
160 void
163  HCHANNEL hChannel
164  );
165 
172 MW_RESULT
175  HCHANNEL hChannel,
176  MWCAP_CHANNEL_INFO * pChannelInfo
177  );
178 
186 MW_RESULT
189  HCHANNEL hChannel,
190  LPVOID pFamilyInfo,
191  DWORD dwSize
192  );
193 
200 MW_RESULT
203  HCHANNEL hChannel,
204  MWCAP_VIDEO_CAPS* pVideoCaps
205  );
206 
213 MW_RESULT
216  HCHANNEL hChannel,
217  MWCAP_AUDIO_CAPS* pAudioCaps
218  );
219 
227 MW_RESULT
230  HCHANNEL hChannel,
231  DWORD* pdwInputSource,
232  DWORD* pdwInputCount
233  );
234 
242 MW_RESULT
245  HCHANNEL hChannel,
246  DWORD* pdwInputSource,
247  DWORD* pdwInputCount
248  );
249 
250 
257 MW_RESULT
260  HCHANNEL hChannel,
261  BOOLEAN* pbScan
262  );
263 
270 MW_RESULT
273  HCHANNEL hChannel,
274  BOOLEAN bScan
275  );
276 
283 MW_RESULT
286  HCHANNEL hChannel,
287  BOOLEAN* pbLink
288  );
289 
296 MW_RESULT
299  HCHANNEL hChannel,
300  BOOLEAN bLink
301  );
302 
309 MW_RESULT
312  HCHANNEL hChannel,
313  DWORD* pdwSource
314  );
315 
322 MW_RESULT
325  HCHANNEL hChannel,
326  DWORD dwSource
327  );
328 
335 MW_RESULT
338  HCHANNEL hChannel,
339  DWORD* pdwSource
340  );
341 
348 MW_RESULT
351  HCHANNEL hChannel,
352  DWORD dwSource
353  );
354 
355 // EDID
363 MW_RESULT
365 MWGetEDID(
366  HCHANNEL hChannel,
367  BYTE* pbyData,
368  ULONG* pulSize
369  );
370 
378 MW_RESULT
380 MWSetEDID(
381  HCHANNEL hChannel,
382  BYTE* pbyData,
383  ULONG ulSize
384  );
385 
386 // Signal Status
393 MW_RESULT
396  HCHANNEL hChannel,
397  MWCAP_INPUT_SPECIFIC_STATUS * pInputStatus
398  );
399 
406 MW_RESULT
409  HCHANNEL hChannel,
410  MWCAP_VIDEO_SIGNAL_STATUS * pSignalStatus
411  );
412 
419 MW_RESULT
422  HCHANNEL hChannel,
423  MWCAP_AUDIO_SIGNAL_STATUS * pSignalStatus
424  );
425 
426 // HDMI InfoFrame
433 MW_RESULT
436  HCHANNEL hChannel,
437  DWORD* pdwValidFlag
438  );
439 
447 MW_RESULT
450  HCHANNEL hChannel,
451  MWCAP_HDMI_INFOFRAME_ID id,
452  HDMI_INFOFRAME_PACKET* pPacket
453  );
454 
455 // Video processing
463 MW_RESULT
466  HCHANNEL hChannel,
467  int nAspectX,
468  int nAspectY
469  );
470 
478 MW_RESULT
481  HCHANNEL hChannel,
482  int* pnAspectX,
483  int* pnAspectY
484  );
485 
492 MW_RESULT
495  HCHANNEL hChannel,
496  MWCAP_VIDEO_COLOR_FORMAT colorFormat
497  );
498 
505 MW_RESULT
508  HCHANNEL hChannel,
509  MWCAP_VIDEO_COLOR_FORMAT * pColorFormat
510  );
511 
518 MW_RESULT
521  HCHANNEL hChannel,
522  MWCAP_VIDEO_QUANTIZATION_RANGE quantRange
523  );
524 
531 MW_RESULT
534  HCHANNEL hChannel,
535  MWCAP_VIDEO_QUANTIZATION_RANGE* pQuantRange
536  );
537 
538 // LED Mode
545 MW_RESULT
548  HCHANNEL hChannel,
549  DWORD dwMode
550  );
551 
552 // Upgrade Firmware
559 MW_RESULT
562  HCHANNEL hChannel,
563  MWCAP_FIRMWARE_STORAGE * pFirmwareStorageInfo
564  );
565 
573 MW_RESULT
576  HCHANNEL hChannel,
577  DWORD cbOffset,
578  DWORD cbErase
579  );
580 
590 MW_RESULT
593  HCHANNEL hChannel,
594  DWORD cbOffset,
595  BYTE * pbyData,
596  DWORD cbToRead,
597  DWORD * pcbRead
598  );
599 
608 MW_RESULT
611  HCHANNEL hChannel,
612  DWORD cbOffset,
613  BYTE * pbyData,
614  DWORD cbData
615  );
616 
617 
629 HANDLE
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
649  HANDLE hVideo
650  );
651 
659 HANDLE
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
679  HANDLE hAudio
680  );
681 
689 MW_RESULT
692  HCHANNEL hChannel,
693  MWCAP_AUDIO_NODE audioNode,
694  MWCAP_AUDIO_VOLUME* pVolume
695  );
696 
704 MW_RESULT
707  HCHANNEL hChannel,
708  MWCAP_AUDIO_NODE audioNode,
709  MWCAP_AUDIO_VOLUME* pVolume
710  );
711 
712 
722 MW_RESULT
725  HCHANNEL hChannel,
726  BYTE byIndex,
727  BOOLEAN bHANC,
728  BOOLEAN bVANC,
729  BYTE byDID,
730  BYTE bySDID
731  );
732 
743 MW_RESULT
746  HCHANNEL hChannel,
747  MWCAP_SDI_ANC_PACKET* pPacket
748  );
749 
750 #ifdef __cplusplus
751 }
752 #endif
MW_RESULT LIBMWCAPTURE_API MWGetChannelInfo(HCHANNEL hChannel, MWCAP_CHANNEL_INFO *pChannelInfo)
Gets the channel information based on the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetAVInputSourceLink(HCHANNEL hChannel, BOOLEAN *pbLink)
Sets whether the audio input source Linked with video according to the channel handle.
int LIBMWCAPTURE_API MWGetChannelCount()
Gets the number of devices.
void LIBMWCAPTURE_API MWCaptureExitInstance()
Quits MWCapture.
MW_RESULT LIBMWCAPTURE_API MWSetAVInputSourceLink(HCHANNEL hChannel, BOOLEAN bLink)
Sets whether the audio input source follows the video input source according to the channel handle...
void LIBMWCAPTURE_API MWCloseChannel(HCHANNEL hChannel)
Closes the device channel.
MW_RESULT LIBMWCAPTURE_API MWGetInputSourceScan(HCHANNEL hChannel, BOOLEAN *pbScan)
Gets whether the input source is automatically scanned according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWSetAudioVolume(HCHANNEL hChannel, MWCAP_AUDIO_NODE audioNode, MWCAP_AUDIO_VOLUME *pVolume)
Sets the audio attribute value of audio device.
MW_RESULT LIBMWCAPTURE_API MWGetHDMIInfoFrameValidFlag(HCHANNEL hChannel, DWORD *pdwValidFlag)
Gets the HDMI infoframe valid flag according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetVideoInputAspectRatio(HCHANNEL hChannel, int *pnAspectX, int *pnAspectY)
Gets the video input aspect ratio according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWDestoryAudioCapture(HANDLE hAudio)
End of audio capture.
MW_RESULT LIBMWCAPTURE_API MWSetVideoInputSource(HCHANNEL hChannel, DWORD dwSource)
Sets the video input source according to the channel handle.
HANDLE LIBMWCAPTURE_API MWCreateAudioCapture(HCHANNEL hChannel, MWCAP_AUDIO_CAPTURE_NODE captureNode, DWORD dwSamplesPerSec, WORD wBitsPerSample, WORD wChannels, AUDIO_CAPTURE_CALLBACK callback, void *pParam)
create audio capture using the DShow function
MW_RESULT LIBMWCAPTURE_API MWSetVideoInputAspectRatio(HCHANNEL hChannel, int nAspectX, int nAspectY)
Sets the video input aspect ratio according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWEraseFirmwareData(HCHANNEL hChannel, DWORD cbOffset, DWORD cbErase)
Erases the firmware data according to the channel handle.
HANDLE LIBMWCAPTURE_API MWCreateVideoCapture(HCHANNEL hChannel, int nWidth, int nHeight, int nFourcc, int nFrameDuration, VIDEO_CAPTURE_CALLBACK callback, void *pParam)
Uses the DShow function to create video capture.
MW_RESULT LIBMWCAPTURE_API MWGetVideoCaps(HCHANNEL hChannel, MWCAP_VIDEO_CAPS *pVideoCaps)
Obtains channel video capability information based on the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetHDMIInfoFramePacket(HCHANNEL hChannel, MWCAP_HDMI_INFOFRAME_ID id, HDMI_INFOFRAME_PACKET *pPacket)
Gets the HDMI infoframe data according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetEDID(HCHANNEL hChannel, BYTE *pbyData, ULONG *pulSize)
Gets EDID according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetChannelInfoByIndex(int nIndex, MWCAP_CHANNEL_INFO *pChannelInfo)
Gets the channel information based on the enum.
MW_RESULT LIBMWCAPTURE_API MWGetFirmwareStorageInfo(HCHANNEL hChannel, MWCAP_FIRMWARE_STORAGE *pFirmwareStorageInfo)
Gets firmware storage information according to channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetVideoInputSource(HCHANNEL hChannel, DWORD *pdwSource)
Gets the video input source according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWRefreshDevice()
Refreshes device list.
MW_RESULT LIBMWCAPTURE_API MWGetVideoInputQuantizationRange(HCHANNEL hChannel, MWCAP_VIDEO_QUANTIZATION_RANGE *pQuantRange)
Gets the video input quantization range according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWWriteFirmwareData(HCHANNEL hChannel, DWORD cbOffset, BYTE *pbyData, DWORD cbData)
Writes the firmware data according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetFamilyInfoByIndex(int nIndex, LPVOID pFamilyInfo, DWORD dwSize)
Gets the family information of the channel based on the enumeration value.
MW_RESULT LIBMWCAPTURE_API MWGetVideoSignalStatus(HCHANNEL hChannel, MWCAP_VIDEO_SIGNAL_STATUS *pSignalStatus)
Gets the video signal status according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetDevicePath(int nIndex, char *pDevicePath)
Gets the path of the device.
MW_RESULT LIBMWCAPTURE_API MWSetInputSourceScan(HCHANNEL hChannel, BOOLEAN bScan)
Gets whether automatically scans the input signals according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWSetEDID(HCHANNEL hChannel, BYTE *pbyData, ULONG ulSize)
Sets edid according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWCaptureGetSDIANCPacket(HCHANNEL hChannel, MWCAP_SDI_ANC_PACKET *pPacket)
Get ANC Packet.
MW_RESULT LIBMWCAPTURE_API MWDestoryVideoCapture(HANDLE hVideo)
End of video capture.
MW_RESULT LIBMWCAPTURE_API MWReadFirmwareData(HCHANNEL hChannel, DWORD cbOffset, BYTE *pbyData, DWORD cbToRead, DWORD *pcbRead)
Obtains the firmware data according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetAudioVolume(HCHANNEL hChannel, MWCAP_AUDIO_NODE audioNode, MWCAP_AUDIO_VOLUME *pVolume)
Obtains audio attribute value of the audio device.
MW_RESULT LIBMWCAPTURE_API MWSetLEDMode(HCHANNEL hChannel, DWORD dwMode)
Sets the led mode according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWCaptureSetSDIANCType(HCHANNEL hChannel, BYTE byIndex, BOOLEAN bHANC, BOOLEAN bVANC, BYTE byDID, BYTE bySDID)
Set the type of ANC packet to capture.
MW_RESULT LIBMWCAPTURE_API MWGetFamilyInfo(HCHANNEL hChannel, LPVOID pFamilyInfo, DWORD dwSize)
Gets the channel family information based on the channel handle.
MW_RESULT LIBMWCAPTURE_API MWSetVideoInputQuantizationRange(HCHANNEL hChannel, MWCAP_VIDEO_QUANTIZATION_RANGE quantRange)
Sets the video input quantization range according to the channel handle.
BOOL LIBMWCAPTURE_API MWCaptureInitInstance()
Initializes MWCapture.
MW_RESULT LIBMWCAPTURE_API MWGetAudioInputSourceArray(HCHANNEL hChannel, DWORD *pdwInputSource, DWORD *pdwInputCount)
Obtains an audio input array based on the channel handle.
MW_RESULT LIBMWCAPTURE_API MWSetAudioInputSource(HCHANNEL hChannel, DWORD dwSource)
Sets the audio input source according to the channel handle.
#define LIBMWCAPTURE_API
Definition: MWCapture.h:36
MW_RESULT LIBMWCAPTURE_API MWGetVideoInputSourceArray(HCHANNEL hChannel, DWORD *pdwInputSource, DWORD *pdwInputCount)
Obtains channel video capability information based on channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetVideoInputColorFormat(HCHANNEL hChannel, MWCAP_VIDEO_COLOR_FORMAT *pColorFormat)
Gets the video input color format according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWSetVideoInputColorFormat(HCHANNEL hChannel, MWCAP_VIDEO_COLOR_FORMAT colorFormat)
Sets the video input color format according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetAudioCaps(HCHANNEL hChannel, MWCAP_AUDIO_CAPS *pAudioCaps)
Obtains channel audio capability information based on the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetAudioSignalStatus(HCHANNEL hChannel, MWCAP_AUDIO_SIGNAL_STATUS *pSignalStatus)
Gets the audio signal status according to the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetInputSpecificStatus(HCHANNEL hChannel, MWCAP_INPUT_SPECIFIC_STATUS *pInputStatus)
Gets the input specific status value based on the channel handle.
HCHANNEL LIBMWCAPTURE_API MWOpenChannelByPath(const char *pszDevicePath)
Opens the device channel according to the path.
MW_RESULT LIBMWCAPTURE_API MWGetAudioInputSource(HCHANNEL hChannel, DWORD *pdwSource)
Gets the audio input source from the channel handle.
MW_RESULT LIBMWCAPTURE_API MWGetVersion(BYTE *pbyMaj, BYTE *pbyMin, WORD *pwBuild)
get the version of SDK