顯示具有 MiniDLNA 標籤的文章。 顯示所有文章
顯示具有 MiniDLNA 標籤的文章。 顯示所有文章

2012年10月3日 星期三

[minidlna] How to type minidlna command

[minidlna] How to type minidlna command



minidlna -R -f /tmp/minidlna.conf



# minidlna

[1970/01/01 00:04:53] minidlna.c:778: error: Usage:

        minidlna [-d] [-v] [-f config_file]

                [-a listening_ip] [-p port]

                [-s serial] [-m model_number]

                [-t notify_interval] [-P pid_filename]

                [-w url] [-R] [-V] [-h]



Notes:

        Notify interval is in seconds. Default is 895 seconds.

        Default pid file is /var/run/minidlna.pid.

        With -d minidlna will run in debug mode (not daemonize).

        -w sets the presentation url. Default is http address on port 80

        -h displays this text

        -R forces a full rescan

        -L do note create playlists

        -V print the version number

2012年9月12日 星期三

[MiniDLNA] genconfig.sh must change something

[MiniDLNA] genconfig.sh must change something



#! /bin/sh

# MiniDLNA project

# http://sourceforge.net/projects/minidlna/

#

# MiniDLNA media server

# Copyright (C) 2008-2009  Justin Maggard

#

# This file is part of MiniDLNA.

#

# MiniDLNA is free software; you can redistribute it and/or modify

# it under the terms of the GNU General Public License version 2 as

# published by the Free Software Foundation.

#

# MiniDLNA is distributed in the hope that it will be useful,

# but WITHOUT ANY WARRANTY; without even the implied warranty of

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

# GNU General Public License for more details.

#

# You should have received a copy of the GNU General Public License

# along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.



RM="rm -f"

CONFIGFILE="config.h"

CONFIGMACRO="__CONFIG_H__"



# Database path

DB_PATH="/tmp/minidlna"

# Log path

LOG_PATH="${DB_PATH}"



# detecting the OS name and version

OS_NAME=`uname -s`

OS_VERSION=`uname -r`

TIVO="/*#define TIVO_SUPPORT*/"

NETGEAR="/*#define NETGEAR*/"

READYNAS="/*#define READYNAS*/"

PNPX="#define PNPX 0"



${RM} ${CONFIGFILE}



# Detect if there are missing headers

# NOTE: This check only works with a normal distro

