Help - Search - Members - Calendar
Full Version: Compilying mplayer with vorbis support on SL6000L
OESF Forums > General Forums > General Support and Discussion > Software
gab74
Good morning,
i want to compile mplayer with vorbis support ( tremor patch) on SL 6000L ( i search but i didnt find any version running on SL6000L !!!)

On the web i find this patch :

********************************************************************************
****
diff -ubr MPlayer-0.90pre8.orig/configure MPlayer-0.90pre8/configure
--- MPlayer-0.90pre8.orig/configure Tue Sep 17 15:47:55 2002
+++ MPlayer-0.90pre8/configure Sat Nov 9 15:53:11 2002
@@ -3393,11 +3394,11 @@
#include <vorbis/codec.h>
int main(void) { vorbis_packet_blocksize(0,0); return 0; }
EOF
- cc_check -lvorbis -logg -lm && _vorbis=yes
+ cc_check -lvorbisidec -lm && _vorbis=yes
fi
if test "$_vorbis" = yes ; then
_def_vorbis='#define HAVE_OGGVORBIS 1'
- _ld_vorbis='-lvorbis -logg'
+ _ld_vorbis='-lvorbisidec'
_codecmodules="libvorbis $_codecmodules"
else
_def_vorbis='#undef HAVE_OGGVORBIS'
diff -ubr MPlayer-0.90pre8.orig/libmpcodecs/ad_libvorbis.c MPlayer-0.90pre8/libmpcodecs/ad_libvorbis.c
--- MPlayer-0.90pre8.orig/libmpcodecs/ad_libvorbis.c Sat Aug 31 09:09:23 2002
+++ MPlayer-0.90pre8/libmpcodecs/ad_libvorbis.c Fri Nov 8 11:40:36 2002
@@ -19,7 +19,7 @@

LIBAD_EXTERN(libvorbis)

-#include <vorbis/codec.h>
+#include <tremor/ivorbiscodec.h>

// This struct is also defined in demux_ogg.c => common header ?
typedef struct ov_struct_st {
@@ -121,11 +121,25 @@
return CONTROL_UNKNOWN;
}

