<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[WebCam Capture erzeugt nur schwarzes Bild]]></title><description><![CDATA[<p>Hallo,<br />
ich habe mir ein kleines Programm geschrieben, um die WebCam meines Notebooks anzuzeigen.</p>
<pre><code class="language-cpp">hWndCam=capCreateCaptureWindow(&quot;Meine WebCam&quot;, WS_CHILD | WS_VISIBLE, 5 , 5, 320, 240, Handle, 1);
capDriverConnect(hWndCam,0);
capPreviewRate(hWndCam, 66);
capPreview(hWndCam, true);
</code></pre>
<p>Nach dem Start wird auf meiner Form ein kleiner Bereich erzeugt, der das Bild der Cam anzeigen sollte. Leider bleibt dieser schwarz. Die LED an meiner WebCam schaltet sich nach dem Start allerdings an. Ich habe auch die Cam mit Skype getestet. Dort wird mir das Bild korrekt angezeigt. Daher würde ich jetzt vermuten, dass es an meinem Code liegt.<br />
Hat jemand eine Idee woran???</p>
<p>Danke<br />
Torsten</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/348650/webcam-capture-erzeugt-nur-schwarzes-bild</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 21:11:43 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/348650.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 Dec 2018 10:59:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WebCam Capture erzeugt nur schwarzes Bild on Fri, 07 Dec 2018 10:59:11 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich habe mir ein kleines Programm geschrieben, um die WebCam meines Notebooks anzuzeigen.</p>
<pre><code class="language-cpp">hWndCam=capCreateCaptureWindow(&quot;Meine WebCam&quot;, WS_CHILD | WS_VISIBLE, 5 , 5, 320, 240, Handle, 1);
capDriverConnect(hWndCam,0);
capPreviewRate(hWndCam, 66);
capPreview(hWndCam, true);
</code></pre>
<p>Nach dem Start wird auf meiner Form ein kleiner Bereich erzeugt, der das Bild der Cam anzeigen sollte. Leider bleibt dieser schwarz. Die LED an meiner WebCam schaltet sich nach dem Start allerdings an. Ich habe auch die Cam mit Skype getestet. Dort wird mir das Bild korrekt angezeigt. Daher würde ich jetzt vermuten, dass es an meinem Code liegt.<br />
Hat jemand eine Idee woran???</p>
<p>Danke<br />
Torsten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2566593</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2566593</guid><dc:creator><![CDATA[torsten_156]]></dc:creator><pubDate>Fri, 07 Dec 2018 10:59:11 GMT</pubDate></item><item><title><![CDATA[Reply to WebCam Capture erzeugt nur schwarzes Bild on Fri, 07 Dec 2018 11:38:04 GMT]]></title><description><![CDATA[<p>Wenn ich mir Beispielcode im Netz anschaue, wird dort das <a href="https://msdn.microsoft.com/de-de/vstudio/dd797949(v=vs.80)" rel="nofollow">Overlay</a> ggf. aktiviert.<br />
In der Reihenfolge:</p>
<pre><code>DRIVER_CONNECT
SET_PREVIEWRATE
SET_OVERLAY
SET_PREVIEW
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2566597</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2566597</guid><dc:creator><![CDATA[yahendrik]]></dc:creator><pubDate>Fri, 07 Dec 2018 11:38:04 GMT</pubDate></item><item><title><![CDATA[Reply to WebCam Capture erzeugt nur schwarzes Bild on Fri, 07 Dec 2018 12:25:50 GMT]]></title><description><![CDATA[<p>Habe das Prüfen des Overlays eingebunden:</p>
<pre><code class="language-cpp">hWndCam = capCreateCaptureWindowA(&quot;Meine WebCam&quot;, WS_CHILD | WS_VISIBLE, 5 , 5, 240, 160, Handle, 1);
capDriverConnect(hWndCam,0);
capPreviewRate(hWndCam, 66);

CAPDRIVERCAPS CapDrvCaps;
capDriverGetCaps(hWndCam, &amp;CapDrvCaps, sizeof (CAPDRIVERCAPS));
if (CapDrvCaps.fHasOverlay)
	capOverlay(hWndCam, TRUE);

capPreview(hWndCam, true);
</code></pre>
<p>Ohne Erfolg. Das Bild bleibt schwarz...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2566601</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2566601</guid><dc:creator><![CDATA[torsten_156]]></dc:creator><pubDate>Fri, 07 Dec 2018 12:25:50 GMT</pubDate></item><item><title><![CDATA[Reply to WebCam Capture erzeugt nur schwarzes Bild on Fri, 07 Dec 2018 12:47:31 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/5769">@torsten_156</a> Das wird dir zwar nicht unbedingt helfen, aber auf meinem Notebook klappt es, wenn ich den Code (Konsolenanwendung) einfüge und eine Nachrichtenschleife einbaue (an diesem PC habe ich keine Cam).</p>
<p>Edit: Win10 x64, Cam halt so ein eingebautes Ding...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2566602</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2566602</guid><dc:creator><![CDATA[yahendrik]]></dc:creator><pubDate>Fri, 07 Dec 2018 12:47:31 GMT</pubDate></item><item><title><![CDATA[Reply to WebCam Capture erzeugt nur schwarzes Bild on Fri, 07 Dec 2018 13:04:32 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/26065">@yahendrik</a> Wenn ich das Programm compiliere und es auf einem WIN-Tablet laufen lasse, wird ein Bild angezeigt. Ich vermute mal das es mit dem Treiber am Notebook zusammen hängt. Ich prüfe das mal weiter...</p>
<p>Danke dir...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2566605</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2566605</guid><dc:creator><![CDATA[torsten_156]]></dc:creator><pubDate>Fri, 07 Dec 2018 13:04:32 GMT</pubDate></item><item><title><![CDATA[Reply to WebCam Capture erzeugt nur schwarzes Bild on Wed, 19 Dec 2018 12:47:49 GMT]]></title><description><![CDATA[<p>So, habe jetzt mal weiter getestet. Am Notebook ist eine Logitech HD-Cam per USB angeschlossen. Diese möchte ich jetzt ansprechen.<br />
Ich versuche jetzt mich mit dem Treiber der Cam zu verbinden:</p>
<pre><code class="language-cpp">	if(!capDriverConnect(hwndCam, 0)) {
			MessageBox(Handle, &quot;Treiber für die Webcam kann nicht geladen werden...&quot;, &quot;Fehler&quot;, MB_ICONERROR);
			return;
	}

</code></pre>
<p>Leider ohne Erfolg. Obwohl er mir mit Index 0 den Treiber &quot;Microsoft WDM Image Capture...&quot; zurück gibt und ich es mit diesem Index versuche, klappt es einfach nicht!</p>
<p>Hier mal der gesamte Code:</p>
<pre><code class="language-cpp">#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;UnMain.h&quot;
#include &lt;windows.h&gt;
#include &lt;vfw.h&gt;

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;

TFMain *FMain;
CAPDRIVERCAPS CapDrvCaps;
HWND hwndCam;

//---------------------------------------------------------------------------
__fastcall TFMain::TFMain(TComponent* Owner)
	: TForm(Owner)
{


}
//---------------------------------------------------------------------------
void __fastcall TFMain::BCam_oeffnenClick(TObject *Sender)
{

hwndCam = capCreateCaptureWindow((LPSTR) &quot;My Capture Window&quot;, WS_CHILD | WS_VISIBLE , 0, 0, 200, 200, Handle, 1) ;

capDriverGetCaps(hwndCam, &amp;CapDrvCaps, sizeof (CAPDRIVERCAPS));
	if (CapDrvCaps.fHasOverlay)
		capOverlay(hwndCam, TRUE);


	if(!capDriverConnect(hwndCam, 0)) {
			MessageBox(Handle, &quot;Treiber für die Webcam kann nicht geladen werden...&quot;, &quot;Fehler&quot;, MB_ICONERROR);
			return;
	}



	capPreviewRate (hwndCam, 33.3);
	capPreview (hwndCam, TRUE);


}
```cpp

</code></pre>
<pre><code></code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2567314</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2567314</guid><dc:creator><![CDATA[torsten_156]]></dc:creator><pubDate>Wed, 19 Dec 2018 12:47:49 GMT</pubDate></item><item><title><![CDATA[Reply to WebCam Capture erzeugt nur schwarzes Bild on Wed, 19 Dec 2018 15:13:34 GMT]]></title><description><![CDATA[<p>Habe jetzt die Information, dass es einen Dialog gibt, mit dem man die Videoquelle auswählen kann. Diese Zeile sollte den Dialog erzeugen:</p>
<pre><code class="language-cpp">	bool pp = capDlgVideoSource(hwndVideo);
</code></pre>
<p>Tut es aber leider nicht! Auf einem äleteren Notebook öffnet sich dieser aber. Muss also in irgend einer Weise mit WIN10 zusammen hängen! Hat jemand eine Idee???</p>
<p>Gruß<br />
Torsten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2567318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2567318</guid><dc:creator><![CDATA[torsten_156]]></dc:creator><pubDate>Wed, 19 Dec 2018 15:13:34 GMT</pubDate></item><item><title><![CDATA[Reply to WebCam Capture erzeugt nur schwarzes Bild on Thu, 20 Dec 2018 10:54:22 GMT]]></title><description><![CDATA[<p>Bin ein Stück weiter gekommen. Also, wenn ich aus dem Projekt ein Release erstelle und dieses Release starte, erhalte ich den Source-Dialog. Dort wähle ich die CAM aus und das Bid ist da.</p>
<p>Lediglich im Debug-Modus der IDE erscheint der Source-Dialog nicht! Hat jemand eine Idee warum nicht???</p>
<p>Gruß<br />
Torsten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2567335</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2567335</guid><dc:creator><![CDATA[torsten_156]]></dc:creator><pubDate>Thu, 20 Dec 2018 10:54:22 GMT</pubDate></item></channel></rss>