[ ! -e "`pwd`/../../MiniDLNA/usr/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING"

[ ! -e "`pwd`/../../MiniDLNA/usr/include/jpeglib.h" ] && MISSING="libjpeg $MISSING"

[ ! -e "`pwd`/../../MiniDLNA/usr/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING"

[ ! -e "`pwd`/../../MiniDLNA/usr/include/id3tag.h" ] && MISSING="libid3tag $MISSING"

[ ! -e "`pwd`/../../MiniDLNA/usr/include/ogg/ogg.h" ] && MISSING="libogg $MISSING"

[ ! -e "`pwd`/../../MiniDLNA/usr/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING"

[ ! -e "`pwd`/../../MiniDLNA/usr/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING"

[ ! -e "`pwd`/../../MiniDLNA/usr/include/ffmpeg/avutil.h" -a \

  ! -e "`pwd`/../../MiniDLNA/usr/include/libavutil/avutil.h" -a \

  ! -e "`pwd`/../../MiniDLNA/usr/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING"

[ ! -e "`pwd`/../../MiniDLNA/usr/include/ffmpeg/avformat.h" -a \

  ! -e "`pwd`/../../MiniDLNA/usr/include/libavformat/avformat.h" -a \

  ! -e "`pwd`/../../MiniDLNA/usr/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING"

[ ! -e "`pwd`/../../MiniDLNA/usr/include/ffmpeg/avcodec.h" -a \

  ! -e "`pwd`/../../MiniDLNA/usr/include/libavcodec/avcodec.h" -a \

  ! -e "`pwd`/../../MiniDLNA/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING"


if [ -n "$MISSING" ]; then

    echo -e "\nERROR!  Cannot continue."

    echo -e "The following required libraries are either missing, or are missing development headers:\n"

    echo -e "$MISSING\n"

    exit 1

fi



echo "/* MiniDLNA Project" >> ${CONFIGFILE}

echo " * http://sourceforge.net/projects/minidlna/" >> ${CONFIGFILE}

echo " * (c) 2008-2009 Justin Maggard" >> ${CONFIGFILE}

echo " * generated by $0 on `date` */" >> ${CONFIGFILE}

echo "#ifndef $CONFIGMACRO" >> ${CONFIGFILE}

echo "#define $CONFIGMACRO" >> ${CONFIGFILE}

echo "" >> ${CONFIGFILE}



# OS Specific stuff

case $OS_NAME in

    OpenBSD)

        MAJORVER=`echo $OS_VERSION | cut -d. -f1`

        MINORVER=`echo $OS_VERSION | cut -d. -f2`

        #echo "OpenBSD majorversion=$MAJORVER minorversion=$MINORVER"

        # rtableid was introduced in OpenBSD 4.0

        if [ $MAJORVER -ge 4 ]; then

            echo "#define PFRULE_HAS_RTABLEID" >> ${CONFIGFILE}

        fi

        # from the 3.8 version, packets and bytes counters are double : in/out

        if [ \( $MAJORVER -ge 4 \) -o \( $MAJORVER -eq 3 -a $MINORVER -ge 8 \) ]; then

            echo "#define PFRULE_INOUT_COUNTS" >> ${CONFIGFILE}

        fi

        OS_URL=http://www.openbsd.org/

        ;;

    FreeBSD)

        VER=`grep '#define __FreeBSD_version' /opt/3_5/puma5-toolchain/usr/armeb-unknown-linux-uclibcgnueabi/sysroot/usr/include/sys/param.h | awk '{print $3}'`

        if [ $VER -ge 700049 ]; then

            echo "#define PFRULE_INOUT_COUNTS" >> ${CONFIGFILE}

        fi

        OS_URL=http://www.freebsd.org/

        ;;

    pfSense)

        # we need to detect if PFRULE_INOUT_COUNTS macro is needed

        OS_URL=http://www.pfsense.com/

        ;;

    NetBSD)

        OS_URL=http://www.netbsd.org/

        ;;

    SunOS)

        echo "#define USE_IPF 1" >> ${CONFIGFILE}

        echo "#define LOG_PERROR 0" >> ${CONFIGFILE}

        echo "#define SOLARIS_KSTATS 1" >> ${CONFIGFILE}

        echo "typedef uint64_t u_int64_t;" >> ${CONFIGFILE}

        echo "typedef uint32_t u_int32_t;" >> ${CONFIGFILE}

        echo "typedef uint16_t u_int16_t;" >> ${CONFIGFILE}

        echo "typedef uint8_t u_int8_t;" >> ${CONFIGFILE}

        OS_URL=http://www.sun.com/solaris/

        ;;

    Linux)

        OS_URL=http://www.kernel.org/

        KERNVERA=`echo $OS_VERSION | awk -F. '{print $1}'`

        KERNVERB=`echo $OS_VERSION | awk -F. '{print $2}'`

        KERNVERC=`echo $OS_VERSION | awk -F. '{print $3}'`

        KERNVERD=`echo $OS_VERSION | awk -F. '{print $4}'`

        #echo "$KERNVERA.$KERNVERB.$KERNVERC.$KERNVERD"

        # NETGEAR ReadyNAS special case

        if [ -f /etc/raidiator_version ]; then

            OS_NAME=$(awk -F'!!|=' '{ print $1 }' /etc/raidiator_version)

            OS_VERSION=$(awk -F'!!|[=,.]' '{ print $3"."$4 }' /etc/raidiator_version)

            OS_URL="http://www.readynas.com/"

            LOG_PATH="/var/log"

            DB_PATH="/var/cache/minidlna"

            TIVO="#define TIVO_SUPPORT"

            NETGEAR="#define NETGEAR"

            READYNAS="#define READYNAS"

            PNPX="#define PNPX 5"

        # Debian GNU/Linux special case

        elif [ -f /etc/debian_version ]; then

            OS_NAME=Debian

            OS_VERSION=`cat /etc/debian_version`

            OS_URL=http://www.debian.org/

            LOG_PATH="/var/log"

            # use lsb_release (Linux Standard Base) when available

            LSB_RELEASE=`which lsb_release 2>/dev/null`

            if [ 0 -eq $? ]; then

                OS_NAME=`${LSB_RELEASE} -i -s`

                OS_VERSION=`${LSB_RELEASE} -r -s`

            fi

        else

            # use lsb_release (Linux Standard Base) when available

            LSB_RELEASE=`which lsb_release 2>/dev/null`

            if [ 0 -eq $? ]; then

                OS_NAME=`${LSB_RELEASE} -i -s`

                OS_VERSION=`${LSB_RELEASE} -r -s`

            fi

        fi

        ;;

    *)

        echo "Unknown OS : $OS_NAME"

        exit 1

        ;;

esac



echo "#define OS_NAME            \"$OS_NAME\"" >> ${CONFIGFILE}

echo "#define OS_VERSION        \"$OS_NAME/$OS_VERSION\"" >> ${CONFIGFILE}

echo "#define OS_URL            \"${OS_URL}\"" >> ${CONFIGFILE}

echo "" >> ${CONFIGFILE}



echo "/* full path of the file database */" >> ${CONFIGFILE}

echo "#define DEFAULT_DB_PATH        \"${DB_PATH}\"" >> ${CONFIGFILE}

echo "" >> ${CONFIGFILE}



echo "/* full path of the log directory */" >> ${CONFIGFILE}

echo "#define DEFAULT_LOG_PATH    \"${LOG_PATH}\"" >> ${CONFIGFILE}

echo "" >> ${CONFIGFILE}



echo "/* Comment the following line to use home made daemonize() func instead" >> ${CONFIGFILE}

echo " * of BSD daemon() */" >> ${CONFIGFILE}

echo "#define USE_DAEMON" >> ${CONFIGFILE}

echo "" >> ${CONFIGFILE}



echo "/* Enable if the system inotify.h exists.  Otherwise our own inotify.h will be used. */" >> ${CONFIGFILE}

if [ -f /opt/3_5/puma5-toolchain/usr/armeb-unknown-linux-uclibcgnueabi/sysroot/usr/include/sys/inotify.h ]; then  # according to where is inotify.h  in cross compile

echo "#define HAVE_INOTIFY_H" >> ${CONFIGFILE}

else

echo "/*#define HAVE_INOTIFY_H*/" >> ${CONFIGFILE}

fi

echo "" >> ${CONFIGFILE}



echo "/* Enable if the system iconv.h exists.  ID3 tag reading in various character sets will not work properly otherwise. */" >> ${CONFIGFILE}

if [ -f /opt/3_5/puma5-toolchain/usr/armeb-unknown-linux-uclibcgnueabi/sysroot/usr/include/iconv.h ]; then

echo "#define HAVE_ICONV_H" >> ${CONFIGFILE}

else

echo -e "\nWARNING!!  Iconv support not found.  ID3 tag reading may not work."

echo "/*#define HAVE_ICONV_H*/" >> ${CONFIGFILE}

fi

echo "" >> ${CONFIGFILE}



echo "/* Enable if the system libintl.h exists for NLS support. */" >> ${CONFIGFILE}

if [ -f /opt/3_5/puma5-toolchain/usr/armeb-unknown-linux-uclibcgnueabi/sysroot/usr/include/libintl.h ]; then

echo "#define ENABLE_NLS" >> ${CONFIGFILE}

else

echo "/*#define ENABLE_NLS*/" >> ${CONFIGFILE}

fi

echo "" >> ${CONFIGFILE}



echo "/* Enable NETGEAR-specific tweaks. */" >> ${CONFIGFILE}

echo "${NETGEAR}" >> ${CONFIGFILE}

echo "/* Enable ReadyNAS-specific tweaks. */" >> ${CONFIGFILE}

echo "${READYNAS}" >> ${CONFIGFILE}

echo "/* Compile in TiVo support. */" >> ${CONFIGFILE}

echo "${TIVO}" >> ${CONFIGFILE}

echo "/* Enable PnPX support. */" >> ${CONFIGFILE}

echo "${PNPX}" >> ${CONFIGFILE}

echo "" >> ${CONFIGFILE}



echo "#endif" >> ${CONFIGFILE}



exit 0

[MiniDLNA] Makefile must change something

[MiniDLNA] Makefile must change something



# $Id: Makefile,v 1.31 2011/04/21 08:50:44 jmaggard Exp $

# MiniDLNA project

# http://sourceforge.net/projects/minidlna/

# (c) 2008-2009 Justin Maggard

# for use with GNU Make

# To install use :

# $ DESTDIR=/dummyinstalldir make install

# or :

# $ INSTALLPREFIX=/usr/local make install

# or :

# $ make install

#

#CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG

#CFLAGS = -Wall -g -Os -D_GNU_SOURCE

CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \

     -I`pwd`/../../MiniDLNA/usr/include/ \

     -I`pwd`/../../MiniDLNA/usr/include/ffmpeg \

     -I`pwd`/../../MiniDLNA/usr/include/libavutil \

     -I`pwd`/../../MiniDLNA/usr/include/libavcodec \

     -I`pwd`/../../MiniDLNA/usr/include/libavformat \

     -I`pwd`/../../MiniDLNA/usr/include/ffmpeg/libavutil \

     -I`pwd`/../../MiniDLNA/usr/include/ffmpeg/libavcodec \

     -I`pwd`/../../MiniDLNA/usr/include/ffmpeg/libavformat \


#STATIC_LINKING: CFLAGS += -DSTATIC

#STATIC_LINKING: LDFLAGS = -static

CC = armeb-unknown-linux-uclibcgnueabi-gcc

RM = rm -f

INSTALL = install



INSTALLPREFIX ?= $(DESTDIR)/usr

SBININSTALLDIR = $(INSTALLPREFIX)/sbin

ETCINSTALLDIR = $(DESTDIR)/etc



BASEOBJS = minidlna.o upnphttp.o upnpdescgen.o upnpsoap.o \

           upnpreplyparse.o minixml.o \

           getifaddr.o daemonize.o upnpglobalvars.o \

           options.o minissdp.o uuid.o upnpevents.o \

           sql.o utils.o metadata.o scanner.o inotify.o \

           tivo_utils.o tivo_beacon.o tivo_commands.o \

           tagutils/textutils.o tagutils/misc.o tagutils/tagutils.o \

           playlist.o image_utils.o albumart.o log.o



ALLOBJS = $(BASEOBJS) $(LNXOBJS)



LIBS = -L`pwd`/../../MiniDLNA/usr/lib/ -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis -lz

#STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm



TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o



EXECUTABLES = minidlna testupnpdescgen



.PHONY:    all clean distclean install depend



all:    $(EXECUTABLES)



clean:

    $(RM) $(ALLOBJS)

    $(RM) $(EXECUTABLES)

    $(RM) testupnpdescgen.o



distclean: clean

    $(RM) config.h



install:    minidlna

    $(INSTALL) -d $(SBININSTALLDIR)

    $(INSTALL) minidlna $(SBININSTALLDIR)

    $(INSTALL) -d $(ETCINSTALLDIR)

    $(INSTALL) --mode=0644 minidlna.conf $(ETCINSTALLDIR)



minidlna:    $(BASEOBJS) $(LNXOBJS)  # At this place have one LIBS, remove it. Because minidlna-1.0.22 don't have this one

    @echo Linking $@

    @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(BASEOBJS) $(LNXOBJS) $(LIBS)





testupnpdescgen:    $(TESTUPNPDESCGENOBJS)

    @echo Linking $@

    @$(CC) $(CFLAGS) -o $@ $(TESTUPNPDESCGENOBJS)



