OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: bastichelaar on August 17, 2004, 05:57:43 pm

Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 17, 2004, 05:57:43 pm
Hello everybody, I'm trying to compile Xine with vidix support. Therefore, I need the original w100api.h driver. I already have w100_vid.c and w100fake_api.h, but there must be more files on this earth... Documentation or tips are welcome too!

I'm also searching for the included vidix.h file, the original. Please mail me or post the files!

I already have compiled Xine without vidix support, but it doesn't run smooth fullscreen. Windowed it plays very well! See this screenshot:
Title: Mplayer w100 api files needed...
Post by: doublec on August 17, 2004, 07:52:32 pm
vidix.h is available from the mplayer source distribution in main/vidix/vidix.h.

Chris.
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 17, 2004, 08:43:38 pm
I know, it's also included in the Xine library. I have compiled xine a couple of times with w100_vid.so, but it keeps complaining about references to AtiCore_******. Is there anyone who tried this before?
Title: Mplayer w100 api files needed...
Post by: doublec on August 17, 2004, 11:08:44 pm
The aticore functions are located in libqte.so. Make sure you are linking against libqte. When building mplayer with the w100 driver I modify the vidix makefile to have the following:

W100_VID=w100_vid.so
W100_SRCS=w100_vid.c
W100_OBJS=w100_vid.o
W100_LIBS=-L$(QPEDIR)/lib -lqte -ljpeg
W100_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..

It's the W100_LIBS line that I change to include -lqte.

Chris.
Title: Mplayer w100 api files needed...
Post by: mh on August 18, 2004, 01:20:32 am
Hi guys

I also gave mplayer-vidix a shot and ended up with vidix support but no scaling. The image was also rotated and I could not really find any way to rotate it back using the API (hw accel). The API for w100 isn't as documented as one would like (execpt for the header file that some people hacked).

I am quite curious to which w100_vid.c file you are using? I downloaded one of the japanese ones and couldn't get it working so I started to code my own. (I think there was a link to it in one of the previous messages in another thread by doublec)

Maybe we could cooperate on this one to get both mplayer and xine woirking? I guess the vidix driver should be the same for both of them.

BR

Marcus
Title: Mplayer w100 api files needed...
Post by: doublec on August 18, 2004, 01:40:25 am
I'm pretty sure I'm using the one from the japanese site but I've hacked around on it a little. I got things works reasonably well in the framebuffer except it wouldn't do qvga if I recall correctly. In X thought I got the problems of the rotation. I'm happy to collobarate on getting a working solution. The original video player on the Sharp ROM is amazing in terms of quality and it would be nice to get somewhere there.

What does kino2 do? Does that use the vidix driver or any ATI acceleration?
Title: Mplayer w100 api files needed...
Post by: mh on August 18, 2004, 03:32:53 am
It was awhile since I ran standard ROMs but I think kino2 uses the QVGA mode. When speaking of it, I couldn't either switch to QVGA and plot there. Could there be some problems in the libs we are using or are we not using it correctly?

/mh
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 18, 2004, 07:11:42 am
I am now compiling Xine with vidix support. Hopefully the linking against libqte is correctly...
Title: Mplayer w100 api files needed...
Post by: alan on August 19, 2004, 04:22:26 am
This is _just_ a question.

Found this on xine website :

Quote
libdvdcss 1.2.8 provided here is patched with network support. this makes possible to watch dvds from a remote dvdrom drive.

IF you make xine work properly and IF you COULD  get this network support ok, would it mean that i could watch a dvd on a Z ? Is it powerfull engouh ?
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 19, 2004, 05:37:41 am
I hope so... if I only get that d*mn vidix-support working
Title: Mplayer w100 api files needed...
Post by: alan on August 19, 2004, 10:34:49 am
bastichelaar :

i think you already read this :

