📄 videoio_8h-source.html
字号:
00498 00499 00502 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a27">CanCaptureVideo</a>() <span class="keyword">const</span> = 0;00503 00506 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#a28">GetBrightness</a>();00507 00510 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a29">SetBrightness</a>(<span class="keywordtype">unsigned</span> newBrightness);00511 00512 00515 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#a30">GetWhiteness</a>();00516 00519 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a31">SetWhiteness</a>(<span class="keywordtype">unsigned</span> newWhiteness);00520 00521 00524 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#a32">GetColour</a>();00525 00528 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a33">SetColour</a>(<span class="keywordtype">unsigned</span> newColour);00529 00530 00533 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#a34">GetContrast</a>();00534 00537 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a35">SetContrast</a>(<span class="keywordtype">unsigned</span> newContrast);00538 00539 00542 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#a36">GetHue</a>();00543 00546 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a37">SetHue</a>(<span class="keywordtype">unsigned</span> newHue);00547 00548 00551 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a38">GetParameters</a>(00552 <span class="keywordtype">int</span> *whiteness,00553 <span class="keywordtype">int</span> *brightness,00554 <span class="keywordtype">int</span> *colour,00555 <span class="keywordtype">int</span> *contrast,00556 <span class="keywordtype">int</span> *hue00557 );00558 00559 00562 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a39">SetVideoChannelFormat</a> (00563 <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n3">channelNumber</a>, 00564 <a class="code" href="classPVideoDevice.html#s15">VideoFormat</a> <a class="code" href="classPVideoDevice.html#n2">videoFormat</a>00565 );00566 00567 00571 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a40">GetVFlipState</a>();00572 00576 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a41">SetVFlipState</a>(00577 BOOL newVFlipState 00578 );00579 00580 <a name="l00584"></a><a class="code" href="classPVideoDevice.html#a42">00584</a> <span class="keywordtype">void</span> <a class="code" href="classPVideoDevice.html#a42">SetPreferredColourFormat</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & colourFmt) { <a class="code" href="classPVideoDevice.html#n5">preferredColourFormat</a> = colourFmt; }00585 <a name="l00589"></a><a class="code" href="classPVideoDevice.html#a43">00589</a> <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPVideoDevice.html#a43">GetPreferredColourFormat</a>() { <span class="keywordflow">return</span> <a class="code" href="classPVideoDevice.html#n5">preferredColourFormat</a>; }00590 00591 <span class="keyword">protected</span>:<a name="l00592"></a><a class="code" href="classPVideoDevice.html#n0">00592</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPVideoDevice.html#n0">deviceName</a>;<a name="l00593"></a><a class="code" href="classPVideoDevice.html#n1">00593</a> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n1">lastError</a>;<a name="l00594"></a><a class="code" href="classPVideoDevice.html#n2">00594</a> <a class="code" href="classPVideoDevice.html#s15">VideoFormat</a> <a class="code" href="classPVideoDevice.html#n2">videoFormat</a>;<a name="l00595"></a><a class="code" href="classPVideoDevice.html#n3">00595</a> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n3">channelNumber</a>;<a name="l00596"></a><a class="code" href="classPVideoDevice.html#n4">00596</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPVideoDevice.html#n4">colourFormat</a>;00597 <span class="comment">// Preferred native colour format from video input device, empty == no preference</span><a name="l00598"></a><a class="code" href="classPVideoDevice.html#n5">00598</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPVideoDevice.html#n5">preferredColourFormat</a>;<a name="l00599"></a><a class="code" href="classPVideoDevice.html#n6">00599</a> <span class="keywordtype">unsigned</span> <a class="code" href="classPVideoDevice.html#n6">frameRate</a>;<a name="l00600"></a><a class="code" href="classPVideoDevice.html#n7">00600</a> <span class="keywordtype">unsigned</span> <a class="code" href="classPVideoDevice.html#n7">frameWidth</a>;<a name="l00601"></a><a class="code" href="classPVideoDevice.html#n8">00601</a> <span class="keywordtype">unsigned</span> <a class="code" href="classPVideoDevice.html#n8">frameHeight</a>;<a name="l00602"></a><a class="code" href="classPVideoDevice.html#n9">00602</a> BOOL <a class="code" href="classPVideoDevice.html#n9">doVFlip</a>;00603 <a name="l00604"></a><a class="code" href="classPVideoDevice.html#n10">00604</a> <a class="code" href="classPColourConverter.html">PColourConverter</a> * <a class="code" href="classPVideoDevice.html#n10">converter</a>;00605 <a name="l00606"></a><a class="code" href="classPVideoDevice.html#n11">00606</a> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n11">frameBrightness</a>; <span class="comment">// 16 bit entity, -1 is no value</span><a name="l00607"></a><a class="code" href="classPVideoDevice.html#n12">00607</a> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n12">frameWhiteness</a>;<a name="l00608"></a><a class="code" href="classPVideoDevice.html#n13">00608</a> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n13">frameContrast</a>;<a name="l00609"></a><a class="code" href="classPVideoDevice.html#n14">00609</a> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n14">frameColour</a>;<a name="l00610"></a><a class="code" href="classPVideoDevice.html#n15">00610</a> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n15">frameHue</a>;00611 <a name="l00612"></a><a class="code" href="classPVideoDevice.html#n16">00612</a> <a class="code" href="classPTime.html">PTime</a> <a class="code" href="classPVideoDevice.html#n16">previousFrameTime</a>; <span class="comment">// Time of the last frame.</span><a name="l00613"></a><a class="code" href="classPVideoDevice.html#n17">00613</a> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n17">msBetweenFrames</a>; <span class="comment">// msBetween subsequent frames. </span><a name="l00614"></a><a class="code" href="classPVideoDevice.html#n18">00614</a> <span class="keywordtype">int</span> <a class="code" href="classPVideoDevice.html#n18">frameTimeError</a>; <span class="comment">// determines when this frame should happen.</span>00615 };00616 00617 <a name="l00620"></a><a class="code" href="classPVideoOutputDevice.html">00620</a> <span class="keyword">class </span><a class="code" href="classPVideoOutputDevice.html">PVideoOutputDevice</a> : <span class="keyword">public</span> <a class="code" href="classPVideoDevice.html">PVideoDevice</a>00621 {00622 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPVideoOutputDevice.html">PVideoOutputDevice</a>, <a class="code" href="classPVideoDevice.html">PVideoDevice</a>);00623 00624 <span class="keyword">public</span>:00627 <a class="code" href="classPVideoOutputDevice.html#a0">PVideoOutputDevice</a>();00628 <a name="l00631"></a><a class="code" href="classPVideoOutputDevice.html#a1">00631</a> <span class="keyword">virtual</span> <a class="code" href="classPVideoOutputDevice.html#a1">~PVideoOutputDevice</a>() { <a class="code" href="classPVideoOutputDevice.html#a2">Close</a>(); }; 00632 00636 <span class="keyword">static</span> <a class="code" href="classPStringList.html">PStringList</a> <a class="code" href="classPVideoOutputDevice.html#d0">GetDriverNames</a>(<a class="code" href="classPPluginManager.html">PPluginManager</a> * pluginMgr = NULL);00637 00641 <span class="keyword">static</span> <a class="code" href="classPStringList.html">PStringList</a> <a class="code" href="classPVideoOutputDevice.html#d1">GetDriversDeviceNames</a>(00642 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &driverName,00643 <a class="code" href="classPPluginManager.html">PPluginManager</a> * pluginMgr = NULL00644 );00645 00649 <span class="keyword">static</span> <a class="code" href="classPVideoOutputDevice.html">PVideoOutputDevice</a> *<a class="code" href="classPVideoOutputDevice.html#d2">CreateDevice</a>(00650 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &driverName,00651 <a class="code" href="classPPluginManager.html">PPluginManager</a> * pluginMgr = NULL00652 );00653 00657 <span class="keyword">static</span> <a class="code" href="classPVideoOutputDevice.html">PVideoOutputDevice</a> *<a class="code" href="classPVideoOutputDevice.html#d3">CreateOpenedDevice</a>(00658 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & driverName,00659 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPVideoDevice.html#n0">deviceName</a>,00660 BOOL startImmediate = TRUE,00661 <a class="code" href="classPPluginManager.html">PPluginManager</a> * pluginMgr = NULL00662 );00663 <a name="l00666"></a><a class="code" href="classPVideoOutputDevice.html#a2">00666</a> <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoOutputDevice.html#a2">Close</a>() { <span class="keywordflow">return</span> TRUE; }00667 00670 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoOutputDevice.html#a3">CanCaptureVideo</a>() <span class="keyword">const</span>;00671 00674 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoOutputDevice.html#a4">SetFrameData</a>(00675 <span class="keywordtype">unsigned</span> x,00676 <span class="keywordtype">unsigned</span> y,00677 <span class="keywordtype">unsigned</span> width,00678 <span class="keywordtype">unsigned</span> height,00679 <span class="keyword">const</span> BYTE * data,00680 BOOL endFrame = TRUE00681 ) = 0;00682 <a name="l00688"></a><a class="code" href="classPVideoOutputDevice.html#a5">00688</a> <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoOutputDevice.html#a5">Start</a>() { <span class="keywordflow">return</span> TRUE; }00689 <a name="l00692"></a><a class="code" href="classPVideoOutputDevice.html#a6">00692</a> <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoOutputDevice.html#a6">Stop</a>() { <span class="keywordflow">return</span> TRUE; }00693 };00694 00695 00696 <span class="preprocessor">#ifdef SHOULD_BE_MOVED_TO_PLUGIN</span>00697 <span class="preprocessor"></span>00700 <span class="keyword">class </span>PVideoOutputDeviceRGB : <span class="keyword">public</span> <a class="code" href="classPVideoOutputDevice.html">PVideoOutputDevice</a>00701 {00702 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(PVideoOutputDeviceRGB, <a class="code" href="classPVideoOutputDevice.html">PVideoOutputDevice</a>);00703 00704 <span class="keyword">public</span>:00707 PVideoOutputDeviceRGB();00708 00719 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a15">SetColourFormat</a>(00720 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & colourFormat <span class="comment">// New colour format for device.</span>00721 );00722 00731 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoDevice.html#a21">SetFrameSize</a>(00732 <span class="keywordtype">unsigned</span> width, 00733 <span class="keywordtype">unsigned</span> height 00734 );00735 00741 <span class="keyword">virtual</span> PINDEX <a class="code" href="classPVideoDevice.html#a25">GetMaxFrameBytes</a>();00742 00745 <span class="keyword">virtual</span> BOOL <a class="code" href="classPVideoOutputDevice.html#a4">SetFrameData</a>(00746 <span class="keywordtype">unsigned</span> x,00747 <span class="keywordtype">unsigned</span> y,00748 <span class="keywordtype">unsigned</span> width,00749 <span class="keywordtype">unsigned</span> height,00750 <span class="keyword">const</span> BYTE * data,00751 BOOL endFrame = TRUE00752 );00753 00756 <span class="keyword">virtual</span> BOOL EndFrame() = 0;00757 00758 <span class="keyword">protected</span>:00759 <a class="code" href="classPBYTEArray.html">PBYTEArray</a> frameStore;00760 PINDEX bytesPerPixel;00761 };00762 00763 <span class="preprocessor">#endif // SHOULD_BE_MOVED_TO_PLUGIN</span>00764 <span class="preprocessor"></span>00765 <span class="preprocessor">#ifdef SHOULD_BE_MOVED_TO_PLUGIN</span>00766 <span class="preprocessor"></span>00769 <span class="keyword">class </span>PVideoOutputDevicePPM : <span class="keyword">public</span> PVideoOutputDeviceRGB00770 {00771 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(PVideoOutputDevicePPM, PVideoOutputDeviceRGB);00772 00773 <span class="keyword">public</span>:00776 PVideoOutputDevicePPM();00777 00780 <span class="keyword">virtual</span> BOOL Open(00781 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & deviceName, 00782 BOOL startImmediate = TRUE 00783 );00784
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -