#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <sys/time.h>
/** Public final methods
*/
return frame;
}
+static inline long time_difference( struct timeval *time1 )
+{
+ struct timeval time2;
+ time2.tv_sec = time1->tv_sec;
+ time2.tv_usec = time1->tv_usec;
+ gettimeofday( time1, NULL );
+ return time1->tv_sec * 1000000 + time1->tv_usec - time2.tv_sec * 1000000 - time2.tv_usec;
+}
+
+static void *consumer_read_ahead_thread( void *arg )
+{
+ // The argument is the consumer
+ mlt_consumer this = arg;
+
+ // Get the properties of the consumer
+ mlt_properties properties = mlt_consumer_properties( this );
+
+ // Get the width and height
+ int width = mlt_properties_get_int( properties, "width" );
+ int height = mlt_properties_get_int( properties, "height" );
+
+ // General frame variable
+ mlt_frame frame = NULL;
+ uint8_t *image = NULL;
+
+ // Time structures
+ struct timeval ante;
+
+ // Average time for get_frame and get_image
+ int count = 1;
+ int64_t time_wait = 0;
+ int64_t time_frame = 0;
+ int64_t time_image = 0;
+
+ // Get the first frame
+ gettimeofday( &ante, NULL );
+ frame = mlt_consumer_get_frame( this );
+ time_frame = time_difference( &ante );
+
+ // Get the image of the first frame
+ mlt_frame_get_image( frame, &image, &this->format, &width, &height, 0 );
+ mlt_properties_set_int( mlt_frame_properties( frame ), "rendered", 1 );
+ time_image = time_difference( &ante );
+
+ // Continue to read ahead
+ while ( this->ahead )
+ {
+ // Put the current frame into the queue
+ pthread_mutex_lock( &this->mutex );
+ while( this->ahead && mlt_deque_count( this->queue ) >= 25 )
+ pthread_cond_wait( &this->cond, &this->mutex );
+ mlt_deque_push_back( this->queue, frame );
+ pthread_cond_broadcast( &this->cond );
+ pthread_mutex_unlock( &this->mutex );
+ time_wait += time_difference( &ante );
+
+ // Get the next frame
+ frame = mlt_consumer_get_frame( this );
+ time_frame += time_difference( &ante );
+
+ // Increment the count
+ count ++;
+
+ // Get the image
+ if ( ( time_frame + time_image + time_wait ) / count < 40000 )
+ {
+ // Get the image, mark as rendered and time it
+ mlt_frame_get_image( frame, &image, &this->format, &width, &height, 0 );
+ mlt_properties_set_int( mlt_frame_properties( frame ), "rendered", 1 );
+ time_image += time_difference( &ante );
+ }
+ else
+ {
+ // This is wrong, but it avoids slower machines getting starved
+ // It is, after all, impossible to go back in time :-/
+ time_image -= ( time_image / count / 8 );
+ }
+ }
+
+ // Remove the last frame
+ mlt_frame_close( frame );
+
+ return NULL;
+}
+
+static void consumer_read_ahead_start( mlt_consumer this )
+{
+ // We're running now
+ this->ahead = 1;
+
+ // Create the frame queue
+ this->queue = mlt_deque_init( );
+
+ // Create the mutex
+ pthread_mutex_init( &this->mutex, NULL );
+
+ // Create the condition
+ pthread_cond_init( &this->cond, NULL );
+
+ // Create the read ahead
+ pthread_create( &this->ahead_thread, NULL, consumer_read_ahead_thread, this );
+
+}
+
+static void consumer_read_ahead_stop( mlt_consumer this )
+{
+ // Make sure we're running
+ if ( this->ahead )
+ {
+ // Inform thread to stop
+ this->ahead = 0;
+
+ // Broadcast to the condition in case it's waiting
+ pthread_mutex_lock( &this->mutex );
+ pthread_cond_broadcast( &this->cond );
+ pthread_mutex_unlock( &this->mutex );
+
+ // Join the thread
+ pthread_join( this->ahead_thread, NULL );
+
+ // Destroy the mutex
+ pthread_mutex_destroy( &this->mutex );
+
+ // Destroy the condition
+ pthread_cond_destroy( &this->cond );
+
+ // Wipe the queue
+ while ( mlt_deque_count( this->queue ) )
+ mlt_frame_close( mlt_deque_pop_back( this->queue ) );
+ }
+}
+
+mlt_frame mlt_consumer_rt_frame( mlt_consumer this, mlt_image_format format )
+{
+ // Frame to return
+ mlt_frame frame = NULL;
+ int size = 1;
+
+
+ // Is the read ahead running?
+ if ( this->ahead == 0 )
+ {
+ this->format = format;
+ consumer_read_ahead_start( this );
+ size = 12;
+ }
+
+ // Get frame from queue
+ pthread_mutex_lock( &this->mutex );
+ while( this->ahead && mlt_deque_count( this->queue ) < size )
+ pthread_cond_wait( &this->cond, &this->mutex );
+ frame = mlt_deque_pop_front( this->queue );
+ pthread_cond_broadcast( &this->cond );
+ pthread_mutex_unlock( &this->mutex );
+
+ return frame;
+}
+
/** Stop the consumer.
*/
if ( this->stop != NULL )
this->stop( this );
+ // Kill the read ahead
+ consumer_read_ahead_stop( this );
+
// Kill the test card
mlt_properties_set_data( properties, "test_card_producer", NULL, 0, NULL, NULL );
void *child;
int ahead;
- int width;
- int height;
mlt_image_format format;
mlt_deque queue;
pthread_t ahead_thread;
+ pthread_mutex_t mutex;
+ pthread_cond_t cond;
};
/** Public final methods
extern int mlt_consumer_connect( mlt_consumer this, mlt_service producer );
extern int mlt_consumer_start( mlt_consumer this );
extern mlt_frame mlt_consumer_get_frame( mlt_consumer this );
+extern mlt_frame mlt_consumer_rt_frame( mlt_consumer this, mlt_image_format format );
extern int mlt_consumer_stop( mlt_consumer this );
extern int mlt_consumer_is_stopped( mlt_consumer this );
extern void mlt_consumer_close( mlt_consumer );
break;
}
- sprintf( temp + strlen( temp ), " %9lld %9lld %9lld ", status->in, status->position, status->out );
+ sprintf( temp + strlen( temp ), " %9d %9d %9d ", status->in, status->position, status->out );
strcat( temp, status->clip );
printf( "%-80.80s\r", temp );
{
mlt_playlist_clip_info info;
mlt_playlist_get_clip_info( playlist , &info, i );
- valerie_response_printf( response, 10240, "%d \"%s\" %lld %lld %lld %lld %.2f\n",
+ valerie_response_printf( response, 10240, "%d \"%s\" %d %d %d %d %.2f\n",
i,
strip_root( unit, info.resource ),
info.frame_in,
\param out The ending frame (-1 for maximum)
*/
-valerie_error_code miracle_unit_load( miracle_unit unit, char *clip, int64_t in, int64_t out, int flush )
+valerie_error_code miracle_unit_load( miracle_unit unit, char *clip, int32_t in, int32_t out, int flush )
{
// Now try to create an producer
mlt_producer instance = create_producer( clip );
return valerie_invalid_file;
}
-valerie_error_code miracle_unit_insert( miracle_unit unit, char *clip, int index, int64_t in, int64_t out )
+valerie_error_code miracle_unit_insert( miracle_unit unit, char *clip, int index, int32_t in, int32_t out )
{
mlt_producer instance = locate_producer( unit, clip );
\param out The ending frame (-1 for maximum)
*/
-valerie_error_code miracle_unit_append( miracle_unit unit, char *clip, int64_t in, int64_t out )
+valerie_error_code miracle_unit_append( miracle_unit unit, char *clip, int32_t in, int32_t out )
{
mlt_producer instance = locate_producer( unit, clip );
/** Change position in the playlist.
*/
-void miracle_unit_change_position( miracle_unit unit, int clip, int64_t position )
+void miracle_unit_change_position( miracle_unit unit, int clip, int32_t position )
{
mlt_properties properties = unit->properties;
mlt_playlist playlist = mlt_properties_get_data( properties, "playlist", NULL );
if ( mlt_playlist_get_clip_info( playlist, &info, clip ) == 0 )
{
- int64_t frame_start = info.start;
- int64_t frame_offset = position;
+ int32_t frame_start = info.start;
+ int32_t frame_offset = position;
if ( frame_offset < 0 )
frame_offset = info.frame_out;
/** Set a clip's in point
*/
-int miracle_unit_set_clip_in( miracle_unit unit, int index, int64_t position )
+int miracle_unit_set_clip_in( miracle_unit unit, int index, int32_t position )
{
mlt_properties properties = unit->properties;
mlt_playlist playlist = mlt_properties_get_data( properties, "playlist", NULL );
/** Set a clip's out point.
*/
-int miracle_unit_set_clip_out( miracle_unit unit, int index, int64_t position )
+int miracle_unit_set_clip_out( miracle_unit unit, int index, int32_t position )
{
mlt_properties properties = unit->properties;
mlt_playlist playlist = mlt_properties_get_data( properties, "playlist", NULL );
/** Step by specified position.
*/
-void miracle_unit_step( miracle_unit unit, int64_t offset )
+void miracle_unit_step( miracle_unit unit, int32_t offset )
{
mlt_properties properties = unit->properties;
mlt_playlist playlist = mlt_properties_get_data( properties, "playlist", NULL );
extern miracle_unit miracle_unit_init( int index, char *arg );
extern void miracle_unit_report_list( miracle_unit unit, valerie_response response );
extern void miracle_unit_allow_stdin( miracle_unit unit, int flag );
-extern valerie_error_code miracle_unit_load( miracle_unit unit, char *clip, int64_t in, int64_t out, int flush );
-extern valerie_error_code miracle_unit_insert( miracle_unit unit, char *clip, int index, int64_t in, int64_t out );
-extern valerie_error_code miracle_unit_append( miracle_unit unit, char *clip, int64_t in, int64_t out );
+extern valerie_error_code miracle_unit_load( miracle_unit unit, char *clip, int32_t in, int32_t out, int flush );
+extern valerie_error_code miracle_unit_insert( miracle_unit unit, char *clip, int index, int32_t in, int32_t out );
+extern valerie_error_code miracle_unit_append( miracle_unit unit, char *clip, int32_t in, int32_t out );
extern valerie_error_code miracle_unit_remove( miracle_unit unit, int index );
extern valerie_error_code miracle_unit_clean( miracle_unit unit );
extern valerie_error_code miracle_unit_move( miracle_unit unit, int src, int dest );
extern int miracle_unit_is_offline( miracle_unit unit );
extern void miracle_unit_set_notifier( miracle_unit, valerie_notifier, char * );
extern int miracle_unit_get_status( miracle_unit, valerie_status );
-extern void miracle_unit_change_position( miracle_unit, int, int64_t position );
+extern void miracle_unit_change_position( miracle_unit, int, int32_t position );
extern void miracle_unit_change_speed( miracle_unit unit, int speed );
-extern int miracle_unit_set_clip_in( miracle_unit unit, int index, int64_t position );
-extern int miracle_unit_set_clip_out( miracle_unit unit, int index, int64_t position );
+extern int miracle_unit_set_clip_in( miracle_unit unit, int index, int32_t position );
+extern int miracle_unit_set_clip_out( miracle_unit unit, int index, int32_t position );
//extern void miracle_unit_set_mode( miracle_unit unit, dv_player_clip_mode mode );
//extern dv_player_clip_mode miracle_unit_get_mode( miracle_unit unit );
//extern void miracle_unit_set_eof_action( miracle_unit unit, dv_player_eof_action mode );
//extern dv_player_eof_action miracle_unit_get_eof_action( miracle_unit unit );
-extern void miracle_unit_step( miracle_unit unit, int64_t offset );
+extern void miracle_unit_step( miracle_unit unit, int32_t offset );
extern void miracle_unit_close( miracle_unit unit );
extern void miracle_unit_suspend( miracle_unit );
extern void miracle_unit_restore( miracle_unit );
return RESPONSE_INVALID_UNIT;
else
{
- int64_t in = -1, out = -1;
+ int32_t in = -1, out = -1;
if ( valerie_tokeniser_count( cmd_arg->tokeniser ) == 5 )
{
in = atol( valerie_tokeniser_get_string( cmd_arg->tokeniser, 3 ) );
return RESPONSE_INVALID_UNIT;
else
{
- int64_t in = -1, out = -1;
+ int32_t in = -1, out = -1;
if ( valerie_tokeniser_count( cmd_arg->tokeniser ) == 5 )
{
in = atol( valerie_tokeniser_get_string( cmd_arg->tokeniser, 3 ) );
while( mlt_properties_get_int( properties, "running" ) )
{
// Get the frame
- mlt_frame frame = mlt_consumer_get_frame( this );
+ mlt_frame frame = mlt_consumer_rt_frame( this, mlt_image_yuv422 );
// Check that we have a frame to work with
if ( frame != NULL )
#include <pthread.h>
#include <SDL/SDL.h>
#include <SDL/SDL_syswm.h>
-#include <sys/timeb.h>
+#include <sys/time.h>
/** This classes definition.
*/
request.freq = frequency;
request.format = AUDIO_S16;
request.channels = channels;
- request.samples = 2048;
+ request.samples = 4096;
request.callback = sdl_fill_audio;
request.userdata = (void *)this;
if ( SDL_OpenAudio( &request, &got ) != 0 )
uint8_t *image;
int changed = 0;
- struct timeb before;
- ftime( &before );
-
if ( mlt_properties_get_int( properties, "video_off" ) )
{
mlt_frame_close( frame );
mlt_properties_set_position( mlt_frame_properties( frame ), "playtime", playtime );
mlt_properties_set_double( mlt_frame_properties( frame ), "consumer_scale", ( double )height / mlt_properties_get_double( properties, "height" ) );
- if ( !this->playing )
- {
- struct timeb render;
- mlt_frame_get_image( frame, &image, &vfmt, &width, &height, 0 );
- ftime( &render );
- this->time_taken = ( ( int64_t )render.time * 1000 + render.millitm ) - ( ( int64_t )before.time * 1000 + before.millitm );
- mlt_properties_set( mlt_frame_properties( frame ), "rendered", "true" );
- }
-
// Push this frame to the back of the queue
mlt_deque_push_back( this->queue, frame );
frame = NULL;
if ( this->playing )
- {
- // We might want to use an old frame if the current frame is skipped
- mlt_frame candidate = NULL;
-
- while ( frame == NULL && mlt_deque_count( this->queue ) )
- {
- frame = mlt_deque_peek_front( this->queue );
- playtime = mlt_properties_get_position( mlt_frame_properties( frame ), "playtime" );
-
- // Check if frame is in the future or past
- if ( mlt_deque_count( this->queue ) > 25 )
- {
- frame = mlt_deque_pop_front( this->queue );
- }
- else if ( playtime > elapsed + 100 )
- {
- // no frame to show or remove
- frame = NULL;
- break;
- }
- else if ( playtime < elapsed - 20 )
- {
- mlt_frame_close( candidate );
- candidate = mlt_deque_pop_front( this->queue );
- if ( mlt_properties_get( mlt_frame_properties( frame ), "rendered" ) == NULL )
- {
- mlt_frame_close( candidate );
- candidate = NULL;
- }
- frame = NULL;
- }
- else
- {
- // Get the frame at the front of the queue
- frame = mlt_deque_pop_front( this->queue );
- }
- }
-
- if ( frame == NULL )
- frame = candidate;
- else if ( candidate != NULL )
- mlt_frame_close( candidate );
- }
+ frame = mlt_deque_pop_front( this->queue );
- struct timeb render;
- ftime( &render );
-
- if ( this->playing && frame != NULL )
+ if ( this->playing && frame != NULL && mlt_properties_get_int( mlt_frame_properties( frame ), "rendered" ) == 1 )
{
+ playtime = mlt_properties_get_position( mlt_frame_properties( frame ), "playtime" );
// Get the image, width and height
mlt_frame_get_image( frame, &image, &vfmt, &width, &height, 0 );
- ftime( &render );
- if ( mlt_properties_get( mlt_frame_properties( frame ), "rendered" ) == NULL )
- this->time_taken = ( ( int64_t )render.time * 1000 + render.millitm ) - ( ( int64_t )before.time * 1000 + before.millitm );
+
+ if ( playtime > elapsed + 20000 )
+ {
+ struct timespec tm = { ( playtime - elapsed ) / 1000000, ( ( playtime - elapsed ) % 1000000 ) * 1000 };
+ nanosleep( &tm, NULL );
+ }
// Handle events
if ( this->sdl_screen != NULL )
if ( frame != NULL )
mlt_frame_close( frame );
- struct timeb after;
- ftime( &after );
- int processing = ( ( int64_t )after.time * 1000 + after.millitm ) - ( ( int64_t )render.time * 1000 + render.millitm );
- int delay = playtime - elapsed - processing;
-
- if ( delay > this->time_taken && mlt_deque_count( this->queue ) )
- {
- mlt_frame next = mlt_deque_peek_front( this->queue );
- playtime = mlt_properties_get_position( mlt_frame_properties( next ), "playtime" );
- if ( playtime > elapsed + delay )
- {
- struct timeb render;
- mlt_frame_get_image( next, &image, &vfmt, &width, &height, 0 );
- ftime( &render );
- this->time_taken = ( ( int64_t )render.time * 1000 + render.millitm ) - ( ( int64_t )after.time * 1000 + after.millitm );
- mlt_properties_set( mlt_frame_properties( next ), "rendered", "true" );
- }
- else
- {
- this->time_taken /= 2;
- }
- }
- else
- {
- this->time_taken /= 2;
- }
-
return 0;
}
int init_audio = 1;
// Obtain time of thread start
- struct timeb now;
+ struct timeval now;
int64_t start = 0;
int64_t elapsed = 0;
int duration = 0;
while( this->running )
{
// Get a frame from the attached producer
- mlt_frame frame = mlt_consumer_get_frame( consumer );
+ mlt_frame frame = mlt_consumer_rt_frame( consumer, mlt_image_yuv422 );
// Ensure that we have a frame
if ( frame != NULL )
if ( this->playing )
{
// Get the current time
- ftime( &now );
+ gettimeofday( &now, NULL );
// Determine elapsed time
if ( start == 0 )
- start = ( int64_t )now.time * 1000 + now.millitm;
+ start = ( int64_t )now.tv_sec * 1000000 + now.tv_usec;
else
- elapsed = ( ( int64_t )now.time * 1000 + now.millitm ) - start;
+ elapsed = ( ( int64_t )now.tv_sec * 1000000 + now.tv_usec) - start;
+
}
consumer_play_video( this, frame, elapsed, playtime );
- playtime += duration;
+ playtime += ( duration * 1000 );
}
}
/** Load a file on the specified unit with the specified in/out points.
*/
-valerie_error_code valerie_unit_load_clipped( valerie this, int unit, char *file, int64_t in, int64_t out )
+valerie_error_code valerie_unit_load_clipped( valerie this, int unit, char *file, int32_t in, int32_t out )
{
- return valerie_execute( this, 10240, "LOAD U%d \"%s\" %lld %lld", unit, file, in, out );
+ return valerie_execute( this, 10240, "LOAD U%d \"%s\" %d %d", unit, file, in, out );
}
/** Load a file on the specified unit at the end of the current pump.
/** Load a file on the specified unit at the end of the pump with the specified in/out points.
*/
-valerie_error_code valerie_unit_load_back_clipped( valerie this, int unit, char *file, int64_t in, int64_t out )
+valerie_error_code valerie_unit_load_back_clipped( valerie this, int unit, char *file, int32_t in, int32_t out )
{
- return valerie_execute( this, 10240, "LOAD U%d \"!%s\" %lld %lld", unit, file, in, out );
+ return valerie_execute( this, 10240, "LOAD U%d \"!%s\" %d %d", unit, file, in, out );
}
/** Append a file on the specified unit.
*/
-valerie_error_code valerie_unit_append( valerie this, int unit, char *file, int64_t in, int64_t out )
+valerie_error_code valerie_unit_append( valerie this, int unit, char *file, int32_t in, int32_t out )
{
- return valerie_execute( this, 10240, "APND U%d \"%s\" %lld %lld", unit, file, in, out );
+ return valerie_execute( this, 10240, "APND U%d \"%s\" %d %d", unit, file, in, out );
}
/** Clean the unit - this function removes all but the currently playing clip.
/** Insert clip at the specified position.
*/
-valerie_error_code valerie_unit_clip_insert( valerie this, int unit, valerie_clip_offset offset, int clip, char *file, int64_t in, int64_t out )
+valerie_error_code valerie_unit_clip_insert( valerie this, int unit, valerie_clip_offset offset, int clip, char *file, int32_t in, int32_t out )
{
char temp[ 100 ];
valerie_interpret_clip_offset( temp, offset, clip );
- return valerie_execute( this, 1024, "INSERT U%d %s %s %lld %lld", unit, file, temp, in, out );
+ return valerie_execute( this, 1024, "INSERT U%d %s %s %d %d", unit, file, temp, in, out );
}
/** Play the unit at normal speed.
/** Step by the number of frames on the specified unit.
*/
-valerie_error_code valerie_unit_step( valerie this, int unit, int64_t step )
+valerie_error_code valerie_unit_step( valerie this, int unit, int32_t step )
{
- return valerie_execute( this, 1024, "STEP U%d %lld", unit, step );
+ return valerie_execute( this, 1024, "STEP U%d %d", unit, step );
}
/** Goto the specified frame on the specified unit.
*/
-valerie_error_code valerie_unit_goto( valerie this, int unit, int64_t position )
+valerie_error_code valerie_unit_goto( valerie this, int unit, int32_t position )
{
- return valerie_execute( this, 1024, "GOTO U%d %lld", unit, position );
+ return valerie_execute( this, 1024, "GOTO U%d %d", unit, position );
}
/** Goto the specified frame in the clip on the specified unit.
*/
-valerie_error_code valerie_unit_clip_goto( valerie this, int unit, valerie_clip_offset offset, int clip, int64_t position )
+valerie_error_code valerie_unit_clip_goto( valerie this, int unit, valerie_clip_offset offset, int clip, int32_t position )
{
char temp[ 100 ];
valerie_interpret_clip_offset( temp, offset, clip );
- return valerie_execute( this, 1024, "GOTO U%d %lld %s", unit, position, temp );
+ return valerie_execute( this, 1024, "GOTO U%d %d %s", unit, position, temp );
}
/** Set the in point of the loaded file on the specified unit.
*/
-valerie_error_code valerie_unit_set_in( valerie this, int unit, int64_t in )
+valerie_error_code valerie_unit_set_in( valerie this, int unit, int32_t in )
{
- return valerie_execute( this, 1024, "SIN U%d %lld", unit, in );
+ return valerie_execute( this, 1024, "SIN U%d %d", unit, in );
}
/** Set the in point of the clip on the specified unit.
*/
-valerie_error_code valerie_unit_clip_set_in( valerie this, int unit, valerie_clip_offset offset, int clip, int64_t in )
+valerie_error_code valerie_unit_clip_set_in( valerie this, int unit, valerie_clip_offset offset, int clip, int32_t in )
{
char temp[ 100 ];
valerie_interpret_clip_offset( temp, offset, clip );
- return valerie_execute( this, 1024, "SIN U%d %lld %s", unit, in, temp );
+ return valerie_execute( this, 1024, "SIN U%d %d %s", unit, in, temp );
}
/** Set the out point of the loaded file on the specified unit.
*/
-valerie_error_code valerie_unit_set_out( valerie this, int unit, int64_t out )
+valerie_error_code valerie_unit_set_out( valerie this, int unit, int32_t out )
{
- return valerie_execute( this, 1024, "SOUT U%d %lld", unit, out );
+ return valerie_execute( this, 1024, "SOUT U%d %d", unit, out );
}
/** Set the out point of the clip on the specified unit.
*/
-valerie_error_code valerie_unit_clip_set_out( valerie this, int unit, valerie_clip_offset offset, int clip, int64_t in )
+valerie_error_code valerie_unit_clip_set_out( valerie this, int unit, valerie_clip_offset offset, int clip, int32_t in )
{
char temp[ 100 ];
valerie_interpret_clip_offset( temp, offset, clip );
- return valerie_execute( this, 1024, "SOUT U%d %lld %s", unit, in, temp );
+ return valerie_execute( this, 1024, "SOUT U%d %d %s", unit, in, temp );
}
/** Clear the in point of the loaded file on the specified unit.
/* Unit functions */
extern valerie_error_code valerie_unit_add( valerie, char *, int * );
extern valerie_error_code valerie_unit_load( valerie, int, char * );
-extern valerie_error_code valerie_unit_load_clipped( valerie, int, char *, int64_t, int64_t );
+extern valerie_error_code valerie_unit_load_clipped( valerie, int, char *, int32_t, int32_t );
extern valerie_error_code valerie_unit_load_back( valerie, int, char * );
-extern valerie_error_code valerie_unit_load_back_clipped( valerie, int, char *, int64_t, int64_t );
-extern valerie_error_code valerie_unit_append( valerie, int, char *, int64_t, int64_t );
+extern valerie_error_code valerie_unit_load_back_clipped( valerie, int, char *, int32_t, int32_t );
+extern valerie_error_code valerie_unit_append( valerie, int, char *, int32_t, int32_t );
extern valerie_error_code valerie_unit_clean( valerie, int );
extern valerie_error_code valerie_unit_clip_move( valerie, int, valerie_clip_offset, int, valerie_clip_offset, int );
extern valerie_error_code valerie_unit_clip_remove( valerie, int, valerie_clip_offset, int );
extern valerie_error_code valerie_unit_remove_current_clip( valerie, int );
-extern valerie_error_code valerie_unit_clip_insert( valerie, int, valerie_clip_offset, int, char *, int64_t, int64_t );
+extern valerie_error_code valerie_unit_clip_insert( valerie, int, valerie_clip_offset, int, char *, int32_t, int32_t );
extern valerie_error_code valerie_unit_play( valerie, int );
extern valerie_error_code valerie_unit_play_at_speed( valerie, int, int );
extern valerie_error_code valerie_unit_stop( valerie, int );
extern valerie_error_code valerie_unit_pause( valerie, int );
extern valerie_error_code valerie_unit_rewind( valerie, int );
extern valerie_error_code valerie_unit_fast_forward( valerie, int );
-extern valerie_error_code valerie_unit_step( valerie, int, int64_t );
-extern valerie_error_code valerie_unit_goto( valerie, int, int64_t );
-extern valerie_error_code valerie_unit_clip_goto( valerie, int, valerie_clip_offset, int, int64_t );
-extern valerie_error_code valerie_unit_clip_set_in( valerie, int, valerie_clip_offset, int, int64_t );
-extern valerie_error_code valerie_unit_clip_set_out( valerie, int, valerie_clip_offset, int, int64_t );
-extern valerie_error_code valerie_unit_set_in( valerie, int, int64_t );
-extern valerie_error_code valerie_unit_set_out( valerie, int, int64_t );
+extern valerie_error_code valerie_unit_step( valerie, int, int32_t );
+extern valerie_error_code valerie_unit_goto( valerie, int, int32_t );
+extern valerie_error_code valerie_unit_clip_goto( valerie, int, valerie_clip_offset, int, int32_t );
+extern valerie_error_code valerie_unit_clip_set_in( valerie, int, valerie_clip_offset, int, int32_t );
+extern valerie_error_code valerie_unit_clip_set_out( valerie, int, valerie_clip_offset, int, int32_t );
+extern valerie_error_code valerie_unit_set_in( valerie, int, int32_t );
+extern valerie_error_code valerie_unit_set_out( valerie, int, int32_t );
extern valerie_error_code valerie_unit_clear_in( valerie, int );
extern valerie_error_code valerie_unit_clear_out( valerie, int );
extern valerie_error_code valerie_unit_clear_in_out( valerie, int );
{
int clip;
char full[ PATH_MAX + NAME_MAX ];
- int64_t in;
- int64_t out;
- int64_t max;
- int64_t size;
- int64_t fps;
+ int32_t in;
+ int32_t out;
+ int32_t max;
+ int32_t size;
+ int32_t fps;
}
*valerie_list_entry, valerie_list_entry_t;
break;
}
- snprintf( text, length, "%d %s \"%s\" %lld %d %.2f %lld %lld %lld \"%s\" %lld %lld %lld %lld %d %d %d\r\n",
+ snprintf( text, length, "%d %s \"%s\" %d %d %.2f %d %d %d \"%s\" %d %d %d %d %d %d %d\r\n",
status->unit,
status_string,
status->clip,
int unit;
unit_status status;
char clip[ 2048 ];
- int64_t position;
+ int32_t position;
int speed;
double fps;
- int64_t in;
- int64_t out;
- int64_t length;
+ int32_t in;
+ int32_t out;
+ int32_t length;
char tail_clip[ 2048 ];
- int64_t tail_position;
- int64_t tail_in;
- int64_t tail_out;
- int64_t tail_length;
+ int32_t tail_position;
+ int32_t tail_in;
+ int32_t tail_out;
+ int32_t tail_length;
int seek_flag;
int generation;
int clip_index;