Skip to content

Recent Articles

10
Aug

Directshow .NET

So I started playing around with streaming video from a webcam in my .NET application at home and I found a library that encapsulates the functionality that DirectShow provides within a .NET library. Coding with un-managed assemblies is certainly interesting, there are a ton of things that don’t come naturally and in large there don’t seem to be any books out there. Which would make sense since there aren’t a whole lot of people who do this kind of stuff anymore. Most development these days is: Grab user input, Store user input, Retrieve user input, Show user input.

At any rate I found one book on DirectShow that explains the thought patterns behind the design of the framework but it is out of print and roughly $200.00 on Amazon:

Programming Microsoft DirectShow for Digital Video and Television (Pro-Developer)

There are other places that you can find the book that are cheaper, but it is a shame that a book that is obviously needed by some and abused by others, price, is out of print. Sure would be nifty if they had a digital download or something.

Anyway, back to the DirectShow .NET library… The traditional “documentation” isn’t really that full, but they provide a ton of code samples with the download. The only thing that would be nice is something that explained filters, graphs, etc. for noobs like me. That book mentioned above does, and if you pair that up with the library mentioned here you can cut your way through the muck.

I took a sample the good folks at DirectShow .NET had and put the meat into it’s own class / project, even figured out how to capture mouse events in the video window and flush them to my panel that I have the thing sitting in. I’ll put up the code samples in a day or two when I get a chance, I’m still learning myself. If you’re reading this and really can’t wait….

IVideoWindow has a method called put_MessageDrain, if your video is sitting inside of panel1 for example you’d set this up as such:


this.myVideoWindow.put_MessageDrain(panel1.Handle);

Then you just need to handle the events it “drains” to you, for example:

private void panel1_MouseUp(object sender, MouseEventArgs e)
{
this.textBox1.Text = "CAM 1: " + e.X.ToString() + "," + e.Y.ToString() + "\r\n";
}

There are other events you can capture but that’s a simple example of how you would capture mouse clicks on your video window. You can find all this stuff online somewhere … I’m sure… however I had a beast of a time doing so, thus I decided to start blogging about my experiences with these libraries.

That’s all for now…

9
Aug

Recipe for a Successful Fox Show

Look no further people. I have found it!

Recipe For a Show On FOX:
1. Female of roughly 110 to 125lbs.
2. C or D cup on said female
3. Daddy issues or some kind of problem
4. Mean guy / organization
5. Guns and Explosions
6. Possibly Martial Arts
7. Fast camera angles and bad fight scenes
8. Intimacy between said female and square jawed male counterpart with no more than 8% body fat and 6 pack abs… somehow his shirt came off… possibly blown off by one of the explosions in ingredient 5
9. Some sort of morally incorrect controversial conflict

Stir slowly so these ingredients don’t explode! There’s quite the powder keg in here and if we’re not careful we could get FOX all over the place!

8
Aug

Finally Decided To Fix The Blog

Long ago, last year to be exact my WordPress install broke, went out of date, or all the above. So I gave up on the whole blogging thing. However, I’ve had a few things I wanted to share lately so I decided to go through the upgrade process.

Also… The latest version of WordPress is really quite nifty. Very easy to use and … bubbly almost.

13
Apr

VMWare Issues On The Mac!

Good afternoon boys and girls! I know I usually complain about windows, but here goes… VMWare fusion is the topic tonight! I have had more issues than I can count. The latest one I found nothing online so I had to do some digging and experimenting.

I got a message that said the following when trying to start my VM… The state was saved, this turns out to be important… anyway the error text:

Unexpected signal: 10. A log file is available in “/Users/[my user]/VMWARE/Boot Camp partition.vmwarevm/vmware.log”. Please request support and include the contents of the log file. To collect data to submit to VMware support, choose “Collect Support Information” from the Help menu. You can also run “/Library/Application Support/VMware Fusion/vm-support.tool” directly. We will respond on the basis of your support entitlement.

That last bit was especially encouraging! At any rate, I first got mad, then sad, then I decided to search online, not much there… I finally opened Text Wrangler and went to File -> Open Hidden and opened up the log file in the error message. Now … when you first open this puppy up, you are going to _____ your pants. Assuming you’re having the same issue :) Don’t worry it’s not all hex!

I found the following text close to the bottom :

Apr 13 19:06:04.040: vmx| FILE: ScanDirectory discarding M27100.lck from /Users/[my user]/VMWARE/Boot Camp partition.vmwarevm/Boot Camp partition.vmem.lck’: invalid executionID.
Apr 13 19:06:04.043: vmx| MM: using ‘/Users/[my user]/VMWARE/Boot Camp partition.vmwarevm/Boot Camp partition.vmem’ as a paging file
Apr 13 19:06:04.043: vmx| Opened paging file /Users/[my user]/VMWARE/Boot Camp partition.vmwarevm/Boot Camp partition.vmem
Apr 13 19:06:04.043: vmx| Lazy Restore with prefetch of 2076 MB
Apr 13 19:06:04.151: vmx| Caught signal 10 — tid -1610160352

