Archive

Archive for October, 2009

Netflix on the PS3

October 29th, 2009

I would be remiss to not have a blog post about Netflix on the PS3. As much as I post about streaming video to the PS3 and as much as I love Netflix, I can’t resist chiming in on this one.

First of all, I don’t care what the CEO of Netflix says, but having to put in a disc to stream movies sucks. The streaming app should be an installable application that sits on the XMB.

It’s not a matter of being lazy, it is a matter of convenience. Back on the PS2, when I started working on streaming video to Sony devices using BroadQ (oh yeah… btw, i’ve been working on this for about 6 or 7 years now), it was annoying to have to load in the BroadQ disc to stream the movies. I can’t imagine it will be any less annoying 7 years later when the system has a hard drive that is perfectly capable of storing the application.

That said, I’m excited this is finally happening. There’s little doubt that Microsoft opened up the checkbook to prevent interoperability. Netflix will be available for the PS3 almost exactly one year after XBox. For games, I can understand these exclusive agreements. For third party services such as Netflix, I think it’s a dick move on Microsoft’s part. I view it as yet another good reason not to support their console.

As a Netflix subscriber, I think it’s a bad move by both Netflix and Microsoft. This should have happened long ago.

PlayStation3 , , ,

Safari User Agent Strings Are Dumb

October 21st, 2009

Sometimes it’s hard to decide which company is worse: Apple or Microsoft. Apple’s web browser, Safari, has the dumbest User-Agent of any browser out there. Opera, Firefox, and even MSIE figured out how to do it correctly. You’d think Apple would be able to figure it out, too.

Generally, people want to know the major revision of a browser. The minor revision is usually not important since most of the time these are just used for reporting statistics. Well, as I’m here setting up a piece software that does simple string searches in the user-agent to determine browser version, I got hung up on Safari. Here’s a basic mapping of User-Agent search terms to corresponding browser versions:

opera6 opera/6
opera6 opera 6
opera7 opera/7
opera7 opera 7
galeon1 galeon/1
explorer3 msie 3.
explorer4 msie 4.
explorer5 msie 5.
explorer6 msie 6.
explorer7 msie 7.
explorer8 msie 8.
konqueror2 konqueror/2
konqueror3 konqueror/3
netscape6 netscape6
netscape7 netscape/7
netscape4 mozilla/4
netscape3 mozilla/3
firefox1 firefox/1
firefox2 firefox/2
safari1 safari/1
safari1 safari/85
safari1 safari/3
safari2 safari/4
safari4 safari/5
chrome chrome/0

So check out those Safari searches. The reason they look that way is because Safari doesn’t report it’s version number as Safari/X. Where there should be a major version number is a WebKit build number or some other useless value. Safari does put the actual version into the User-Agent string, but does it in such a fashion that you either need multiple string searches or regex to figure it out. Check out some Safari User-Agent strings:

Safari 3.1.2:
Mozilla/5.0 (...) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1

Safari 4:
Mozilla/5.0 (...) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9

So by matching Safari/5, you’re actually going to end up with either Safari 3.x or Safari 4.x. Or you could search for “Safari” and then search for “Version/X.” Or you could regex search for “/Version\/4.*Safari/” Of course, this software I’m configuring doesn’t support either of those methods because only a mind-bogglingly stupid browser maker would use this format in their User-Agent string.

Oh, and if you’re wondering why Safari/85 matches Safari 1.x, here’s some 1.x User-Agents:

Mozilla/5.0 (...) AppleWebKit/85.8.5 (KHTML, like Gecko) Safari/85.8.1
Mozilla/5.0 (...) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12
Mozilla/5.0 (...) AppleWebKit/312.1 (KHTML, like Gecko) Safari/312

General

PulseAudio: An Async Example To Get Device Lists

October 13th, 2009

I have a love/hate relationship with PulseAudio. The PulseAudio simple API is… well…. simple. For 99% of the applications out there, you’ll rarely need anything more than the simple API. The documentation leaves a little to be desired, but it’s not to hard to figure out since you have the sample source code for pacat and parec.

The asynchronous API, on the other hand, is really complex. The learning curve isn’t really a curve. It’s more like a brick wall. Compounding the issue is that the documentation is atrocious. If you know exactly what you’re looking for and if you already know how it works, the documentation can be helpful.

More importantly, simple example code is nearly impossible to come by. So, since I took the time to figure it out, I figured I would document this here in the hopes that this little example will help someone else. This is not production ready code. There’s a lot of error checking that’s not being done. But this should at least give you an idea of how to use the PulseAudio asyncrhonous API.

Update: I spoke with the PulseAudio team and they encouraged me to put this source code on their wiki. So now you can find it at the main PulseAudio wiki: http://pulseaudio.org/wiki/SampleAsyncDeviceList

Read more…

General , , ,

Mangler: Ventrilo for Linux

October 7th, 2009

Many a gamer has fought with the Linux migration because of Ventrilo. Most games run just fine under wine, but when it comes to VOIP apps for gamers, Ventrilo is by far the leader. The official Linux Ventrilo client has been “in development” for about 3 or 4 years now.

A group of open source developers, over the past couple of years have spent a lot of time reverse engineering the Ventrilo protocol. Based on their work, we have created an almost functional client. It is stable (in the sense that it doesn’t crash) and you can receive audio if you use the Pulse Audio daemon.

The website for Mangler is http://www.mangler.org/.

For the latest developer info, we’ve set up a trac page at http://www.mangler.org/trac for bug reports and/or following our progress.

If you want to help and you have experience with C, C++, Linux audio systems (pulse, alsa, oss, etc), and/or GTK+, join us on irc.freenode.net in #mangler and see if you can help us. In the immediate short term, we need graphic designers (bring us a logo!). Interface designers are welcome as well. If you want to help make this happen, post a comment and/or join us on IRC.

General