./configure
- Usage is:
+ More information on usage is found by running:
- ./configure --help - report all configure options
- ./configure --prefix=[dir] - target install directory (default: /usr/local)
- ./configure --disable-[mod] - do not compile specified module(s)
- ./configure --[other] - pass through to children
+ ./configure --help
NB: This script must be run to register new services after a CVS checkout
or subsequent update.
function show_help
{
cat << EOF
-Funky non-autotool config script for MLT.
+Non-autotool config script for MLT.
-Options are:
+Help options:
--help - this information
+
+General build options:
+
--prefix=directory - install prefix for path (default: $prefix)
+ --enable-gpl - Enable GPL components
--disable-debug - Compile without debug support (default: on)
--disable-mmx - Compile without MMX support (default: on)
- --enable-gpl - Enable GPL components
--cpu='cpu' - Compile for a specific CPU/architectre (default: none)
+
+Module disables options:
+
EOF
for i in src/modules/*
awk '{ printf( " --disable-%-14.14s- Disable the %s module %s\n", $1, $1, $2 ); }'
echo
+ echo " NOTE: libraries marked [GPL] will not be built unless --enable-gpl is stipulated."
+ echo
}
function build_config
export cpu=
# Iterate through arguments
-for i in $*
+for i in "$@"
do
case $i in
--help ) help=1 ;;
then
[ $help = 0 ] && echo "Configuring `basename $i`:"
pushd src/$i > /dev/null
- ./configure $@
+ ./configure "$@"
[ $? != 0 ] && exit 1
popd > /dev/null
fi
+ src - All project source is provided here
+ framework - The mlt media framework
+ modules - All services are defined here
+ + avformat - libavformat dependent services
+ + bluefish - Bluefish dependent services (*)
+ core - Independent MLT services
+ dv - libdv dependent services
- + ffmpeg - ffmpeg dependent services
- + avformat - libavformat dependent services
- + vorbis - vorbis dependenent services
- + sdl - SDL dependent services
- + resample - libresample dependent services
- + gtk2 - pango and pixbuf dependent services
+ fezzik - A giant (meta) service to load and normalise media
- + westley - Nice and clever XML services
- + vorbis - Ogg Vorbis dependent services
- + xine - Xine-derived sources
- + bluefish - Bluefish dependent services (*)
+ + gtk2 - pango and pixbuf dependent services
+ mainconcept - mainconcept dependent services (*)
- + inigo - A media playing test application
- + valerie - Client API to access the server
- + miracle - The server implementation
+ + normalize - audio normalisation functions (**)
+ + resample - libresample dependent services (**)
+ + sdl - SDL dependent services
+ + vorbis - vorbis dependenent services
+ + westley - Nice and clever XML services
+ + xine - Xine-derived sources (**)
+ albino - A simple console (protocol level) example
+ + inigo - A media playing test application
+ humperdink - A terminal-based example client
+ + miracle - The server implementation
+ tests - Reserved for regression and unit tests
+ + valerie - Client API to access the server
Additional subdirectories may be nested below those shown and should be
documented in their parent.
- (*) Not posted to CVS due to licensing issues.
+ (*) Not posted to CVS due to licensing issues.
+ (**) Contains GPL dependencies or code.
Dependencies
URL: http://www.mainconcept.com
----------- ----------------------------------------------------------
resample libsamplerate 0.15 or later
- URL: http://www.mega-nerd.com/SRC/
+ URL: http://www.mega-nerd.com/SRC/ (GPL)
----------- ----------------------------------------------------------
sdl SDL 1.2 or later.
URL: http://www.libsdl.org
configure script and arguments are accepted and passed through to all
subdirectories.
- Top level usage is:
+ More information on usage is found by running:
- ./configure --help - report all configure options
- ./configure --prefix=[dir] - target install directory (default: /usr/local)
- ./configure --disable-debug - turn off debugging
- ./configure --disable-mmx - turn off MMX usage
- ./configure --cpu='cpu' - tune build for a specific cpu
- ./configure --disable-[mod] - do not compile specified module(s)
- ./configure --[other] - pass through to children
+ ./configure --help
NB: This script must be run to register new services after a CVS checkout
or subsequent update.
none
- ffmpeg (DEPRECATED)
-
- Description
-
- Test case pipe based producer for video and audio.
-
- Constructor Argument
-
- 'file' - produce a/v from file
- v4l - produce a/v from video4linux and dsp device
-
- Initialisation Properties
-
- string video_type - "file" or "v4l"
- string video_file - file or v4l device
- string video_size - WxH of video to produce (default: "")
- int video_loop - loop video until audio exhausted (default: 0)
- string audio_type - "file" or "dsp"
- string audio_file - file or dsp device
- int audio_rate - audio frequency (default: 48000)
- int audio_channels - audio channels (default: 2)
- int audio_track - audio track to use (default: 0)
- int audio_loop - loop audio until video exhausted (default: 0)
- int in - in point
- int out - out point
- double fps - output frames per second (default: 25)
- double aspect_ratio - aspect ratio of video
-
- Read Only Properties
-
- string resource - file or "v4l"
- int end_of_clip - holds 1 when input is exhausted
-
- Dependencies
-
- ffmpeg executable.
-
- Known Bugs
-
- in point setting is broken.
-
- Implementation does not allow fast random access.
-
libdv
Description
include ../../../config.mak
+include config.mak
TARGET = ../libmltavformat.so
filter_avdeinterlace.o \
filter_avresample.o
-CFLAGS += -I../..
+CFLAGS+=-I../..
-LDFLAGS += -lavformat -lavcodec
+LDFLAGS+=-lavformat -lavcodec $(EXTRA_LIBS)
SRCS := $(OBJS:.o=.c)
#!/bin/bash
-if [ "$help" != "1" ]
+if [ "$help" = "1" ]
then
+ cat << EOF
+FFMPEG/avformat options:
+
+ --avformat-shared=path - Link against a shared installation of ffmpeg (default)
+ --avformat-static=path - Link against a static ffmpeg dev tree
+ --avformat-ldextra=libs - Provide additional libs to link with
+
+EOF
+
+else
+ echo > config.mak
+
+ export static_ffmpeg=
+ export shared_ffmpeg=`whereis ffmpeg | cut -f 2 -d' '`
+ export extra_libs=
+
+ if [ "$shared_ffmpeg" != "" ]
+ then
+ # Chop ffmpeg
+ shared_ffmpeg=`dirname $shared_ffmpeg`
+ # Chop bin
+ shared_ffmpeg=`dirname $shared_ffmpeg`
+ fi
+
+ for i in "$@"
+ do
+ case $i in
+ --avformat-static=* ) static_ffmpeg="${i#--avformat-static=}" ;;
+ --avformat-shared=* ) shared_ffmpeg="${i#--avformat-shared=}" ;;
+ --avformat-ldextra=* ) extra_libs="${i#--avformat-ldextra=}" ;;
+ esac
+ done
+
+ if [ "$static_ffmpeg" != "" ]
+ then
+ if [ -d "$static_ffmpeg" ]
+ then
+ echo "CFLAGS+=-I$static_ffmpeg/libavformat -I$static_ffmpeg/libavcodec" >> config.mak
+ echo "LDFLAGS+=-L$static_ffmpeg/libavformat -L$static_ffmpeg/libavcodec" >> config.mak
+ else
+ echo "avformat: Invalid path specified: $static_ffmpeg"
+ touch ../disable-avformat
+ echo 0
+ fi
+ else
+ if [ -d "$shared_ffmpeg/include/ffmpeg" -a -f "$shared_ffmpeg/lib/libavformat.so" ]
+ then
+ echo "CFLAGS+=-I$shared_ffmpeg/include/ffmpeg " >> config.mak
+ echo "LDFLAGS+=-L$shared_ffmpeg" >> config.mak
+ else
+ echo "avformat: No build environment found."
+ touch ../disable-avformat
+ exit 0
+ fi
+ fi
+
+ echo "EXTRA_LIBS=$extra_libs" >> config.mak
cat << EOF >> ../producers.dat
avformat libmltavformat.so
#include <math.h>
// avformat header files
-#include <ffmpeg/avformat.h>
+#include <avformat.h>
typedef struct
{
#include "filter_avresample.h"
// ffmpeg Header files
-#include <ffmpeg/avformat.h>
+#include <avformat.h>
// A static flag used to determine if avformat has been initialised
static int avformat_initialised = 0;
#include <stdlib.h>
// ffmpeg Header files
-#include <ffmpeg/avformat.h>
+#include <avformat.h>
#ifdef USE_MMX
#include "mmx.h"
#include <string.h>
// ffmpeg Header files
-#include <ffmpeg/avformat.h>
+#include <avformat.h>
/** Get the audio.
*/
#include <framework/mlt_frame.h>
// ffmpeg Header files
-#include <ffmpeg/avformat.h>
+#include <avformat.h>
// System header files
#include <stdlib.h>
echo SUBDIRS = `find -type d -maxdepth 1 | grep -v CVS | grep -v "^.$" | sed 's/\.\///'` > make.inc
# Iterate through arguments
-for i in $*
+for i in "$@"
do
case $i in
--disable-* ) touch disable-${i#--disable-} ;;
then
[ "$help" = "0" ] && echo "Configuring modules/$i:"
pushd $i > /dev/null
- ./configure $@
+ ./configure "$@"
[ $? != 0 ] && exit 1
popd > /dev/null
elif [ "$help" = "0" ]
*width = mlt_properties_get_int( properties, "width" );
*height = mlt_properties_get_int( properties, "height" );
+ if ( size == 0 )
+ {
+ *width = mlt_properties_get_int( properties, "normalised_width" );
+ *height = mlt_properties_get_int( properties, "normalised_height" );
+ size = *width * ( *height + 1 );
+ }
+
// Clone if necessary
// NB: Cloning is necessary with this producer (due to processing of images ahead of use)
// The fault is not in the design of mlt, but in the implementation of pixbuf...
{
// Clone our image
uint8_t *copy = mlt_pool_alloc( size );
- memcpy( copy, image, size );
+ if ( image != NULL )
+ memcpy( copy, image, size );
// We're going to pass the copy on
image = copy;
{
snprintf( fullname, 1023, "%s%s", dir_name, de[i]->d_name );
- if ( lstat( fullname, &info ) == 0 &&
- ( S_ISREG( info.st_mode ) || ( strstr( fullname, extension ) && info.st_mode | S_IXUSR ) ) )
+ if ( strstr( fullname, extension ) && lstat( fullname, &info ) == 0 &&
+ ( S_ISREG( info.st_mode ) || info.st_mode | S_IXUSR ) )
{
this->filenames = realloc( this->filenames, sizeof( char * ) * ( this->count + 1 ) );
this->filenames[ this->count ++ ] = strdup( fullname );
if ( this->sdl_screen != NULL )
{
SDL_SetClipRect( this->sdl_screen, &rect );
-
sdl_lock_display();
- this->sdl_overlay = SDL_CreateYUVOverlay( this->width - (this->width % 4), this->height - (this->height % 2 ), SDL_YUY2_OVERLAY, this->sdl_screen );
+ this->sdl_overlay = SDL_CreateYUVOverlay( this->width, this->height, SDL_YUY2_OVERLAY, this->sdl_screen );
sdl_unlock_display();
}
}
this->buffer = this->sdl_overlay->pixels[ 0 ];
if ( SDL_LockYUVOverlay( this->sdl_overlay ) >= 0 )
{
- memcpy( this->buffer, image, width * height * 2 );
+ if ( image != NULL )
+ memcpy( this->buffer, image, width * height * 2 );
SDL_UnlockYUVOverlay( this->sdl_overlay );
SDL_DisplayYUVOverlay( this->sdl_overlay, &this->sdl_screen->clip_rect );
}