<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Sun, 26 May 2013 02:57:28 GMT</pubDate>
	<lastBuildDate>Sun, 26 May 2013 02:57:28 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>8</c9:totalResults>
	<c9:pageCount>-8</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
		<description><![CDATA[<p><font class="fixed_width" face="Courier, Monospaced">Hello C9ers,<br>
<br>
I'm having some trouble figuring out how to do this: I've developed a camera library in C&#43;&#43;/CLI which I use further in C# apps. After making it accessible to Windows Forms and Direct3D, I want to give Avalon/WPF a try, but this is where I got a bit stuck (lack
 of proper information). As you can see from the thread's title, I want to achieve<br>
the same functionality that currently is given by MediaElement/MediaPlayer. I want to be able to output my webcam preview video to any Visual element in WPF. How do I do that? Do I need to subclass MediaElement? Or MediaPlayer? Or something else. And how do
 I customize it? I hope someone has an answer to this really soon, I'm<br>
betting my final year project on this.<br>
<br>
</font>Thanks in advance, <br>
<p><font class="fixed_width" face="Courier, Monospaced">Cosmin. <br>
</font></p>
<font class="fixed_width" face="Courier, Monospaced">P.S. Also, I want to know if C&#43;&#43;/CLI can be used to subclass the controls, or it has to be done in C#.<br>
<br>
I've tried several places to get this info, noone seems to care... I hope C9 will.<br>
</font></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/171582#171582</link>
		<pubDate>Sun, 26 Mar 2006 10:25:09 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/171582#171582</guid>
		<dc:creator>cosminb</dc:creator>
		<slash:comments>8</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cosminb/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
		<description><![CDATA[<p>&nbsp;&nbsp;&nbsp; As I know from your statement, you can use your C&#43;&#43;/CLI library in Windows Forms application, then you can leverage upon
<b>crossbow </b>technology to host WPF controls(MediaElement, or MediaPlayer) in your Windows Forms Applications.<br>
&nbsp;&nbsp;&nbsp; Crossbow is a peice of interoperating technology between Windows Forms and WPF, you can get more info from
<a href="http://blogs.msdn.com/mhendersblog/">this blog</a>.<br>
&nbsp;&nbsp;&nbsp; Hopefully this helps.<br>
<br></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/6408850af1f84453930e9dea013a75e0#6408850af1f84453930e9dea013a75e0</link>
		<pubDate>Sun, 26 Mar 2006 13:51:51 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/6408850af1f84453930e9dea013a75e0#6408850af1f84453930e9dea013a75e0</guid>
		<dc:creator>Zhou Yong</dc:creator>
		<slash:comments>8</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/footballism/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
		<description><![CDATA[<p>Actually what I'm trying to do is to target WPF, not Windows Forms. Windows Forms are already covered by my library.<br>
<br>
So this is what I want to implement in Avalon: I want to display the preview video (taken directly from the webcam) in a similar way to how MediaElement works. So I want to be able to preview inside various shapes, or in 3D (I've seen a sample in Hands-On-Labs
 where there was a video file playing this way: inside shapes, and on the faces of a cube).<br></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/87410efb8dae4fe7917b9dea013a760a#87410efb8dae4fe7917b9dea013a760a</link>
		<pubDate>Mon, 27 Mar 2006 11:11:03 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/87410efb8dae4fe7917b9dea013a760a#87410efb8dae4fe7917b9dea013a760a</guid>
		<dc:creator>cosminb</dc:creator>
		<slash:comments>8</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cosminb/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
		<description><![CDATA[<p>Hi. This will be very useful. Any chance of a sample when you get it working??? thanks</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/4be7bca412be4d77bd879dea013a7632#4be7bca412be4d77bd879dea013a7632</link>
		<pubDate>Tue, 28 Mar 2006 23:03:43 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/4be7bca412be4d77bd879dea013a7632#4be7bca412be4d77bd879dea013a7632</guid>
		<dc:creator>sashah</dc:creator>
		<slash:comments>8</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sashah/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
		<description><![CDATA[<p>Well, I just got some comments on this one, and it doesn't have a nice way around: <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=296765&amp;SiteID=1">http&#58;&#47;&#47;forums.microsoft.com&#47;MSDN&#47;ShowPost.aspx&#63;PostID&#61;296765&#38;SiteID&#61;1</a><br>
<br>
I will keep asking, until I get a clear view on how to do it.<br>
<br>
Edit:<br>
<br>
So far I've managed to get it to work in Windows Forms and Direct3D, if you're interested in some code.<br></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/c5580775b51147eab5389dea013a765c#c5580775b51147eab5389dea013a765c</link>
		<pubDate>Fri, 31 Mar 2006 06:24:59 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/c5580775b51147eab5389dea013a765c#c5580775b51147eab5389dea013a765c</guid>
		<dc:creator>cosminb</dc:creator>
		<slash:comments>8</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cosminb/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
		<description><![CDATA[<p>why don't you try to put every image you get from the webcam into the Image object as a BitmapImage - i think wpf will be fast enough for this <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif' alt='Wink' /><br>
there are libs out in the web which can find every webcam on your pc and send picture by picture from the cam to your app so that shouldn't be that difficult...<br></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/7c6a8c53b9a6480b9c4f9dea013a7685#7c6a8c53b9a6480b9c4f9dea013a7685</link>
		<pubDate>Wed, 05 Apr 2006 20:09:01 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/7c6a8c53b9a6480b9c4f9dea013a7685#7c6a8c53b9a6480b9c4f9dea013a7685</guid>
		<dc:creator>GRiNSER</dc:creator>
		<slash:comments>8</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/GRiNSER/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
		<description><![CDATA[<p>Hi i think i may be able to do what you have suggested here. ONly problem im having is converting between a system.drawing.image to a system.windows.controls.image. cant find anything on web about it.<br>
<br>
can you help??<br>
<br>
thanks<br>
<br>
sash<br>
<br></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/d76e318e4ef643889e5a9dea013a76ae#d76e318e4ef643889e5a9dea013a76ae</link>
		<pubDate>Thu, 06 Apr 2006 21:13:58 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/d76e318e4ef643889e5a9dea013a76ae#d76e318e4ef643889e5a9dea013a76ae</guid>
		<dc:creator>sashah</dc:creator>
		<slash:comments>8</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sashah/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - extending WPF/Avalon/XAML - webcam preview</title>
		<description><![CDATA[<p><blockquote>
<div>sashah wrote:</div>
<div><br>
&nbsp;&nbsp;&nbsp; ONly problem im having is converting between a system.drawing.image to a system.windows.controls.image. cant find anything on web about it.<br>
</div>
</blockquote>
<br>
the following code snippet can do the trick:<br>
System.Drawing.Bitmap GdiBitmap = new System.Drawing.Bitmap(@&quot;c:\temp\sample.jpg&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IntPtr hBitmap = bitmap.GetHbitmap();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.Windows.Media.BitmapSource WpfBitmap = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmapbitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.Windows.Controls.Image WpfImage = new System.Windows.Controls.Image();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WpfImage.Source = WpfBitmap;<br>
<br>
Sheva<br></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/ce4f4133f83e4762a89a9dea013a76db#ce4f4133f83e4762a89a9dea013a76db</link>
		<pubDate>Fri, 07 Apr 2006 16:58:14 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/171582-extending-WPFAvalonXAML-webcam-preview/ce4f4133f83e4762a89a9dea013a76db#ce4f4133f83e4762a89a9dea013a76db</guid>
		<dc:creator>Zhou Yong</dc:creator>
		<slash:comments>8</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/footballism/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>