Wednesday, August 24, 2005

Getting started with Postgresql 8.0.3


Install postgresql using yum:

# yum install postgresql postgresql-server postgresql-devel php-pgsql

Modify /etc/init.d/postgresql to use /home/postgres for the databases and to log to /var/log/postgres

# vi /etc/init.d/postgresql

#if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base/template1" ]
# echo "Using old-style directory structure"
# PGDATA=/var/lib/pgsql/data

Create the data and log dir and set ownership:

# mkdir /home/postgres /var/log/postgres
# chown postgres:postgres /home/postgres /var/log/postgres

Start up postgresql

# service postgresql start

Change the superuser password:

# su - postgres

# psql -d template1 -U postgres -c "alter user postgres with password 'newpassword'"

Now modify pg_hba.conf (/var/lib/pgsql/data/pg_hba.conf):

# "local" is for Unix domain socket connections only
local all all md5
# IPv4 TCP/IP connections
host all all md5

This allows access using the local unix socket or local tcp/ip connection but only for postgresql users.

Restart postgresql: service postgresql restart

Tuesday, August 23, 2005

MOVIESS logo/icon

here's our project's icon..

gawa ni Jenny Cheng yan..astig db?

Jen, minodify ko lang ng konte kc yung circular nde na mapapansin kapag niresize natin into 48px by 48px..:) sana ok lang po..:D

Sunday, August 21, 2005

Status report

Our application just run in nokia 6630.. yey! Though we haven't tried it on the other phones, it's ok we can proceed to the next step at least alam namin na medyo may mapupuntahan na kami. (applause!)

Now, we're looking for someone with nokia 7610. It's not our first priority but sana may makita kami ASAP para matest na rin yung application namin. Pag nagrun yung app namin sa nokia 7610, baka yun na lang bilin namin (IF EVER may pera kami) coz its cheaper. I wonder, kamusta na kaya yung request naming phone sa department.. :D

Next Step: Setup the Server
We decided to use linux as our server since yun yung mas malaking partition sa pc. So we have redhat and debian. kaso when i was just trying to install postgresql as our database daming error na nde ko maintindihan. I tried it again but no to avail. What I am planning is remove na lang yung debian/redhat and mag-install na lang ng fedora. That would be the fastest way I think para maayos na kagad ang server namin.

Progress Report – 2005-Aug-13

posted by LJ

When Jenny and I were just trying to make a program that records video from a mobile phone using the emulator, it displays "Record is null" (or a similar message). We thought that it was just because of the emulator. So we tried it also on a SE k500i and got the same result. We consulted Ms. Avestro regarding our problem. She said that not all Java phones support the MMAPI or only have partial support for it. We tried to come up with a solution and got the following:

1. Use Java and JNI to use C++ and access the camera.
Ms. Avestro told us that she had not encountered such a solution yet. Secondly, we cannot just use a Java phone using this implementation. If ever we go this path, we'll be needing a Symbian phone but this will only make the problem more difficult.
2. Research if we can use other java packages or specifications to achieve our goal.
We researched but couldn't find other technologies for the problem. It seems that J2ME is the only specification or package that can be used for video recording using Java.
3. Use pure C++.
The last option would be to use Symbian's C++ API to control the camera and record video clips. C++ will also be used to make the interface for the application. The downside to this approach is that only Symbian phones will be supported instead of the more common Java-enabled phones.

We have decided to go with option number 3. Ms. Avestro lent us some technical training material for development using the Nokia Series 60 API for C++. Therefore, we have to use a Symbian phone instead of a Java-enabled phone. We're looking for candidate phone units for the project. Right now, we're still deciding on what specific Nokia Series 60 phone to use. The decision probably won't be made until we are sure that we can successfully record video clips using our application. We are currently studying the Nokia training material.

Jenny and I have already done some GUI applications using Nokia's SDK and Emulator. We haven't tried it on a live phone, though. The SDK already has a library for controlling the camera but we're a bit concerned if it will work on a real phone and go back to our previous problem about controlling the camera.

Our lab computer already has the needed applications for mobile development. The installed applications include ActivePerl, Visual Studio 6, Nokia Development Suite and a JRE version 1.3.1 for the Nokia tools.

Saturday, August 13, 2005

ARMI, ARM4 and Thumb

Full article here.

There are currently three build variants for ARM based devices—ARMI, ARM4 and Thumb.

ARMI executables will work with the other two build variants. Typically you should build the ARMI binary executable variant for compatibility with the maximum number of real devices.

ARM4 builds give maximum performance at the expense of increased code size.

Thumb builds will reduce the code size at the expense of a slight reduction in execution speed.

Thursday, August 04, 2005


Media Format: 3gp vs. Mpeg

In our project, we need a streamable media format. Both 3gp and Mpeg are in this form.

Why streamable? Because in streamable format, we do not have to wait until the recording is complete -- we can already transmit, play or save the recorded data while the recording is in progress. No local buffering is required. And this is what we need.

Implementing Video Recording

RecordControl is one of the more difficult controls to provide since it requires a video encoder, preferably capable of real-time encoding. In addition to encoding the video, it should be capable of encoding any related audio stream and ensure that the resulting file or stream has the audio and video streams interleaved and synchronized for later presentation.

If the source stream is already compressed, synchronized, and streamable, then the RecordControl might only need to copy the original stream from the appropriate point in the media and insert any required headers and footers to the stream. This makes the file complete and playable at a later time. In the case of MPEG, all packet headers must be modified with new timestamps. There might be similar issues with other media types. For example, the QuickTime file format requires an index chunk that contains byte positions of individual frames of video. The MMAPI RI does not provide a RecordControl for the MPEG video player.

Note that recording is an optional part of MMAPI. If an implementation does not support recording, it will return null when the user tries to obtain a RecordControl object by using player.getControl("RecordControl"). An implementation might support recording only for a subset of formats. For example, it might support file writing for a WAVE audio player but not for an MPEG video player.