config.h:    genconfig.sh

    ./genconfig.sh



depend:    config.h

    makedepend -f$(MAKEFILE_LIST) -Y \

    $(ALLOBJS:.o=.c) $(TESTUPNPDESCGENOBJS:.o=.c) 2>/dev/null



# DO NOT DELETE



minidlna.o: config.h upnpglobalvars.h minidlnatypes.h

minidlna.o: upnphttp.h upnpdescgen.h minidlnapath.h getifaddr.h upnpsoap.h

minidlna.o: options.h minissdp.h daemonize.h upnpevents.h log.h

upnphttp.o: config.h upnphttp.h upnpdescgen.h minidlnapath.h upnpsoap.h

upnphttp.o: upnpevents.h image_utils.h sql.h log.h icons.c

upnpdescgen.o: config.h upnpdescgen.h minidlnapath.h upnpglobalvars.h

upnpdescgen.o: minidlnatypes.h upnpdescstrings.h log.h

upnpsoap.o: config.h upnpglobalvars.h minidlnatypes.h log.h utils.h sql.h

upnpsoap.o: upnphttp.h upnpsoap.h upnpreplyparse.h getifaddr.h log.h

upnpreplyparse.o: upnpreplyparse.h minixml.h log.h

minixml.o: minixml.h

getifaddr.o: getifaddr.h log.h

daemonize.o: daemonize.h config.h log.h

upnpglobalvars.o: config.h upnpglobalvars.h

upnpglobalvars.o: minidlnatypes.h

options.o: options.h config.h upnpglobalvars.h

options.o: minidlnatypes.h

minissdp.o: config.h upnpdescstrings.h minidlnapath.h upnphttp.h

minissdp.o: upnpglobalvars.h minidlnatypes.h minissdp.h log.h

upnpevents.o: config.h upnpevents.h minidlnapath.h upnpglobalvars.h

upnpevents.o: minidlnatypes.h upnpdescgen.h log.h uuid.h

uuid.o: uuid.h

testupnpdescgen.o: config.h upnpdescgen.h

upnpdescgen.o: config.h upnpdescgen.h minidlnapath.h upnpglobalvars.h

upnpdescgen.o: minidlnatypes.h upnpdescstrings.h

scanner.o: upnpglobalvars.h metadata.h utils.h sql.h scanner.h log.h playlist.h

metadata.o: upnpglobalvars.h metadata.h albumart.h utils.h sql.h log.h

albumart.o: upnpglobalvars.h albumart.h utils.h image_utils.h sql.h log.h

tagutils/misc.o: tagutils/misc.h

tagutils/textutils.o: tagutils/misc.h tagutils/textutils.h log.h

tagutils/tagutils.o: tagutils/tagutils-asf.c tagutils/tagutils-flc.c tagutils/tagutils-plist.c tagutils/tagutils-misc.c

tagutils/tagutils.o: tagutils/tagutils-aac.c tagutils/tagutils-asf.h tagutils/tagutils-flc.h tagutils/tagutils-mp3.c tagutils/tagutils-wav.c

tagutils/tagutils.o: tagutils/tagutils-ogg.c tagutils/tagutils-aac.h tagutils/tagutils.h tagutils/tagutils-mp3.h tagutils/tagutils-ogg.h log.h

playlist.o: playlist.h

inotify.o: inotify.h playlist.h

image_utils.o: image_utils.h

tivo_utils.o: config.h tivo_utils.h

tivo_beacon.o: config.h tivo_beacon.h tivo_utils.h

tivo_commands.o: config.h tivo_commands.h tivo_utils.h utils.h

utils.o: utils.h

sql.o: sql.h

log.o: log.h



.SUFFIXES: .c .o



.c.o:

    @echo Compiling $*.c

    @$(CC) $(CFLAGS) -o $@ -c $< && exit 0;\

        echo "The following command failed:" 1>&2;\

        echo "$(CC) $(CFLAGS) -o $@ -c $<";\

        $(CC) $(CFLAGS) -o $@ -c $< &>/dev/null

2012年9月5日 星期三