+static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
+ int tmp;
+ asm volatile("subs %1, %0, #32768\n\t"
+ "movpl %0, #0x7f00\n\t"
+ "orrpl %0, %0, #0xff\n"
+ "adds %1, %0, #32768\n\t"
+ "movmi %0, #0x8000"
+ : "+r"(x),"=r"(tmp)
+ :
+ : "cc");
+ return(x);
+}
+
+
static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
{
int len = 0;
int samples;
- float **pcm;
+ ogg_int32_t **pcm;
ogg_packet op;
struct ov_struct_st *ov = sh->context;
op.b_o_s = op.e_o_s = 0;
@@ -148,23 +162,9 @@
for(i=0;i<ov->vi.channels;i++){
ogg_int16_t *convbuffer=(ogg_int16_t *)(&buf[len]);
ogg_int16_t *ptr=convbuffer+i;
- float *mono=pcm[i];
+ ogg_int32_t *mono=pcm[i];
for(j=0;j<bout;j++){
-#if 1
- int val=mono[j]*32767.f;
-#else /* optional dither */
- int val=mono[j]*32767.f+drand48()-0.5f;
-#endif
- /* might as well guard against clipping */
- if(val>32767){
- val=32767;
- clipflag=1;
- }
- if(val<-32768){
- val=-32768;
- clipflag=1;
- }
- *ptr=val;
+ *ptr=CLIP_TO_15(mono[j]>>9);
ptr+=ov->vi.channels;
}
}
diff -ubr MPlayer-0.90pre8.orig/libmpdemux/demux_ogg.c MPlayer-0.90pre8/libmpdemux/demux_ogg.c
--- MPlayer-0.90pre8.orig/libmpdemux/demux_ogg.c Sun Sep 15 18:38:30 2002
+++ MPlayer-0.90pre8/libmpdemux/demux_ogg.c Sat Nov 9 15:49:58 2002
@@ -12,8 +12,8 @@
#include "demuxer.h"
#include "stheader.h"

-#include <ogg/ogg.h>
-#include <vorbis/codec.h>
+#include <tremor/ogg.h>
+#include <tremor/ivorbiscodec.h>

#define BLOCK_SIZE 4096

@@ -518,7 +518,16 @@
// Check new header
} else if ( (*pack.packet & PACKET_TYPE_BITS ) == PACKET_TYPE_HEADER &&
pack.bytes >= (int)sizeof(stream_header)+1) {
- stream_header *st = (stream_header*)(pack.packet+1);
+ int i;
+ stream_header sst, *st;
+ char* t=(char*) &sst;
+
+ for(i = 0; i < sizeof sst; i++) {
+ t[i] = pack.packet[i+1];
+ }
+
+ st = &sst;
+
/// New video header
if(strncmp(st->streamtype,"video",5) == 0) {
sh_v = new_sh_video(demuxer,ogg_d->num_sub);
********************************************************************************
**************

So i downloaded mplayer090pre 8 and then i've modified the sources....

* Where can i find tremor sources for vorbis support ?
* Is there anything else i've to do before start compiling ?
I compile on my SL6000L with gcc2.95.1 cram fs (DEV_IMG1.3)

I see, most of softtware doesent run on sl6000l so...we have to recompile.....

iS THERE ANY PERSON WHO CAN HELP ME ? so SL6000L community will have a full functional mplayer ?

Any help will be appreciate !

Thanks !!
gab74
I see on http://www.killefiz.de/zaurus/showdetail.php?app=727 that the author say "many thanks to lucho" for his support for compiling mplayer.

If lucho is on this usergroup and will give me some infos i will be very happy.

Thanks....
gab74
mmm..no aswer !
Ok probably this is not the rigth place for this Questions.........
lucho
gab74,

I am still reading the forums, but I don't remember anything particular about compiling mplayer. I remember discussing the compilation on devnet forum, but I couldn't find anything. May be it was the old zauruszone forum...

You can start compiling tremor library (you can get it from xiph.org). You may also need to compile libogg (not sure). You have to check the configure options for mplayer for yourself.

Not much help, sorry ...
gab74
Ok, thank you !

I've compiled lmplayer on my sl6000l but now i wanto to enable tremor....

problem is that source of tremor doesen't have any congiure file but has only a configure.in files .

This need autoconf but i have only gcc 2.95.2 on my zaurus without autoconf....

I've make a new post !

Any helps ?
lucho
Why don't you just install gcc cross compiler on you PC smile.gif It'll make your life so much simpler...
gab74
But with cross compiler i can compile a software on my linux desktop and simply send to Zaurus ???
gab74
i read that Programs that use autoconf might not support cross building and
Programs that use configure might not support cross building....

so i cannot compile mplayer in this way.... is that right ???
lardman
Works most of the time.

First make sure you source the appropriate variables CC, CXX, LINKER, etc. - all the stuff in the standard Sharp env-var.sh file. Then use something like:

./configure --host=arm-linux

There can be problems if the configure script tries to create then execute some code but this can be sorted out by editing the script, etc.


Si
gab74
>First make sure you source the appropriate variables CC, CXX, LINKER, etc. - all the stuff in the >standard Sharp env-var.sh file. Then use something like:

Please can you help me to configure theese variables ???
lardman
Which toolchain will you use?

For my OZ toolchain this is what I have

dev-arm-OZ.sh script:

=======================================
#!/bin/bash

CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-g++
G77=arm-linux-g77
F77=arm-linux-g77

PATH=/usr/local/arm/3.3.2/bin:/usr/local/arm/3.3.2/arm-linux/bin:$PATH

export PATH CC CXX CCX CXXX COMPILER LINKER G77 F77
echo "Altered environment for OZ 3.3.2 Development"
========================================

Note the PATH vairiable will have to be changed if your compiler is supposed to be installed elsewhere (and it does make a difference to the compiler so don't just install it in the above location).

Then 'source dev-arm-OZ.sh', etc.

Si
gab74
toolchain ?

At this moment i do not use anything....
Please can you tell me where i can find all the gcc / software for creating a full cross compiler ?
cmisip
I built my cross compiler gcc 2.95.3 using instructions from here:

http://www.ailis.de/~k/docs/crosscompiling/toolchain.php

except I used the sharp supplied kernel source 2.4.18-rmk7-pxa3 which of course does not need the arm kernel patch anymore.

Be very careful though as you can mess up your system.

There may be prebuilt rpms of toolchains available though. I know for the 5600, there is a prebuilt gcc 2.95.2 toolchain installable via rpms. Don't know about the SL600L.

My pda is a 5600. So follow the instructions at your own risk.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.