Apr 162009
 

After some tough time dealing with DirectShow stuffs, finally I can preview video from my own web cam now.

There will be something to be tuned at this moment, like how to arrange the command area and video areas, but I believe I’ve overcome one of the most difficult stuff.

There are still three potential headache ahead:

  1. P2P communication, theoratically it won’t be hard as I did it before, but with Ada I have to deal with those UDP stuffs again, just now sure how easy Ada can handle it
  2. Stream video out, means I need to have my own filter, or, maybe I can find an existing one doing that, but again, I’m not sure
  3. Showing streamed video from the other side (the remote window), have no idea so far

A friend told me I can rely on existing protocols like RSTP or MMS, I have the concerns of violating copyright/patents, but I do some research before picking the protocol I’m going to use. At this moment I prefer some cross platform protocol, maybe all of them are, but again (yes, again and again), I’m not sure.

I will try to see if there anyone who can give me some hints on how to do the layout, by now, I will pause the development for couple of days, take some rest, as I’ve made what I promised (preview video by the end of this week). ๐Ÿ™‚

Apr 152009
 

I guess I’ve got all necessary functions from DirectShow for PPCam project, and created a DirectShow binding. It is still partial as I didn’t check other APIs that are unrelated to PPCam project.

I keyed ~1,800 lines of codes today (include blank and comment lines), what I did is reading MSDN, dig out what kind of APIs I need to use, then check Windows SDK to get the C version of declaration, and write binding. There is a great sample from adapower.org, which taught me how to make it.

Actually this is a nice exercise, using Ada doing DirectShow stuffs is actually using C interface. DirectShow is purely COM based so using OO language, especially C++ is the most natual way, but, I still believe using C is the best way to understand what’s inside, and this helps me know more about the whole structure, and do help implementing good programs.

Apr 142009
 

The most efficient way to keep/get fit, is diet.

I’m getting fit, just because I start having less for dinner, for almost all the nights I felt hungry before heading to bed, and all that I can do is having some water.

This is good – water helps keep body balance, eating less makes me fit, and keeping myself (semi-)hungry for all the time would make the stomach smaller (I guess), so I can have less for lunch/dinner in the future.

Get to get some numbers this weekend – I forgot to get them during the past weekend.

 Posted by at 22:04
Apr 142009
 

I don’t believe what I’m working can be a success, the only reason is the system is just too complicated to be successful.

I always believe, if something cannot be understand by a single person, then it will cause problem. You have to create documentation to describe the system, holding meeting to discussion inter-team issue, and coordinate all sorts of misunderstanding. This just doesn’t work.

I know market needs such a complicated system to fulfill advertiser/publisher’s requirement, but there are some other ways to get things done in a tidy way, it does not make sense to put all details in a flat structure, instead, shouldn’t we just create some hierarchy structure, hiding some low level details to upper level components?

I don’t know what’s the idea of doing this, current situation makes me feel like I’m developing a Windows system, and have to read all those specification for HD, NIC, while still need to understand why we need to provide that kind look and feel to compete with Apple, and thinking of security design as we want to beat Linux.

It just doesn’t make sense to me, I cannot imagine who’s in the team needs to know all these, maybe nobody.

 Posted by at 09:44
Apr 132009
 

I think I hit the wall now – it seems I have to do my own binding for DirectShow before I can proceed, but create a binding is not that easy especially I’m not quite familiar with either source (DirectShow) and target (Ada) areas.

I’ve tried c2ada, which seems doesn’t work well, tried dll2def and gnatdll, seems doesn’t help as DirectShow is based on COM, there are two more alternatives I can try – start from COM and use DirectShow as a regular COM component, or, find another Win32 binding which has DirectShow support.

I don’t know much about Claw or GWindow, but I just don’t like the thick binding. I will try my own binding first, and if I cannot make it, I will try to see if I can use legacy vfw to make things work, and only if that fails I will try Claw or GWindow.

 Posted by at 23:02
Apr 132009
 

I guess I will need this some day – to build resource into the executable.

  1. Edit and save a rc file, say, myres.rc
  2. compile the rc file by “windres -i myres.rc -o myres.o”
  3. Link with “gnatmake main-prog -largs myres.o”

That’s it.

I haven’t figure out how to make things work in GPS yet.

 Posted by at 22:49
Apr 132009
 

I admit I’m a fool, especially in front of Windows, or have to say, in front of Vista.

I spent 10 minutes but still haven’t figure out how to search a specific keyword in files’ content – I was trying to find out which win32ada specification file contains the definition of HRESULT, but obviously I was too stupid to use Vista.

So I’m now downloading Windows Service for UNIX so to get command utilities like grep and more, it will take a while to download (217M) but I believe it’s worth to take a try.

 Posted by at 20:32
Apr 132009
 

Godaddy created blog databases with some names hard to be remembered, I’m changing them to some easy format – creating new database, dump from old database, import to new database, and then change blog (wordpress) configuration files to point to the new database.

So far so good.

 Posted by at 11:02
Apr 132009
 

I just figured out Microsoft Office 2007 has the nice feature to export document to PDF format, so I asked for an upgrade and now I’m running 2007 now – 4 months later than my home desktop.

Obviously I’m not a heavy office user, I occasionally use Word and Excel for reading attachment from email, but I use Project and Visio a lot in the past couple of weeks, most because of the project I’m working on. It seems to me Office 2003 is still the old look and feel, something like Windows 2000 (yes, traditional Windows), while Office 2007 is having Vista-like UI, soft color all around.

Have to say, I’m slowly losing my keen sense on technical stuffs, if I ever had some, this could be another story that I can tell later, or maybe never.

 Posted by at 08:40
Apr 132009
 

Checked in some new codes to PPCam svn – I removed the dependency on the bmp file, now the weirdness of the window is controlled by program.

Also created two sub-windows, one for preview and one for remote, next step is getting preview window works (showing local video), and after that I will make remote window works.

I did some code clean up as well, I think I need to do it again as current code organization is not so good to me.

 Posted by at 06:47