[MiniDLNA][ubuntu] How to install MiniDLNA package in Ubuntu 10.04

Install in Ubuntu10.04

%%%%%%%%%%%%%%%%%%%%%%%%

sqlite3:

sqlite-autoconf-3071300

http://www.sqlite.org/download.html

If can't make. rm the folder of sqlite3.

tar again. Excute configure again.



./configure --prefix=/home/freeman/happy/usr/ --enable-shared



--enable-shared (Share library for other source can use)



A static library(.a) is a library that can be linked directly into the final executable produced by the linker,it is contained in it and there is no need to have the library into the system where the executable will be deployed.



A shared library(.so) is a library that is linked but not embedded in the final executable, so will be loaded when the executable is launched and need to be present in the system where the executable is deployed.



Reference:

http://stackoverflow.com/questions/9688200/difference-between-shared-objects-so-static-libraries-a-and-dlls-so

%%%%%%%%%%%%%%%%%%%%%

jpeg

jpegsrc.v8d

jpegsrc.v6b

http://www.ijg.org/

http://libjpeg.sourceforge.net/

./configure --prefix=/home/freeman/happy/usr/ --enable-shared



%%%%%%%%%%%%%%%%%%

Before install libid3tag

Please install zlib (zlib1g-dev)

zlib

./configure --prefix=/home/freeman/happy/usr/ --sharedlibdir=/home/freeman/happy/usr/



###############################

check g++ before install.



libid3tag

libid3tag-0.15.1b

http://t2-project.org/packages/libid3tag.html



./configure --prefix=/home/freeman/happy/usr/ --enable-shared CPPFLAGS=-I/home/freeman/happy/usr/include/ LDFLAGS=-L/home/freeman/happy/usr/lib/



CPPFLAGS=-I/home/freeman/happy/usr/include/ ( indicate where is zlib.h )

LDFLAGS=-L/home/freeman/happy/usr/lib/ ( indicate where is library )

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



libogg

libogg-1.3.0

http://libzplay.sourceforge.net/VORBIS.html  <-- can find ogg vorbis FLAC source code

http://www.xiph.org/ogg/

./configure --prefix=/home/freeman/happy/usr/ --enable-shared

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

libvorbis

libvorbis-1.3.3

http://www.xiph.org/vorbis/

http://www.linuxfromscratch.org/blfs/view/stable/multimedia/libvorbis.html

libvorbis-1.3.3

./configure --prefix=/home/freeman/happy/usr/ --enable-shared

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

FLAC

flac-1.2.0

http://flac.sourceforge.net/download.html

flac-1.2.0 - ubuntu 10.04 OK

./configure --prefix=/home/freeman/happy/usr/ --enable-shared

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

yasm

yasm-1.2.0

http://yasm.tortall.net/Download.html

./configure --prefix=/home/freeman/happy/usr/



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

libexif

libexif-0.6.21

http://libexif.sourceforge.net/

./configure --prefix=/home/freeman/happy/usr/ --enable-shared --enable-static



#####################################

exif



./configure --enable-shared --prefix=/home/freeman/happy/usr/ POPT_CFLAGS=-I/home/freeman/happy/usr/include/ POPT_LIBS=-L/home/freeman/happy/usr/lib/  LIBEXIF_CFLAGS=-I/home/freeman/happy/usr/include/libexif/ LIBEXIF_LIBS="-L/home/freeman/happy/usr/lib/ /home/freeman/happy/usr/lib/libexif.so /home/freeman/happy/usr/lib/libpopt.so" --with-libexif="/home/freeman/happy/usr/lib/ /home/freeman/happy/usr/include"



Question 1:

actions.h:24:31: fatal   error: libexif/exif-data.h: No such file or directory

Answer 1:

copy libexif which under /home/freeman/happy/usr/include/ to exif-0.6.21/libjpeg



Question 2:

/home/freeman/happy/usr/include/iconv.h:25:20: error: _types.h: No such file or directory

Answer 2:

libiconv

iconv.h

http://www.gnu.org/software/libiconv/#downloading



