Archive for the 'Uncategorized' Category
Science Fiction predicts the future?
I’m watching a documentary on the parallels between the market crash of 1929, and the market crash in 2008(last year). I was reminded of the exploits of Adam Zimmerman, of Brian Stableford’s Emortality series, where Adam used his brilliance in the stock markets to cause a massive market crash, while the masters of the business world buy everything up cheaply for pennies on the dollar.
This bears frightening parallels to what happened last year. The only real difference is that Adam engineered the collapse in 2025. One has to wonder if maybe Stableford was right, but just a bit wrong as to when it would happen?
Comments are off for this postIntelligence Gathering Issues
All too often we see reporters miss the real questions or lob easy ones at the Powers That Be. This isn’t enough to make me paranoid, as generally, people do good. But one particular line in this Time article about missing boy Danny Barter really got me interested. The line in question is this:
Their hope has been bolstered by investigators with the FBI and the Baldwin County Sheriff’s Office, which reopened the case last year after hearing of a recent conversation.
“A lead was sparked when someone was sitting in a public area talking about what happened,” FBI spokeswoman Joyce Riggs wrote in an e-mail to the media.
Who was talking? What role did they play? Are they an informant? Random speculation by random strangers caused a lead? Or are the people having the conversation now suspects? This is a serious, serious issue. Some random public conversation sparks a lead? How did the FBI get the conversation?
1 commentMovie Module Progress: Week 5
So this is it, week 5 of 12/13 weeks. Almost halfway through the summer of code!
So, I managed to get sound working properly, with only minimal skips of quality issues.
- I fixed the buffer issues I mentioned before, so sound sounds great.
- As well, I worked on several other issues within the source code, various bugs, things of that sort.
- On Wednesday, I had a few important questions which I sent to my mentors for help. Those questions were:
-
- Main python was hanging, due to the movie threads not really releasing the GIL. This was solved by examining the source of pgreloaded as directed to do so by Marcus, which required me to come up with a new way of working with Python’s thread primitives.
- Redirecting the output of a video player to a surface of the programmer’s choice. Marcus had some code for that as well, but I have yet to implement that.
- Once I had the GIL issue fixed, I was able to test the surface code, and I discovered that for some reason, the YUV to RGB conversion code was making everything blue. While neat looking, its not very useful. I discovered this was due to an endian assumption, where the code had assumed little-endian and the platform used big-endian. I fixed this by having an endian check, and executing a different bit packing scheme depending on the endianness.
So with those problems fixed, I set about making a backend wrapper around VLC(at the suggestion of Rene), which was some fun working. Some issues with subprocess, which as it turned out, was due to VLC itself, not subprocess. So the current VLC wrapper uses subprocess to execute VLC, and a socket to communicate back and forth with VLC’s remote control interface. As well, I made a dummy module to simulate a movie class, with the appropriate behaviour and members. Then I made a nice front end module which tries to first import my ffmpeg wrapper, then if that fails, to import the VLC backend, and if that fails as well, then it imports the dummy module. I keep the namespaces nice and clean, and hopefully it all behaves properly cross-platform.
So with that, I am announcing an alpha release of basic, untested functionality for the movie module. If you want to help test it, please do so. I’m going to be spending the next week working on more in-depth test cases, and testing every possible code-path(where reasonable…). I prefer to test the module on as many different kinds of movie files possible.
Process to install
If you would like to help test the module(on Linux), here is the process. I assume you have all the necessary libraries to compile a normal svn release of pygame:
- Download ffmpeg-0.5: ffmpeg
- Unpack the package, and fire up a terminal.
- Navigate to the directory, and in the main ffmpeg folder, and type:
./configure --enable-shared --prefix="/usr" - Type make.
- Type
sudo make install - navigate to the libswscale subdirectory.
- type make, then
sudo make install - Now wherever you like, type
svn co svn://seul.org/svn/pygame/branches/tylerthemovie/ pygame_movie - navigate into pygame_movie, and type ./configure
- That done, type
python setup.py build - Last step! Type
sudo python setup.py install
And voila, you have just installed the new movie module for testing. Be aware that this is not the branch most of the 1.9 development occurs on, so you may end up overwriting that, or having conflicts from left behind files. I do try to be good about keeping up on merges between my branch and the trunk. If you have any questions you can email me at trinioler at gmail.com
Comments are off for this postChampions Online Contest Entry
So apparently Tim Absath of Ctrl-alt-delete comic is running a contest for five beta keys for Champions Online, being produced by the excellent Cryptic Studios. The contest requires inventing a superhero, and here’s my entry:
Once a support technician for a tech startup, Max Kellder is now unrecognizeable. Following the clues of a new mysterious, and difficult ARG, Max trekked to a mountain range deep in the wilds of Canada. There, he discovered he was being pursued by a mysterious organization that calls themselves CROSS, an acronym for something. Desperately hiding from his pursuers, Kellder hides deep within a cave. Within the cave, he finds the entire purpose for the ARG and the whole reason CROSS is hunting him: a dark jewel, with lightning of all the colors deep within. Staring inside the jewel, Kellder is visited by a being that claims to be God, and that in finding the jewel,Kellder has proven himself worthy. The jewel Kellder had found was once the centerpiece jewel of the Ark of the Covenant, long since hidden by the Knights of the Templar. The Holy Spirit tells Kellder that he is to become one of God’s mortal archangels, representatives of His power. Though doubtful, Kellder has no choice but to accept. And from that point on, his life was never the same.
Hearing voices of both genders, young and old, and in varied accents, and seeing people no one else can see, he quickly becomes homeless, dressed in rags and living under a bridge. But when he hears the Call, he transforms in a burst of lightning to a man wearing silvery-white armor, without a helmet, and a large gold cross across the breastplate. At the center of the cross lies the black jewel Kellder found so long ago. His hair in this form is long and flowing, grey, like that of a prophet out of the wilderness. Taking the name of the organization that pursued him, and the symbol that appears on his chest, he calls himself the Cross. Wielding a longsword, Cross works at the bidding of the voices and people he sees, to bring divine retribution to those whom deserve it.
His methods are cruel, and he fights in the worst alleys and the darkest corners of the city. He brings the homeless food, and shelter, and protects the defenceless from those that would use and abuse them. The voices and people only he sees seem to have a plan for him, a plan he does not yet understand, and one he fears will despoil his soul forever.
The other heroes of the city feel he is insane, and do not believe any of his rants or prophetic visions, despite how often they come true. They also dislike the cruelty of his methods, and feel he is one to beware of.
His powers are those of the Old Testament: lightning, invulnerability, and the ability to call down a plague or curse on the most deserving victims. His only weaknesses are what the voices in his head call Black magic, the magic of Satan and his worshipppers. This brings him into conflict with other heroes that use magic as their powers, as he believes they are servants of the Great Liar, and thus not to be trusted. His voices however, insist strenuously that he should kill the blasphemers where they stand, but he resists.
Its a bit disorganized right now, but Cross is just pure awesome. He’s got the whole possible schizophrenia thing going, plus, he’s got a huge amount of doubt for being an agent of god. Lots of stuff to play on, as well as the cruelty, the “plan” of the voices and people only he can see, and the homeless factor. I can see him crusading equally against corrupt real estate developers, cruel pimps and johns, as he could crusade against more direct forms of evil. I’m already thinking of plots involving Cross, and it would be awesome to make a webcomic series about Cross.
2 commentsMovie Module Progress: Week 3
So some really good news today! I finally got video working this week, along with proper video synchronization, all without audio information. This bodes well for the rest of the module. I discovered I can’t use SDL audio, as SDL spawns a thread I have no control over, with only occassional callbacks. This does not work in Python, as it is not threadsafe to access Python objects or methods without proper synchronization primitives.
Rene suggested I pass back a buffer of the sound data, to be passed to say a pygame.mixer.Sound or pygame.mixer.Channel object. However, that doesn’t quite work as the Sound object copies the buffer passed into it, and shares no data with the buffer. The issue is that I’m trying to keep the threading as small as possible, so if anyone has any good suggestions for doing sound, I’d love to hear them!
Comments are off for this post