http://forums.projectmayo.com/viewtopic.ph...c=6562&forum=23 (http://forums.projectmayo.com/viewtopic.php?topic=6562&forum=23)
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 19, 2004, 12:09:29 pm
Thanks for your suggestion, I've already read that topic. More important, w100_vid.c needs to be compiled against libqpe (-lqpe), but I don't have that file. Do I really have to compile qt-embedded to get it? Or does anyone have that library?
Title: Mplayer w100 api files needed...
Post by: doublec on August 19, 2004, 07:22:02 pm
Compiling QT embedded won't get you those library functions. They are proprietary extensions used by Sharp I believe. You'll find the required library to link against in the pdaxrom SDK.
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 19, 2004, 07:49:47 pm
not libqpe.so... Anyway, I gave up compiling xine. I just installed VLC (for Linux Familiar), and I think it has more future. If there is only anyone who can maintain the project...
Title: Mplayer w100 api files needed...
Post by: doublec on August 19, 2004, 09:38:09 pm
libqte is what you want:


cd /opt/arm/3.3.2/armv5tel-cacko-linux/lib
grep -b AtiCore *
Binary file libqte.so matches
Binary file libqte.so.2 matches
Binary file libqte.so.2.3 matches
Binary file libqte.so.2.3.2 matches

It's definitely there.
Title: Mplayer w100 api files needed...
Post by: doublec on August 19, 2004, 10:21:32 pm
alan, thanks for the forum link. I hadn't seen that before. That lead me to downloading the PocketMVP source here: http://home.adelphia.net/~mdukette/kits/PocketMVP_source.zip (http://home.adelphia.net/~mdukette/kits/PocketMVP_source.zip)

In the ATI.cpp file from that source is some code that uses the ATI w100 functions. Some analysis of this might help debugging the problems with the vidix driver.

Chris.
Title: Mplayer w100 api files needed...
Post by: alan on August 20, 2004, 02:19:29 am
doublec : No pb  

bastichelaar : sorry to give you this, but it looks like VLC won't work on pdaxrom

https://www.oesf.org/forums/inde...?showtopic=4345 (https://www.oesf.org/forums/index.php?showtopic=4345)
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 20, 2004, 03:40:47 am
Try to download the package for the yopy... VLC works pretty good! I tried to download the newer version for ipaq, but it kept complaining about glibc 2.3... Which version does rc2 have?
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 23, 2004, 07:09:38 am
We need somebody with the time and the knowledge to optimise the driver. I would like to know which command Kino2 invokes to run mplayer... Where are the developers? I will donate €50 to the one who makes mplayer run perfectly...

HELP US!
Title: Mplayer w100 api files needed...
Post by: XorA on August 23, 2004, 10:49:32 am
At a guess a combo of these options (obtained directly from kino2 binary)

/usr/local/bin/mplayer
-identify
-slave
-really-quiet
-framedrop
Or =
fbdev:vidix
fbdev
-double
-vop
rotate=1
-geometry
50%:50%
flip=yes,mirror=yes
rotate=1,scale=-2:
scale=
%d%%:%d%%
x =
y =
w =
h =
-cache
-bandwidth
-sws
seek -5
seek +5
seek +1
seek -1
seek +10
seek -10

Graeme
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 23, 2004, 02:16:48 pm
I've installed the Cacko rom, just to find out what command mplayer invokes. It seems that Kino2 adds an extra option -dr, to enable direct rendering. Maybe this is possible with X11 ROM?
Title: Mplayer w100 api files needed...
Post by: alan on August 23, 2004, 03:15:52 pm
i'll test whatever you want me to.

just give me instructions.

I've already tried many files from 'Pocket movies' without any trouble but first it was mpg1, second it was outside of X...

I'm not sure of what you want to do, but i guess it might be something useful.
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 23, 2004, 03:20:12 pm
Try:

mplayer -slave -vo fbdev:vidix -framedrop -really-quiet -fbmode qvga -dr -vm -double -geometry 50%:50% -vop rotate=1

And tell us...
Title: Mplayer w100 api files needed...
Post by: alan on August 23, 2004, 03:40:24 pm
  eergh...  

tried this inside x :
- complained about not finding /home/root/.mplayer/codecs.conf
- complained about not finding /usr/etc/mplayer/codecs.conf
- complained about not finding font.desc
- could not access 'termcap' data base

Tried this outside X :
well, let's say that a reboot was needed in order to find back a 'normal' screen  

this seems to be the best i've tried :

Quote
Here are the steps needed to play videos in 320x240 fullscreen:

1) First, install mplayer from the pdaxrom feed. No other additional software is needed.

2) Next, create the file /etc/fb.modes with the following contents:

mode "qvga"
geometry 320 240 320 240 16
timings 1 2 3 4 5 6 7
endmode

Now, to play your file, you must first exit from X if you're running it (issue 'killall X' in terminal). You can only play fullscreen video from the console at the moment.

3) When you're in console, run mplayer with the following command:

mplayer -vo fbdev -fbmode qvga -vm -ac mad file.avi

assuming 'file.avi' is the file you want to play.
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 23, 2004, 03:43:08 pm
I know that works... But I would like to run mplayer from INSIDE X, i.e. make a gui, have a decent player!

Just flashed pdaXrom, so I will continue trying...
Title: Mplayer w100 api files needed...
Post by: doublec on August 23, 2004, 05:21:27 pm
I have hacked at the code for w100_vid.so and have videos playing inside X using mplayer. You need to use the 'xvidix' driver:

  mplayer -vo xvidix -vop rotate=1 file.avi

Unfortunately it still has a number of problems:

1) I haven't been able to get the rotation of the video overlay window to align with the mplayer GUI window. Because the Z in landscape mode is '480x640' and mplayer expects 640x480 things are a bit out of kilter. To fix it I need to have w100_vid.so do the rotation itself but I haven't worked out the AtiCore magic to do this. Anyone know?

2) The X session is 640x480. I want to switch the display to 320x240 (like the qvga fbmode) to not have to scale 320x240 videos. Again, I don't know the AtiCore magic to do this.

3) I can't seem to get stretch blitting to work to scale things up to 640x480. I'm still working on this if I can't get (2) to work.

If anyone is interested I can upload the binary and source to my modified version of the w100_vid driver.

Chris.
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 23, 2004, 05:32:43 pm
Please upload the binary... I just installed pdaXrom (after a try to switch back to Cacko... without success  ), so I would like to give it a try. Upload the binary and the source...
Title: Mplayer w100 api files needed...
Post by: doublec on August 23, 2004, 06:18:33 pm
Binary is at http://www.double.co.nz/zaurus/w100_vid.so.gz (http://www.double.co.nz/zaurus/w100_vid.so.gz). You'll need to unpack it with:

  gunzip w100_vid.so.gz
  cp w100_vid.so /usr/lib/mplayer/vidix

Use like:

  mplayer -vo xvidix -vop rotate=1 file.avi

Only tested and probably only works with videos that are already 320x240 in size. Try other file sizes though. If they don't work you can scale with:

  mplayer -vo xvidix -vop scale=320:240,rotate=1 file.avi

Note this will use software scaling. I haven't worked out how to hardware scale.

Notice how the overlay window is not aligned with the mplayer window.

