Shoutbox

Coding some c. (FFmpeg/libavcodec) - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Coding some c. (FFmpeg/libavcodec) (/showthread.php?tid=88948)

Coding some c. (FFmpeg/libavcodec) by roflmao456 on 02-04-2009 at 07:41 AM

I'm trying to put in libavcodec but the compiler (gcc) is always saying "undefined reference to `avcodec_init'" or any other avcodec function :/

Everything compiles properly but it just comes to a stop when I call a libavcodec function.

Everything is set up properly I hope..

c code:
#include <stdio.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>

int main(){
// example code .. but i hope you know what i mean
avcodec_init();
av_register_all();
}

If anyone can help me that would be great :happy:

My makefile has the -lavcodec and -lavformat in it.
I searched Google for two hours...
RE: Coding some c. (FFmpeg/libavcodec) by roflmao456 on 02-06-2009 at 01:36 AM

ok, i managed to compile it successfully and now it won't load at all o_o

(PSP btw.)


RE: Coding some c. (FFmpeg/libavcodec) by TheSteve on 02-09-2009 at 01:03 AM

Have you compiled FFmpeg for the PSP's processor? (rather than the typical intel processor)


RE: Coding some c. (FFmpeg/libavcodec) by roflmao456 on 02-09-2009 at 05:12 AM

quote:
Originally posted by TheSteve
Have you compiled FFmpeg for the PSP's processor? (rather than the typical intel processor)
I don't know, I just svn download, ./configure --enable-shared, make :P

I looked up the error that the PSP was spitting out and it was "Library not found" o_O
RE: Coding some c. (FFmpeg/libavcodec) by TheSteve on 02-09-2009 at 03:01 PM

For it to work on the PSP, you need to compile the library in a machine language that the PSP understands.  Which means you'll need to either need to figure out how hack the package in to use the psptoolchain, or find someone else who's already ported the library to the PSP.

If it's a static library which will be linked in to a PSP executable, it might be possible to use the MIPS instruction set option for configure, but it may not work.

If it's a shared library, then you're going to have to do some work to convert it to a prx library.


RE: Coding some c. (FFmpeg/libavcodec) by roflmao456 on 02-12-2009 at 03:18 AM

i see. I'll try and find a port. Thanks