-SUBDIRS = src/framework src/modules src/inigo src/valerie src/miracle src/humperdink
+SUBDIRS = src/framework \
+ src/modules \
+ src/inigo \
+ src/valerie \
+ src/miracle \
+ src/humperdink \
+ src/albino
all clean dist-clean depend install:
list='$(SUBDIRS)'; \
-SUBDIRS = src/framework src/modules src/inigo src/valerie src/miracle src/humperdink
+SUBDIRS = src/framework \
+ src/modules \
+ src/inigo \
+ src/valerie \
+ src/miracle \
+ src/humperdink \
+ src/albino
all clean dist-clean depend install:
list='$(SUBDIRS)'; \
export LD_LIBRARY_PATH=`pwd`/src/framework:\
`pwd`/src/valerie:\
+`pwd`/src/miracle:\
`pwd`/src/modules/bluefish:\
`pwd`/../bluefish/lib:\
`pwd`/../mpeg_sdk_demo/bin:\
`pwd`/../dv_sdk
export PATH=$PATH:\
+`pwd`/src/albino:\
`pwd`/src/inigo:\
`pwd`/src/humperdink:\
`pwd`/src/miracle
--- /dev/null
+TARGET = albino
+
+OBJS = albino.o
+
+CFLAGS = -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic
+
+LDFLAGS = -L ../valerie -L ../miracle -lmiracle -lvalerie
+
+SRCS := $(OBJS:.o=.c)
+
+all: $(TARGET)
+
+$(TARGET): $(OBJS)
+ $(CC) -o $@ $(OBJS) $(LDFLAGS)
+
+depend: $(SRCS)
+ $(CC) -MM $(CFLAGS) $^ 1>.depend
+
+dist-clean: clean
+ rm -f .depend
+
+clean:
+ rm -f $(OBJS) $(TARGET)
+
+ifneq ($(wildcard .depend),)
+include .depend
+endif
--- /dev/null
+/*
+ * albino.c -- Local dv1394d Test Util
+ * Copyright (C) 2002-2003 Ushodaya Enterprises Limited
+ * Author: Charles Yates <charles.yates@pandora.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* System header files */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Application header files */
+#include <miracle/miracle_local.h>
+#include <valerie/valerie_remote.h>
+#include <valerie/valerie_util.h>
+
+char *prompt( char *command, int length )
+{
+ printf( "> " );
+ return fgets( command, length, stdin );
+}
+
+void report( valerie_response response )
+{
+ int index = 0;
+ if ( response != NULL )
+ for ( index = 0; index < valerie_response_count( response ); index ++ )
+ printf( "%4d: %s\n", index, valerie_response_get_line( response, index ) );
+}
+
+int main( int argc, char **argv )
+{
+ valerie_parser parser = NULL;
+ valerie_response response = NULL;
+ char temp[ 1024 ];
+ int index = 1;
+
+ if ( argc > 2 && !strcmp( argv[ 1 ], "-s" ) )
+ {
+ printf( "DV1394D Client Instance\n" );
+ parser = valerie_parser_init_remote( argv[ 2 ], 5250 );
+ response = valerie_parser_connect( parser );
+ index = 3;
+ }
+ else
+ {
+ printf( "DV1394D Standalone Instance\n" );
+ parser = miracle_parser_init_local( );
+ response = valerie_parser_connect( parser );
+ }
+
+ if ( response != NULL )
+ {
+ /* process files on command lines before going into console mode */
+ for ( ; index < argc; index ++ )
+ {
+ valerie_response_close( response );
+ response = valerie_parser_run( parser, argv[ index ] );
+ report( response );
+ }
+
+ while ( response != NULL && prompt( temp, 1024 ) )
+ {
+ valerie_util_trim( valerie_util_chomp( temp ) );
+ if ( !strcmp( temp, "BYE" ) )
+ {
+ break;
+ }
+ else if ( strcmp( temp, "" ) )
+ {
+ valerie_response_close( response );
+ response = valerie_parser_execute( parser, temp );
+ report( response );
+ }
+ }
+ }
+ else
+ {
+ fprintf( stderr, "Unable to connect to a dv1394 instance.\n" );
+ }
+
+ printf( "\n" );
+ valerie_parser_close( parser );
+
+ return 0;
+}
this->child = child;
if ( mlt_service_init( service, this ) == 0 )
{
+ mlt_properties properties = mlt_transition_properties( this );
+
service->get_frame = transition_get_frame;
+
+ mlt_properties_set_timecode( properties, "in", 0 );
+ mlt_properties_set_timecode( properties, "out", 0 );
+ mlt_properties_set_int( properties, "a_track", 0 );
+ mlt_properties_set_int( properties, "b_track", 1 );
+
return 0;
}
return 1;
int ret = mlt_service_connect_producer( &this->parent, producer, a_track );
if ( ret == 0 )
{
+ mlt_properties properties = mlt_transition_properties( this );
this->producer = producer;
- this->a_track = a_track;
- this->b_track = b_track;
- this->in = 0;
- this->out = 0;
+ mlt_properties_set_int( properties, "a_track", a_track );
+ mlt_properties_set_int( properties, "b_track", b_track );
}
return ret;
}
void mlt_transition_set_in_and_out( mlt_transition this, mlt_timecode in, mlt_timecode out )
{
- this->in = in;
- this->out = out;
+ mlt_properties properties = mlt_transition_properties( this );
+ mlt_properties_set_timecode( properties, "in", in );
+ mlt_properties_set_timecode( properties, "out", out );
}
/** Get the index of the a track.
int mlt_transition_get_a_track( mlt_transition this )
{
- return this->a_track;
+ mlt_properties properties = mlt_transition_properties( this );
+ return mlt_properties_get_int( properties, "a_track" );
}
/** Get the index of the b track.
int mlt_transition_get_b_track( mlt_transition this )
{
- return this->b_track;
+ mlt_properties properties = mlt_transition_properties( this );
+ return mlt_properties_get_int( properties, "b_track" );
}
/** Get the in point.
mlt_timecode mlt_transition_get_in( mlt_transition this )
{
- return this->in;
+ mlt_properties properties = mlt_transition_properties( this );
+ return mlt_properties_get_timecode( properties, "in" );
}
/** Get the out point.
mlt_timecode mlt_transition_get_out( mlt_transition this )
{
- return this->out;
+ mlt_properties properties = mlt_transition_properties( this );
+ return mlt_properties_get_timecode( properties, "out" );
}
/** Process the frame.
{
mlt_transition this = service->child;
+ mlt_properties properties = mlt_transition_properties( this );
+
+ int a_track = mlt_properties_get_int( properties, "a_track" );
+ int b_track = mlt_properties_get_int( properties, "b_track" );
+ mlt_timecode in = mlt_properties_get_timecode( properties, "in" );
+ mlt_timecode out = mlt_properties_get_timecode( properties, "out" );
+
// Fetch a and b frames together...
- if ( ( index == this->a_track || index == this->b_track ) &&
+ if ( ( index == a_track || index == b_track ) &&
( this->a_frame == NULL && this->b_frame == NULL ) )
{
- mlt_service_get_frame( this->producer, &this->a_frame, this->a_track );
- mlt_service_get_frame( this->producer, &this->b_frame, this->b_track );
+ mlt_service_get_frame( this->producer, &this->a_frame, a_track );
+ mlt_service_get_frame( this->producer, &this->b_frame, b_track );
}
// Special case track processing
- if ( index == this->a_track )
+ if ( index == a_track )
{
// Determine if we're in the right time zone
mlt_timecode timecode = mlt_frame_get_timecode( this->a_frame );
- if ( timecode >= this->in && timecode < this->out )
+ if ( timecode >= in && timecode < out )
{
// Process the transition
*frame = transition_process( this, this->a_frame, this->b_frame );
}
return 0;
}
- if ( index == this->b_track )
+ if ( index == b_track )
{
if ( this->b_frame == NULL )
{
else
{
mlt_timecode timecode = mlt_frame_get_timecode( this->b_frame );
- if ( timecode >= this->in && timecode < this->out )
+ if ( timecode >= in && timecode < out )
{
// We're in the zone, but the 'a frame' has not been requested yet
*frame = mlt_frame_init( );
// track and in/out points
mlt_service producer;
- int a_track;
- int b_track;
- mlt_timecode in;
- mlt_timecode out;
// Private
mlt_frame a_frame;
TARGET = miracle
-OBJS = miracle.o \
- miracle_log.o \
+APP_OBJS = miracle.o
+
+LIB_OBJS = miracle_log.o \
miracle_server.o \
miracle_connection.o \
miracle_local.o \
miracle_commands.o \
miracle_unit_commands.o
+OBJS = $(APP_OBJS) $(LIB_OBJS)
+
CFLAGS = -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic
LDFLAGS = -L ../valerie -lvalerie -L ../framework -lmlt
SRCS := $(OBJS:.o=.c)
-all: $(TARGET)
+all: $(TARGET)
+
+$(TARGET): $(APP_OBJS) libmiracle.so
+ $(CC) -o $@ $(APP_OBJS) -L. -lmiracle $(LDFLAGS)
-$(TARGET): $(OBJS)
- $(CC) -o $@ $(OBJS) $(LDFLAGS)
+libmiracle.so: $(LIB_OBJS)
+ $(CC) -shared -o $@ $(LIB_OBJS) $(LDFLAGS)
-depend: $(SRCS)
- $(CC) -MM $(CFLAGS) $^ 1>.depend
+depend: $(SRCS)
+ $(CC) -MM $(CFLAGS) $^ 1>.depend
dist-clean: clean
- rm -f .depend
+ rm -f .depend
clean:
- rm -f $(OBJS) $(TARGET)
+ rm -f $(OBJS) $(TARGET) libmiracle.so
ifneq ($(wildcard .depend),)
include .depend
export LD_LIBRARY_PATH=`pwd`/src/framework:\
`pwd`/src/valerie:\
+`pwd`/src/miracle:\
`pwd`/src/modules/bluefish:\
`pwd`/../bluefish/lib:\
`pwd`/../mpeg_sdk_demo/bin:\
`pwd`/../dv_sdk
export PATH=$PATH:\
+`pwd`/src/albino:\
`pwd`/src/inigo:\
`pwd`/src/humperdink:\
`pwd`/src/miracle
--- /dev/null
+TARGET = albino
+
+OBJS = albino.o
+
+CFLAGS = -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic
+
+LDFLAGS = -L ../valerie -L ../miracle -lmiracle -lvalerie
+
+SRCS := $(OBJS:.o=.c)
+
+all: $(TARGET)
+
+$(TARGET): $(OBJS)
+ $(CC) -o $@ $(OBJS) $(LDFLAGS)
+
+depend: $(SRCS)
+ $(CC) -MM $(CFLAGS) $^ 1>.depend
+
+dist-clean: clean
+ rm -f .depend
+
+clean:
+ rm -f $(OBJS) $(TARGET)
+
+ifneq ($(wildcard .depend),)
+include .depend
+endif
--- /dev/null
+/*
+ * albino.c -- Local dv1394d Test Util
+ * Copyright (C) 2002-2003 Ushodaya Enterprises Limited
+ * Author: Charles Yates <charles.yates@pandora.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* System header files */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Application header files */
+#include <miracle/miracle_local.h>
+#include <valerie/valerie_remote.h>
+#include <valerie/valerie_util.h>
+
+char *prompt( char *command, int length )
+{
+ printf( "> " );
+ return fgets( command, length, stdin );
+}
+
+void report( valerie_response response )
+{
+ int index = 0;
+ if ( response != NULL )
+ for ( index = 0; index < valerie_response_count( response ); index ++ )
+ printf( "%4d: %s\n", index, valerie_response_get_line( response, index ) );
+}
+
+int main( int argc, char **argv )
+{
+ valerie_parser parser = NULL;
+ valerie_response response = NULL;
+ char temp[ 1024 ];
+ int index = 1;
+
+ if ( argc > 2 && !strcmp( argv[ 1 ], "-s" ) )
+ {
+ printf( "DV1394D Client Instance\n" );
+ parser = valerie_parser_init_remote( argv[ 2 ], 5250 );
+ response = valerie_parser_connect( parser );
+ index = 3;
+ }
+ else
+ {
+ printf( "DV1394D Standalone Instance\n" );
+ parser = miracle_parser_init_local( );
+ response = valerie_parser_connect( parser );
+ }
+
+ if ( response != NULL )
+ {
+ /* process files on command lines before going into console mode */
+ for ( ; index < argc; index ++ )
+ {
+ valerie_response_close( response );
+ response = valerie_parser_run( parser, argv[ index ] );
+ report( response );
+ }
+
+ while ( response != NULL && prompt( temp, 1024 ) )
+ {
+ valerie_util_trim( valerie_util_chomp( temp ) );
+ if ( !strcmp( temp, "BYE" ) )
+ {
+ break;
+ }
+ else if ( strcmp( temp, "" ) )
+ {
+ valerie_response_close( response );
+ response = valerie_parser_execute( parser, temp );
+ report( response );
+ }
+ }
+ }
+ else
+ {
+ fprintf( stderr, "Unable to connect to a dv1394 instance.\n" );
+ }
+
+ printf( "\n" );
+ valerie_parser_close( parser );
+
+ return 0;
+}
this->child = child;
if ( mlt_service_init( service, this ) == 0 )
{
+ mlt_properties properties = mlt_transition_properties( this );
+
service->get_frame = transition_get_frame;
+
+ mlt_properties_set_timecode( properties, "in", 0 );
+ mlt_properties_set_timecode( properties, "out", 0 );
+ mlt_properties_set_int( properties, "a_track", 0 );
+ mlt_properties_set_int( properties, "b_track", 1 );
+
return 0;
}
return 1;
int ret = mlt_service_connect_producer( &this->parent, producer, a_track );
if ( ret == 0 )
{
+ mlt_properties properties = mlt_transition_properties( this );
this->producer = producer;
- this->a_track = a_track;
- this->b_track = b_track;
- this->in = 0;
- this->out = 0;
+ mlt_properties_set_int( properties, "a_track", a_track );
+ mlt_properties_set_int( properties, "b_track", b_track );
}
return ret;
}
void mlt_transition_set_in_and_out( mlt_transition this, mlt_timecode in, mlt_timecode out )
{
- this->in = in;
- this->out = out;
+ mlt_properties properties = mlt_transition_properties( this );
+ mlt_properties_set_timecode( properties, "in", in );
+ mlt_properties_set_timecode( properties, "out", out );
}
/** Get the index of the a track.
int mlt_transition_get_a_track( mlt_transition this )
{
- return this->a_track;
+ mlt_properties properties = mlt_transition_properties( this );
+ return mlt_properties_get_int( properties, "a_track" );
}
/** Get the index of the b track.
int mlt_transition_get_b_track( mlt_transition this )
{
- return this->b_track;
+ mlt_properties properties = mlt_transition_properties( this );
+ return mlt_properties_get_int( properties, "b_track" );
}
/** Get the in point.
mlt_timecode mlt_transition_get_in( mlt_transition this )
{
- return this->in;
+ mlt_properties properties = mlt_transition_properties( this );
+ return mlt_properties_get_timecode( properties, "in" );
}
/** Get the out point.
mlt_timecode mlt_transition_get_out( mlt_transition this )
{
- return this->out;
+ mlt_properties properties = mlt_transition_properties( this );
+ return mlt_properties_get_timecode( properties, "out" );
}
/** Process the frame.
{
mlt_transition this = service->child;
+ mlt_properties properties = mlt_transition_properties( this );
+
+ int a_track = mlt_properties_get_int( properties, "a_track" );
+ int b_track = mlt_properties_get_int( properties, "b_track" );
+ mlt_timecode in = mlt_properties_get_timecode( properties, "in" );
+ mlt_timecode out = mlt_properties_get_timecode( properties, "out" );
+
// Fetch a and b frames together...
- if ( ( index == this->a_track || index == this->b_track ) &&
+ if ( ( index == a_track || index == b_track ) &&
( this->a_frame == NULL && this->b_frame == NULL ) )
{
- mlt_service_get_frame( this->producer, &this->a_frame, this->a_track );
- mlt_service_get_frame( this->producer, &this->b_frame, this->b_track );
+ mlt_service_get_frame( this->producer, &this->a_frame, a_track );
+ mlt_service_get_frame( this->producer, &this->b_frame, b_track );
}
// Special case track processing
- if ( index == this->a_track )
+ if ( index == a_track )
{
// Determine if we're in the right time zone
mlt_timecode timecode = mlt_frame_get_timecode( this->a_frame );
- if ( timecode >= this->in && timecode < this->out )
+ if ( timecode >= in && timecode < out )
{
// Process the transition
*frame = transition_process( this, this->a_frame, this->b_frame );
}
return 0;
}
- if ( index == this->b_track )
+ if ( index == b_track )
{
if ( this->b_frame == NULL )
{
else
{
mlt_timecode timecode = mlt_frame_get_timecode( this->b_frame );
- if ( timecode >= this->in && timecode < this->out )
+ if ( timecode >= in && timecode < out )
{
// We're in the zone, but the 'a frame' has not been requested yet
*frame = mlt_frame_init( );
// track and in/out points
mlt_service producer;
- int a_track;
- int b_track;
- mlt_timecode in;
- mlt_timecode out;
// Private
mlt_frame a_frame;
TARGET = miracle
-OBJS = miracle.o \
- miracle_log.o \
+APP_OBJS = miracle.o
+
+LIB_OBJS = miracle_log.o \
miracle_server.o \
miracle_connection.o \
miracle_local.o \
miracle_commands.o \
miracle_unit_commands.o
+OBJS = $(APP_OBJS) $(LIB_OBJS)
+
CFLAGS = -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic
LDFLAGS = -L ../valerie -lvalerie -L ../framework -lmlt
SRCS := $(OBJS:.o=.c)
-all: $(TARGET)
+all: $(TARGET)
+
+$(TARGET): $(APP_OBJS) libmiracle.so
+ $(CC) -o $@ $(APP_OBJS) -L. -lmiracle $(LDFLAGS)
-$(TARGET): $(OBJS)
- $(CC) -o $@ $(OBJS) $(LDFLAGS)
+libmiracle.so: $(LIB_OBJS)
+ $(CC) -shared -o $@ $(LIB_OBJS) $(LDFLAGS)
-depend: $(SRCS)
- $(CC) -MM $(CFLAGS) $^ 1>.depend
+depend: $(SRCS)
+ $(CC) -MM $(CFLAGS) $^ 1>.depend
dist-clean: clean
- rm -f .depend
+ rm -f .depend
clean:
- rm -f $(OBJS) $(TARGET)
+ rm -f $(OBJS) $(TARGET) libmiracle.so
ifneq ($(wildcard .depend),)
include .depend