[theora-dev] dependencies of the encoder_example.c with the other
files
Conrad Parker
conrad at metadecks.org
Sun Dec 9 21:31:19 PST 2007
On 09/12/2007, janaka priyadarshana <rpjanaka at gmail.com> wrote:
> hi all,
>
> Here i am talking about "ibtheora-1.0alpha7" version.
>
> The Makefile.am that is in the example directory has the following entry for
> compile the encoder_example.c file.
>
> encoder_example_SOURCES = encoder_example.c
> EXTRA_encoder_example_SOURCES = getopt.c getopt1.c getopt.h
>
> but this does not include any file like "dct_encode.c encode.c
> encoder_toplevel.c ".
>
> so i think that to compile the example_encoder.c file it does not need to
> have the abov mentioned sources like dct_encode.c . that means those
> dct_encoding implementations also are with in the example_encoder.c file.
> if so please i wanna know what is the reason for doing this instead of code
> reusing.
Hi Janaka,
the Theora source tarball provides a software "library" called
libtheora. A software library is a way of bundling together commonly
used routines. In the case of Theora, things like the routines in
dct_encode.c are available for use by any application, In fact, all
the source under the lib/ directory in the Theora source tarball is
available through libtheora. In the case of encoder_example, this is
handled by the following line in Makefile.am:
LDADD = ../lib/libtheora.la $(OGG_LIBS)
which says, for everything being built in the example/ directory, to
link against the libtheora.la library that has been built in the lib/
directory. It also says to link against the Ogg encapsulation library,
which is located somewhere else (the build system finds it and calls
it $(OGG_LIBS)).
So, there is no need to directly use the source file dct_encode.c, or
any of the other theora library files, when building encoder_example.
> And also wanna know that how can i test the theora encoder after doing some
> modification to the source code.
Generally you first make sure you can build and run the existing code
(eg. the encoder example). Then you modify the source to do something
different, run it again and hope that it does what you wanted it to do
differently.
If you have any specific ideas about what you would like to modify, we
can help show you how to test if your changes have worked or not.
cheers,
Conrad.
More information about the theora-dev
mailing list