Source will follow when I get back home (I don't have it on my Z).

Chris.
Title: Mplayer w100 api files needed...
Post by: Xumbi on August 24, 2004, 11:18:44 am
I was playing with this last night.  It sort of worked, the video started to play, but it was so choppy it wasn't watchable.  The weird thing is, now I can't watch videos even outside of X like I always could.  I removed the driver, did a rm -rf ~/.mplayer, reinstalled mplayer, still no luck.  The video starts to play, but it never gets passed the first frame.  
Title: Mplayer w100 api files needed...
Post by: sashz on August 29, 2004, 10:26:38 am
New native SDK will with RC3, cross SDK little later. That includes hacked aticore API header.
In RC3 i moved aticore to shared library for easy to use acceleration from another progrems.
Title: Mplayer w100 api files needed...
Post by: bastichelaar on August 29, 2004, 02:06:16 pm
Wow, that would be cool! If that makes mplayer work, I will donate my 50 euro
Title: Mplayer w100 api files needed...
Post by: alan on August 30, 2004, 12:49:13 pm
just a question to mplayers experts   :

i found this :

Quote
Title: FYI: Streaming on Linux Zaurus
Author(s):
Koshiro Mitsuya
Masafumi Watari
Date: 11/17/2003

Hi,

We has installed MPlayer-w100 adapted Linux Zaurus Screen.  We need
following files to use MPlayer.

  http://www.self-core.org/~kaoru-k/pub/mpla...rc2.1-1_arm.ipk (http://www.self-core.org/~kaoru-k/pub/mplayer-w100_1.0rc2.1-1_arm.ipk)
  http://www.self-core.org/~kaoru-k/pub/libv...1.2.0-1_arm.ipk (http://www.self-core.org/~kaoru-k/pub/libvorbisdec_1.2.0-1_arm.ipk)
  http://kimux.org/liza/arc/libiconv_1.8-2_arm.ipk (http://kimux.org/liza/arc/libiconv_1.8-2_arm.ipk)

We can perform IPv6 HTTP Streaming on Linux Zaurus from IPv6 Web
Server.

  From Zaurus Termial Window application (disabling VGA mode),

  [Zaurus] $ mplayer -vo fbdev:vidix -dr -framedrop -quiet -ac mad -vop rorate=1 http://WEB_SERVER/~mitsuya/hoge.mpg (http://WEB_SERVER/~mitsuya/hoge.mpg)

  The screen dump: http://www.gazongas.net/~mitsuya/note/mobl...803961.87-0.jpg (http://www.gazongas.net/~mitsuya/note/moblog/images/blog-photo-1068803961.87-0.jpg)


thanks,
Koshiro
_______________________________________________
Members mailing list
Members@nautilus6.org
http://www.nautilus6.org/mailman/listinfo/members (http://www.nautilus6.org/mailman/listinfo/members)

at http://www.nautilus6.org/operation/doc/wid...er-setup-00.txt (http://www.nautilus6.org/operation/doc/wide-memo-nautilus6-zaurus-mplayer-setup-00.txt)

Does this work with any  mplayer version available for pdaxrom ? I've no server to test it...
Title: Mplayer w100 api files needed...
Post by: Xumbi on August 31, 2004, 04:17:45 pm
Quote
I was playing with this last night.  It sort of worked, the video started to play, but it was so choppy it wasn't watchable.  The weird thing is, now I can't watch videos even outside of X like I always could.  I removed the driver, did a rm -rf ~/.mplayer, reinstalled mplayer, still no luck.  The video starts to play, but it never gets passed the first frame.   
Well, I reinstalled mplayer and all its dependencies, now videos play fine when I use the -nosound option, but without it I still can't get passed the first frame...

Any ideas?

Update: Here's the output when I try to play the Spiderman 2 trailer with sound from pocketmovies.net (this used to work fine):

Code: [Select]
MPlayer 1.0pre3try2-3.3.2 (C) 2000-2003 MPlayer Team

Reading config file /usr/etc/mplayer/mplayer.confReading config file /home/root/.mplayer/config
Reading /home/root/.mplayer/codecs.conf: Reading /usr/etc/mplayer/codecs.conf: Using built-in default codecs.conf.
font: can't open file: /home/root/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
Using usleep() timing
Could not access the 'termcap' data base.

Playing spiderman2_320x176.mpg.
LMLM4 Stream Format not found
MPEG-PS file format detected.
VIDEO:  MPEG1  320x176  (aspect 1)  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 12000->176400 (96.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 320 x 176 (preferred csp: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
AO: [oss] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Starting playback...
VDec: vo config request - 320 x 176 (preferred csp: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: using unscaled Planar YV12 -> BGR 16-bit special converter
VO: [fbdev] 320x176 => 320x176 BGR 16-bit  [vm]
Another update: I found some .ogm movies over at pocketmatrix.com that work fine. I guess the problem must be with mp3 audio...
Title: Mplayer w100 api files needed...
Post by: ikm on September 01, 2004, 07:45:31 am
Quote
Well, I reinstalled mplayer and all its dependencies, now videos play fine when I use the -nosound option, but without it I still can't get passed the first frame...

Any ideas?
Mplayer uses a floating-point mp3 decoder by default, and it is crawling slow on Z because there is no hardware floating point unit on it. To use a fixed-point decoder, which is quite fast, pass a '-ac mad' option to the mplayer.
Title: Mplayer w100 api files needed...
Post by: Xumbi on September 01, 2004, 04:15:44 pm
Quote
Quote
Well, I reinstalled mplayer and all its dependencies, now videos play fine when I use the -nosound option, but without it I still can't get passed the first frame...

Any ideas?
Mplayer uses a floating-point mp3 decoder by default, and it is crawling slow on Z because there is no hardware floating point unit on it. To use a fixed-point decoder, which is quite fast, pass a '-ac mad' option to the mplayer.
That did it!  I can't believe I forgot that.  Thanks!