./configure --prefix=/home/freeman/happy/usr/ --enable-shared



Question 3:

main.c:41:18: error: popt.h: No such file or directory



Answer 3:

Install popt-1.16.tar.gz

./configure --prefix=/home/freeman/happy/usr/ --enable-shared



Question 4:

Test each module



Answer 4:

gedit Makefile

Goto 278

SUBDIRS = exif

#SUBDIRS = m4m po libjpeg exif test



Question 5:

Why can't find some function which in libexif and libpopt.

Answer 5:

After compile libexif and libpopt.

I make install into /home/freeman/happy/usr/.

The library of libexif is in /home/freeman/happy/usr/lib/libexif.so.

The library of libpopt is in /home/freeman/happy/usr/lib/libpopt.so.

I must use shared library(.so) that can compiler successfully.



LIBEXIF_LIBS = "-L/home/freeman/happy/usr/lib/ /home/freeman/happy/usr/lib/libexif.so /home/freeman/happy/usr/lib/libpopt.so"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

ffmpeg

ffmpeg-0.11.1

http://ffmpeg.org/



vim configure

yasmexe_default="/home/freeman/happy/usr/bin/yasm"



./configure --prefix=/home/freeman/happy/usr/ --enable-shared

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



After all of library install.

All folder wii install under /home/freeman/happy/usr/.

There are five folder which is "bin  include  lib  man  share".



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

minidlna



gedit configure

Remove all of the description like below.

Because I don't want to check all of those package.

# Detect if there are missing headers

# NOTE: This check only works with a normal distro

[ ! -e "/usr/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING"

[ ! -e "/usr/include/jpeglib.h" ] && MISSING="libjpeg $MISSING"

[ ! -e "/usr/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING"

[ ! -e "/usr/include/id3tag.h" ] && MISSING="libid3tag $MISSING"

[ ! -e "/usr/include/ogg/ogg.h" ] && MISSING="libogg $MISSING"

[ ! -e "/usr/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING"

[ ! -e "/usr/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING"

[ ! -e "/usr/include/ffmpeg/avutil.h" -a \

  ! -e "/usr/include/libavutil/avutil.h" -a \

  ! -e "/usr/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING"

[ ! -e "/usr/include/ffmpeg/avformat.h" -a \

  ! -e "/usr/include/libavformat/avformat.h" -a \

  ! -e "/usr/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING"

[ ! -e "/usr/include/ffmpeg/avcodec.h" -a \

  ! -e "/usr/include/libavcodec/avcodec.h" -a \

  ! -e "/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING"





gedit Makefile

Find CFLAGS.

Change CFLAGS like below.



#CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG

#CFLAGS = -Wall -g -Os -D_GNU_SOURCE

CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \

     -I/home/freeman/happy/usr/include/ \

     -I/home/freeman/happy/usr/include/ffmpeg \

     -I/home/freeman/happy/usr/include/libavutil

     -I/home/freeman/happy/usr//include/libavcodec

     -I/home/freeman/happy/usr//include/libavformat \

     -I/home/freeman/happy/usr/include/ffmpeg/libavutil \

     -I/home/freeman/happy/usr//include/ffmpeg/libavcodec \

     -I/home/freeman/happy/usr//include/ffmpeg/libavformat \

     -L/home/freeman/happy/usr/lib/ -lexif \

     -L/home/freeman/happy/usr/lib/ -ljpeg \

     -L/home/freeman/happy/usr/lib/ -lsqlite3 \

     -L/home/freeman/happy/usr/lib/ -lavformat \

     -L/home/freeman/happy/usr/lib/ -lavutil \

     -L/home/freeman/happy/usr/lib/ -lavcodec \

     -L/home/freeman/happy/usr/lib/ -lid3tag \

     -L/home/freeman/happy/usr/lib/ -lFLAC \

     -L/home/freeman/happy/usr/lib/ -logg \

     -L/home/freeman/happy/usr/lib/ -lvorbis\

     -L/home/freeman/happy/usr/lib/ -liconv



make --> that include genconfig.sh

so just press make