Welcome to MSDN Blogs Sign in | Join | Help

Mark Schmidt's Abode

On Programming, Writing, Gaming, Fitness, Life

News

  • Have a Question?

    Click here to chat with me

    XBox Live GamerTag


    Twitter



    The Mark Cam


    My MoBlog

    www.flickr.com
    This is a Flickr badge showing public photos from codepunk. Make your own badge here.

    Community-Credit

Interested in XSLT?

So I'm back to doing some XSLT work now. I did quite a bit during my work at HP and absolutely love it (don't ask me why). Since I've spent so much time working with it, I've learned a few tips and tricks not covered in a lot of books. So, is there any interest from the people on the intertubes concerning XSLT? If so, comment here or email me and if enough interest develops, I'll get going on it. Or, here's a list of other things I can post about:

  • Transforming multiple XML documents at a time with XSLT
    • Quick code snippet would be a localization pattern with XSLT that will look in 1 XML file for an element and if it can't find it will fallback to a different file for the string
  • .NET within Windows Sidebar
    • I've posted my .NET gadget creator which includes my solution for unloading assemblies from the Sidebar without having to stop the sidebar. However, I haven't gone into detail about how I do it nor have I posted code. Any interest in seeing this?
  • Webcam
    • Any interest in any more webcam stuff? Want me to update it with bugs people have mentioned (ability to select webcam for instance)
  • COM stuff
    • Yes, I still use it. I'm sure I have some code laying around that I can blog about.
  • Game programming
    • I have a pretty cool web based Ajax game I tinker with now and then. I posted 1 entry about it. I can continue with more if any interest. The dynamic server side image generation (which is streamed to the client instead of being placed in a file on the server) would be a good one.
  • A good way to prevent people from downloading images from your web page (still can take a screenshot but this solution is still cool). Related to the above entry.
  • Anything else that I've blogged about that you want more info on?
Posted: Thursday, June 19, 2008 2:22 PM by markhsch

Comments

Brian Layman said:

Well, I'm subscribed to your feed in the hopes of more web cam stuff and maybe some sidebar stuff would be good too.

Those are two sideprojects I want to delve into but haven't yet.  What I really want to figure out is how to create a virtual web cam transforming the picture from the one webcam, or playing a video out to the virtual cam.  

There is an incredible need for a PROFESSIONAL attitude webcam tool similar to CamTwist on the mac.  WebCamMax and ManyCam exist on the PC but people creating ustream casts don't care if you can use the tool to put bunny ears or a george bush mask on your head.  Yes, there is a face tracking api out there but it doesn't mean people want it on their software. They want something that can do scripted actions, load a standard config for each show, and provides a simple interface that doesn't distract from the broadcasting.

Soooo, while your webcam stuff is only a step onto that road, maybe it is something that might pique your interest and provide you with a good series of articles and set you up as an expert in a yet relatively uncharted field.

Thoughts?

# June 20, 2008 11:15 AM

Mark Schmidt said:

Brian,

Can you explain a little what you mean by "virtual web cam"?

-Mark

# June 20, 2008 1:12 PM

Brian Layman said:

Sure. That's a good question as it can mean two things. Really one is just the simpler form of the other.

If you google for virtual web cam you will come up with lots of youtube videos showing how you can have a video loop goes out as a camera feed.  If you select different actions the camera will perform them. That process requires several things:

1. The creation of a "virtual webcam" driver that is listed as an input on the webcam drop downs in skype or AOL instant messagenger etc.  I believe there is an Active X solution to this.

2. The ability to take a video and play it into the camera's stream

If you look at http://manycam.com or webcammax.com you'll see that this is the basis of the creation of those took.  Those programs take the process a few steps further and Add the ablity to a bunch of things show presenters do not need.  For example, they use face recongition (from here ??? http://www.intel.com/technology/computing/opencv/overview.htm ?) to put things like santa clause hats on the users and silly unneeded stuff like that.

What a presenters program would need is:

1. The creation of a "virtual webcam" driver that is listed as an input on the webcam drop downs in skype or AOL instant messagenger etc.

2. The ability to have text placed into the camera feed.  Text controls would come next naturaly.

3. The ablity to put graphics in to the stream as overlays and full screens.  

4. The ablity to play a movie into the stream, starting when you tell it to. with sound fed to the stream.

5. The ablity to screen capture areas or full screen.

6. The saving of all of the above configuration for later reuse during the actual broadcast.

Yes, I'm using your comment as a feature listing ramble. Sorry... I hope you don't mind. It's being done in part trying to pique your interest and partially as it is nice to get the feature set more firmly in mind. :)

But with lifecasting and weekly web shows becoming ever more popular, there is a need for this.

Last night, I did find a cross platform open source product that starts down this path. http://www.makesweet.com/webcam/ucanvcam/  But i've not yet taken standard cpp project and turned it into a VS2008 project.  Yeah, I'm a Delphi/php programmer for the most part, so the UI part of this is bulluxing me.  If I got past the point of creating a compiling project out of the thing, I'd be 90% there. Working the API calls and building the C++ functions don't scare me.  It's the fundamentals of setting up the project that I am 15 years rusty on...

Last night I  

# June 20, 2008 11:45 PM

slyi said:

Id be interestd in the xml localization fallback system, did you use resx

# June 26, 2008 5:31 PM

Mark Schmidt said:

Actually no on the localization fallback system. As I said in the title I'm doing a little XSLT work so it's basically take an XML file (in my case a custom RSS feed) and generate some HTML from it. I also interact with some client code (can't go into details). In a nutshell, I have a secondary file that acts as a fallback resource. So if the author that is creating the RSS file forgets or doesn't need a certain element within the RSS (since we have some custom namespace elements in the feed), the XSLT will grab the default from the fallback resource XML file. Probably easier to just post some XSLT to demonstrate. It's cool stuff but it's only something you would use during a document tranformation (though it can easily be adapted to create a localization system that uses resx during the pre-build step).

# June 28, 2008 1:45 AM

Mark Schmidt said:

Based on some feedback I've received here and via email, I'm probably going to do 2 things. I will post some XSLT code (since for some strange reason I love XSLT based solutions...I guess since its like a fun logic puzzle or something) and next I'll do a series of posts with webcam source. A lot of people want me to demonstrate device enumeration so I'll update my sample project to do that. I'll then start some research and figure out how to manipulate the output stream I receive from the webcam itself. I have some ideas and I don't think it'll be too difficult. I won't create a full fledged application (I'll leave that to you) but hopefully I can give you a good starting point. Keep in mind that I'm in the coding phase at work for the project I'm on so I can't promise that I'll be able to post anything until its over (especially since my work item load is quite large this time). Stay tuned.

# June 28, 2008 1:48 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker