Incorrect Behaviour
------------------------------------------------------------------------------
-killall miracle does not work. requires killall -HUP
-USTA when stopped reports "paused"
CLEAN removes all clips (as opposed to leaving the currently playing one)
-USET eof=pause is partially supported
Different Intentional Behaviour
------------------------------------------------------------------------------
+Different forced Behaviour
+------------------------------------------------------------------------------
+killall miracle does not work when the SDL consumer is in use. requires killall -HUP
MLT Bugs
------------------------------------------------------------------------------
this->list[ this->count ]->frame_out = out;
this->list[ this->count ]->frame_count = out - in + 1;
- mlt_properties_set( mlt_producer_properties( producer ), "eof", "continue" );
+ mlt_properties_set( mlt_producer_properties( producer ), "eof", "pause" );
mlt_producer_set_speed( producer, 0 );
// Map playlist position to real producer in virtual playlist
mlt_position position = mlt_producer_frame( &this->parent );
+ mlt_position original = position;
+
// Total number of frames
int64_t total = 0;
{
playlist_entry *entry = this->list[ this->count - 1 ];
mlt_producer this_producer = mlt_playlist_producer( this );
- mlt_producer_seek( this_producer, total - 1 - mlt_producer_get_in( this_producer ) );
+ mlt_producer_seek( this_producer, original - 1 );
producer = entry->producer;
mlt_producer_seek( producer, entry->frame_out );
mlt_producer_set_speed( this_producer, 0 );
+ mlt_producer_set_speed( producer, 0 );
}
else if ( !strcmp( eof, "loop" ) && total > 0 )
{
// Check bounds
if ( position < 0 )
+ {
position = 0;
+ }
else if ( !strcmp( eof, "pause" ) && position >= mlt_producer_get_playtime( this ) )
+ {
+ mlt_producer_set_speed( this, 0 );
position = mlt_producer_get_playtime( this ) - 1;
+ }
+ else if ( !strcmp( eof, "loop" ) && position >= mlt_producer_get_playtime( this ) )
+ {
+ position = position % mlt_producer_get_playtime( this );
+ }
// Set the position
mlt_properties_set_position( mlt_producer_properties( this ), "_position", position );
static void mlt_properties_do_mirror( mlt_properties this, char *name )
{
- mlt_properties mirror = mlt_properties_get_data( this, "mlt_mirror", NULL );
- if ( mirror != NULL )
+ if ( strcmp( name, "in" ) && strcmp( name, "out" ) )
{
- char *value = mlt_properties_get( this, name );
- if ( value != NULL )
- mlt_properties_set( mirror, name, value );
+ mlt_properties mirror = mlt_properties_get_data( this, "mlt_mirror", NULL );
+ if ( mirror != NULL )
+ {
+ char *value = mlt_properties_get( this, name );
+ if ( value != NULL )
+ mlt_properties_set( mirror, name, value );
+ }
}
}
{
int i;
mlt_properties properties = unit->properties;
+ char *root_dir = mlt_properties_get( properties, "root" );
int generation = mlt_properties_get_int( properties, "generation" );
mlt_playlist playlist = mlt_properties_get_data( properties, "playlist", NULL );
{
mlt_playlist_clip_info info;
mlt_playlist_get_clip_info( playlist , &info, i );
+ char *resource = info.resource;
+ if ( root_dir != NULL && !strncmp( resource, root_dir, strlen( root_dir ) ) )
+ resource += strlen( root_dir );
valerie_response_printf( response, 10240, "%d \"%s\" %lld %lld %lld %lld %.2f\n",
- i, info.resource,
+ i, resource,
info.frame_in,
info.frame_out,
info.frame_count,
if ( !error )
{
mlt_properties properties = unit->properties;
+ char *root_dir = mlt_properties_get( properties, "root" );
mlt_playlist playlist = mlt_properties_get_data( properties, "playlist", NULL );
mlt_producer producer = mlt_playlist_producer( playlist );
mlt_producer clip = mlt_playlist_current( playlist );
if ( info.resource != NULL && strcmp( info.resource, "" ) )
{
- strncpy( status->clip, info.resource, sizeof( status->clip ) );
+ if ( root_dir == NULL || strncmp( info.resource, root_dir, strlen( root_dir ) ) )
+ strncpy( status->clip, info.resource, sizeof( status->clip ) );
+ else
+ strncpy( status->clip, info.resource + strlen( root_dir ), sizeof( status->clip ) );
status->speed = (int)( mlt_producer_get_speed( producer ) * 1000.0 );
status->fps = mlt_producer_get_fps( producer );
status->in = info.frame_in;
status->out = info.frame_out;
status->position = mlt_producer_position( clip );
status->length = mlt_producer_get_length( clip );
- strncpy( status->tail_clip, info.resource, sizeof( status->tail_clip ) );
+ if ( root_dir == NULL || strncmp( info.resource, root_dir, strlen( root_dir ) ) )
+ strncpy( status->tail_clip, info.resource, sizeof( status->tail_clip ) );
+ else
+ strncpy( status->clip, info.resource + strlen( root_dir ), sizeof( status->clip ) );
status->tail_in = info.frame_in;
status->tail_out = info.frame_out;
status->tail_position = mlt_producer_position( clip );
}
else
{
- error = -1;
+ pthread_mutex_lock( &this->mutex );
+ valerie_status_copy( status, &this->last );
+ pthread_mutex_unlock( &this->mutex );
}
pthread_mutex_unlock( &this->cond_mutex );
#ifndef _VALERIE_STATUS_H_
#define _VALERIE_STATUS_H_
+#include "stdint.h"
+
#ifdef __cplusplus
extern "C"
{