fixing flex VideoDisplay CuePointManager

I was creating a Flex application to show slides and a presentation video of previously recorded presentations. Accordingly, each slide should appear at a certain point of time in the video – calls for cue points!

As all slides and there appearance are stored in a text file in my case, I started adding cue points with ActionScript. But as soon as the video can be controlled with a slider, allowing to shift for- and backwards, the event handler “cuePoint” was not triggered any more. Thus, the slides where not changed correctly as the user jumps ahead, as the cue points between the previous and the new position did not cause and cue point event.

Finally I wrote AdvCuePointManager, inheriting from CuePointManager, but which can deal with jumping back- and forward.

Copy it to “<your source folder>/net/svenbuschbeck/flex/video” and use it as follows:

<mx:VideoDisplay cuePointManagerClass="net.svenbuschbeck.flex.video.AdvCuePointManager" />
16 Apr 2009, 5:46pm
jobs:

3 comments

how to install memchached 1.2.2 from source

I have installed an instance of memchached version 1.2.2 on one of our servers (Debian etch) today and to keep you from spending a whole afternoon, see my everything-step-by-step instruction below.

Memchached is a distributed hash map, which can be used for example to speed up any kind of web application, see website for details. In our case, we want to use it as temporary data store. I will report about the experiences in a latter post.

introduction

Always refer to this page for details, but I created a version with less text but including steps to really start from scratch.

All lines starting with # are command lines, i.e. you need to type into a linux shell.
Output of any kind is always surrounded by ” even if it is multiline output.

content

a. get libevent (needed to install memcached)
b. get memcached and verify installation
c. use and test memcached within Java with junit/ant

a. installing libevent 1.3

a.1. check for current version of libevent

a.1a.

Log in as root or get super user rights by calling su

# updatedb
# locate libevent

If there is output including “libevent1″ and/or “libevent-1″ (ignore package files like *.deb) -> a.1b, otherwise a.2

a.1b. removing old libevent version

# apt-get remove –purge libevent1
# Y

# updatedb
# locate libevent
Should now return nothing or package files only, i.e. you are ready for installation

a.2. installing libevent 1.3

a.2a downloading and unpacking

# cd /usr/local/src
# wget http://monkey.org/~provos/libevent-1.3b.tar.gz
# tar zxvf libevent-1.3b.tar.gz
# cd libevent-1.3b

a.2b. configuring

# ./configure
check the output, if it contains something like “configure: error: no acceptable C compiler found in $PATH” -> a.2c. otherwise a.2d.

a.2c. compiling

# apt-get install gcc

Redo a.2b.
I got output like “C compiler cannot create executables”, reading file ‘config.log’ did not help me at all. Googling finally did, as I found a forum entry, pointing out a missing lib.
So try this:

# apt-get install libc-dev

Redo a.2b.
If that did  not solve it… sorry … google on, there is no sense in going on without solving this issue. :-/

a.2d. make it!

# make && make install

If you get something like “-bash: make: command not found” -> A.2e, otherwise A.3.

a.2e.

# apt-get install make

Redo a.2d.

a.3. configuration

Press the Esc key as you read [esc] in the commands below.

# vim /etc/ld.so.conf.d/libevent-i386.conf
# i/usr/local/lib/[esc]:wq
# ldconfig

b. install memchached and verify installation

b.1. download, unpack and install memchached

# cd /usr/local/src
# wget http://danga.com/memcached/dist/memcached-1.2.2.tar.gz
# tar zxvf memcached-1.2.2.tar.gz
# cd memcached-1.2.2
# ./configure
# make && make install

After installing gcc and libc-dev in section a, this one went easily for me – if you skipped section a and run in problems here, please install gcc and libc-dev (see a.2c).

b.2. verify installation of memchached

b.2a. start memchached server

# memcached -u www-data -vv

Output should end with line “<3 server listening”. Perfect! :)

b.2b test server

I will refer to this shell in front of you as server shell below. Now, open another shell on the same machine, I will refer to it a client shell.

# telnet localhost 11211

You should see something like “<7 new client connection” on the server shell, switch back to client shell.

# set test1 1 10000 1
# a

You should see “STORED” on client shell and the two following lines on server shell
“<7 set test1 1 10000 1
>7 STORED”

Perfect!
You did it, your memcached is up and running :)

c. memcached and Java

I wrote a little test package using a Java client library for memcached from here, together with junit and ant. You can download it to have a look how simple using memcache is and to verify your installation with an included  junit test, automated with an ant build file.

oidviz

What we do here in the Okkam project, is creating an global infrastructure, allowing to give an unique name to anything. We called it ENS (Entity Name System), inspired by the DNS (Domain Name System). Why? Because having everything named and all occurrences in a document annotated with this name makes data integration as easy as pie. But names in a computer science environment are URIs and those are not human-readable by default. For example http://www.okkam.org/entity/ok923bf64b-3edf-4d0a-baf8-592db9f55689 is my name! :) – for sure no one is able nor willing to memorize this. As a first approach to this, I created a little PHP script, that can produce an image representing those names, or ENS identifiers or Okkam IDs (in short OID)  as we call them. This resulting image should be much easier to be remembered an recognized.

representation for http://www.okkam.org/entity/ok923bf64b-3edf-4d0a-baf8-592db9f55689, that is me
representation for http://www.okkam.org/entity/ok42fe5511-c177-435a-8cf7-18b6a881d8b7, a friend and colleague of mine

The upper one represents me and the one below Stefano Bortoli, a friend and colleague of mine. Several dimensions have been used, like color, size, position and line-width. As a next step, besides improving creation speed, patterns and shapes could be introduced and even motion by exchanging the PNG image either with an old-fashioned animated GIF or a Flash animation. Integration is kept as simple as it can be, e.g. by simply inserting <img src=”http://okkam.dit.unitn.it/oidviz/?oid=[put your ID here]“/> into your XHTML page. The PHP script returns a bit stream, as if you would load an existing image directly from a server but instead it is created on-the-fly.

education portal for the city of Augsburg

screenshot: list view
screenshot: list view
screenshot: list view

A new portal has been launched for the city of Augsburg. It is meant to be a central platform about all kind of information and events concerning education in and around Augsburg (Germany). Different layouts have been created in the course of a seminar, the one to be realized, has been chosen by a person in charge of the municipality. Two students of the “winning” team and myself, we formed a team, got a work contract by the municipality and implemented the website on the basis of the Typo3 CMS within one year, besides our studies.

» go to see the website »