That looked awesome!!

I know from past experience that the vmwarevm file is really just a giant zip type thing that can be explored… also known as a package. So after some strife and debate… I decided to go to Finder… navigate to the vmwarevm file, right click Show Package Contents and scope things out. In the window that opened I saw a file that was named Boot Camp partition.vmem and also a /Users/[my user]/VMWARE/Boot Camp partition.vmwarevm/Boot Camp partition.vmem.lck folder. After some debate… I deleted both… which wiped my saved state. At this point I’m 2 hours into this process so I just wanted my freaking VM to work!

Restart fusion, tried to restart the machine, it bitched that it couldn’t find the vmem … no ____ Sherlock I deleted it since you couldn’t load it or let me ditch it gracefully!!! Clicked ok to those messages, asked it to discard the state and start fresh. Problem solved!!!

God that was an ordeal!! Now… on to what I was going to do pre-explosion !

15
Feb

Windows Search and Silverlight

So a while ago I noticed that my mac was going crazy with some process… I think it was indexing service or some junk. Googled that and found out it was Silverlight going to town, eating up 100% of my cpu. So at the time I just nuked silverlight. Yes you can stop it, however it is somewhat involved. At any rate that fixed my problems.

A few days ago, as you may have noticed, Vista started to puke. SVCHOST.exe was going crazy, so lord knows what that could be… I shut it down a couple of times, killed automatic updates… AGAIN!!! Ahem.. So that gave me back some more control. But that rampant whatever it was was still going crazy. So I did a few things:

1. Killed auto update. I have it set to ask me when it wants to update. I’m pretty good about letting it do it’s thing and just playing xbox in the meantime.
2. Changed the Windows Module Installer service to be a manual start rather than automatic. This is related to updates. It actually installs the hotfixes and so on.
3. Killed Windows Search service. This is the same thing as that Silverlight indexing on the mac side.

Now, if you know me… you know I had some videogame that blew up OSX. It left some virtual adapter behind and OSX didn’t know what to do. So since that happened my Silverlight index service has been running again, and with updates and whatnot I have not seen it again. So it appears that Apple patched their stuff so it doesn’t eat 100% of my CPU. Microsoft still has to get there.

So doing those 3 things restored my Vista VM to normal. No more crazyness. I should fire up Windows 7 and see if they got rid of that svchost.exe bull in Windows 7. They really need to have processes that are easily identifiable so I don’t have to search for days to figure out what is causing me grief! You never know if svchost.exe is something legit or some virus…

12
Feb

Just to Clarify About Vista

This is how I felt about it earlier tonight:

WARNING: PROFANITY AHEAD. IF YOU HAVE SMALL KIDS, ARE IN AN OFFICE, ETC… PUT HEADPHONES ON!

http://www.theonion.com/content/video/sony_releases_new_stupid_piece_of

Only … Microsoft…

12
Feb

Vista Sucks

Ok… I have said this once and I will say it again. Vista is a plague! No… it is not a virus it is a plague! It just took me 30 minutes to get it to run properly! How might this happen you might ask? Well… the automatic update crap I have TURNED OFF !!! Was running, TrustedInstaller.exe ??? Are you f*ing serious Microsoft? . So after looking through some forums I find the error of my ways and that I have to manually shut down a bunch of services. GAAAAH!!! We are now talking 30 minutes. I had to shut down everything I had going, and being that all of it was slower than dog doodie on account of the automatic updates I dont have turned on … automatically running! … it took forever. Now after the restart a bunch more crap starts to run. WHY WHY WHY WHY WHY!?!?!?!?!?! I DIDN’T ASK FOR ANY OF THIS!?

I have tried Windows 7 and despite some bugs it seemed to run faster than Vista. Now let’s hope that they just fix bugs and leave the beta alone and don’t bomb it with a bunch of piss like they did Vista. If Windows 7 sucks as much as Vista I am done with Microsoft on the home front. That is it. Done. Finito. Fin. The end. Im out! Doing it at work as a necessary evil and that is it!!!

I’ll start writing Objective C if I have to. Granted X-Code < Visual Studio but at least I won’t have to worry about OSX taking a giant crap and wasting an hour of my f*ing life!

Note:
Just google TrustedInstaller.exe if you see it chewing up 100% of your CPU and don’t know how to make it stop. You’ll find the same jazz I did.

25
Nov

Statement of Work ( SoW )

So I sent myself a SOW to work on at home, and saw this in google ads. Apparently I should purchase a pig slaughtering device ….

sow Suggestion

23
Nov

Family Guy

7
Oct

So … I know it’s a serious matter but…

I was poking around MSNBC.com reading about how our economy tanking is taking out other markets around the world, and then I ran into this picture…

cell phone hot dog

Doesn’t it look like they’re all talking into Hot Dogs ?!!?! I couldn’t help but laugh at that…