[Live-devel] On the fly decoding
Ross Finlayson
finlayson at live.com
Fri Mar 26 09:03:56 PST 2004
>I added my decode procedure in FileSink code. I
>generally use the following command to compile my
>decode procedure:
>
>gcc -g -O3 -Wall -DHAVE_AV_CONFIG_H -I..
>-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
>-D_GNU_SOURCE -o decoder decoder.c libavcodec.a -lm
>-lz -ldl -lm
>
>What's the way to introduce these references in your
>live/liveMedia/Makefile?
>
>Unfortunately, I found some problems to do this.
>
>Besides, Do I change only this Makefile?
If I were doing this, I *wouldn't* change the existing "FileSink"
implementation, or add anything to the "liveMedia" library. Instead, I
would add your new "decoder" code to the Makefile that builds the actual
*application*.
Suppose, for example, that you wanted to modify the
"testMPEG1or2VideoReceiver" to use your "decoder". To do this, I would
edit "testProgs/Makefile.tail" as follows:
1/ Add
decoder.$(OBJ)
to the end of the
MPEG_1OR2_VIDEO_RECEIVER_OBJS =
line, so that it becomes:
MPEG_1OR2_VIDEO_RECEIVER_OBJS = testMPEG1or2VideoReceiver.$(OBJ)
decoder.$(OBJ)
2/ Add
-lm -lz -ldl -lm
to the end of the
LIBS =
line, so that it becomes
LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION) -lm -lz -ldl -lm
3/ Then, in "testMPEG1or2VideoReceiver.cpp", replace "FileSink" with the
name of your modified class.
4/ Then, in the parent directory, re-run
genMakefiles <your-os-type>
You should then be able to run "make" in the "testProgs" directory, to
build your modified version of "testMPEG1or2VideoReceiver".
I hope this helps.
Ross Finlayson
LIVE.COM
<http://www.live.com/>
More information about the live-devel
mailing list