Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Linux and software for Linux (http://stream-recorder.com/forum/forumdisplay.php?f=61)
-   -  

Install PyGame and PyMedia in Ubuntu 9.10 Karmic Koala

(http://stream-recorder.com/forum/showthread.php?t=6371)

Stream Recorder 04-18-2010 11:54 PM

Install PyGame and PyMedia in Ubuntu 9.10 Karmic Koala


 
Code:

sudo apt-get install python-dev libmp3lame-dev libogg-dev libvorbis-dev libfaad-dev libasound2-dev python-pygame
Download pymedia and extract it.

I downloaded and extracted pymedia-1.3.7.3.tar.gz. Then edited
audio/acodec/acodec.c file and on line 31 inserted the following
Code:

#define HAVE_LRINTF
So that you I had
Code:

#include <libavcodec/avcodec.h>
#define HAVE_LRINTF
#include "libavcodec/dsputil.h"
#include "version.h"

But when I was trying to build PyMedia, I was getting the following error:
Code:

In file included from audio/acodec/acodec.c:31:
audio/libavcodec/dsputil.h:484: error: static declaration of ‘lrintf’ follows non-static declaration

So I commented out the code in audio/libavcodec/dsputil.h
Code:

//#ifndef HAVE_LRINTF
/* XXX: add ISOC specific test to avoid specific BSD testing. */
/* better than nothing implementation. */
/* btw, rintf() is existing on fbsd too — alex */
//static inline long int lrintf(float x)
//{
//#ifdef CONFIG_WIN32
// /* XXX: incorrect, but make it compile */
// return (int)(x);
//#else
// return (int)(rint(x));
//#endif
//}
//#endif

Note sure whether this is critical or not, but at least I was able to compile.

After that I didn't have any problem building PyMedia
Code:

python setup.py build
Then install PyMedia:
Code:

sudo apt-get install checkinstall
sudo checkinstall python setup.py install



All times are GMT -6. The time now is 12:08 AM.