[Live-devel] On the fly decoding
Ross Finlayson
finlayson at live.com
Wed Mar 31 03:01:12 PST 2004
>testMPEG1or2VideoReceiver.o(.text+0x162): In function
>`main': : undefined reference to `video_decode(char*)'
>collect2: ld returned 1 exit status
>make: *** [testMPEG1or2VideoReceiver] Error 1
>
>Why do I have this answer?
Probably because "video_decode()" is a C function that's being called from
within C++ code. To fix this...
>#include "decoder.h"
Change this to:
extern "C" {
#include "decoder.h"
}
>....
>sessionState.sink->startPlaying(*sessionState.source,
>afterPlaying, NULL);
>
>env->taskScheduler().doEventLoop();
>
>video_decode("test.mpg"); // RR
Remember that "doEventLoop()" does not return, so your "video_decode()"
function won't get called. To fix this, use a 'watch variable' in the call
to "doEventLoop()". (See the FAQ for more information about this.)
Ross Finlayson
LIVE.COM
<http://www.live.com/>
More information about the live-devel
mailing list