return self;
}
+/** Construct a playlist with a profile.
+ *
+ * Sets the resource property to "<playlist>".
+ * Set the mlt_type to property to "mlt_producer".
+ * \public \memberof mlt_playlist_s
+ * \param profile the profile to use with the profile
+ * \return a new playlist
+ */
+
+mlt_playlist mlt_playlist_new( mlt_profile profile )
+{
+ mlt_playlist self = mlt_playlist_init();
+ if ( self )
+ mlt_properties_set_data( MLT_PLAYLIST_PROPERTIES( self ), "_profile", profile, 0, NULL, NULL );
+ return self;
+}
+
/** Get the producer associated to this playlist.
*
* \public \memberof mlt_playlist_s
*
* \public \memberof mlt_playlist_s
* \param self a playlist
- * \param length the ending time of the blank entry, not its duration
+ * \param out the ending time of the blank entry, not its duration
* \return true if there was an error
*/
-int mlt_playlist_blank( mlt_playlist self, mlt_position length )
+int mlt_playlist_blank( mlt_playlist self, mlt_position out )
{
// Append to the virtual list
- if (length >= 0)
- return mlt_playlist_virtual_append( self, &self->blank, 0, length );
+ if ( out >= 0 )
+ return mlt_playlist_virtual_append( self, &self->blank, 0, out );
+ else
+ return 1;
+}
+
+/** Append a blank item to the playlist with duration as a time string.
+ *
+ * \public \memberof mlt_playlist_s
+ * \param self a playlist
+ * \param length the duration of the blank entry as a time string
+ * \return true if there was an error
+ */
+
+int mlt_playlist_blank_time( mlt_playlist self, const char* length )
+{
+ if ( self && length )
+ {
+ mlt_properties properties = MLT_PLAYLIST_PROPERTIES( self );
+ mlt_properties_set( properties , "_blank_time", length );
+ mlt_position duration = mlt_properties_get_position( properties, "_blank_time" );
+ return mlt_playlist_blank( self, duration - 1 );
+ }
else
return 1;
}
if ( error == 0 )
{
int i = clip;
- mlt_playlist new_clip = mlt_playlist_init( );
+ mlt_playlist new_clip = mlt_playlist_new( mlt_service_profile( MLT_PLAYLIST_SERVICE(self) ) );
mlt_events_block( MLT_PLAYLIST_PROPERTIES( self ), self );
if ( clip + count >= self->count )
count = self->count - clip - 1;
#define MLT_PLAYLIST_PROPERTIES( playlist ) MLT_SERVICE_PROPERTIES( MLT_PLAYLIST_SERVICE( playlist ) )
extern mlt_playlist mlt_playlist_init( );
+extern mlt_playlist mlt_playlist_new( mlt_profile profile );
extern mlt_producer mlt_playlist_producer( mlt_playlist self );
extern mlt_service mlt_playlist_service( mlt_playlist self );
extern mlt_properties mlt_playlist_properties( mlt_playlist self );
extern int mlt_playlist_clear( mlt_playlist self );
extern int mlt_playlist_append( mlt_playlist self, mlt_producer producer );
extern int mlt_playlist_append_io( mlt_playlist self, mlt_producer producer, mlt_position in, mlt_position out );
-extern int mlt_playlist_blank( mlt_playlist self, mlt_position length );
+extern int mlt_playlist_blank( mlt_playlist self, mlt_position out );
+extern int mlt_playlist_blank_time( mlt_playlist self, const char *length );
extern mlt_position mlt_playlist_clip( mlt_playlist self, mlt_whence whence, int index );
extern int mlt_playlist_current_clip( mlt_playlist self );
extern mlt_producer mlt_playlist_current( mlt_playlist self );
#include <stdlib.h>
#include "MltPlaylist.h"
#include "MltTransition.h"
+#include "MltProfile.h"
using namespace Mlt;
ClipInfo::ClipInfo( ) :
instance = mlt_playlist_init( );
}
+Playlist::Playlist( Profile& profile ) :
+ instance( NULL )
+{
+ instance = mlt_playlist_new( profile.get_profile() );
+}
+
Playlist::Playlist( Service &producer ) :
instance( NULL )
{
return mlt_playlist_append_io( get_playlist( ), producer.get_producer( ), in, out );
}
-int Playlist::blank( int length )
+int Playlist::blank( int out )
+{
+ return mlt_playlist_blank( get_playlist( ), out );
+}
+
+int Playlist::blank( const char *length )
{
- return mlt_playlist_blank( get_playlist( ), length );
+ return mlt_playlist_blank_time( get_playlist( ), length );
}
int Playlist::clip( mlt_whence whence, int index )
class Service;
class Playlist;
class Transition;
+ class Profile;
class MLTPP_DECLSPEC ClipInfo
{
mlt_playlist instance;
public:
Playlist( );
+ Playlist( Profile& profile );
Playlist( Service &playlist );
Playlist( Playlist &playlist );
Playlist( mlt_playlist playlist );
int count( );
int clear( );
int append( Producer &producer, int in = -1, int out = -1 );
- int blank( int length );
+ int blank( int out );
+ int blank( const char *length );
int clip( mlt_whence whence, int index );
int current_clip( );
Producer *current( );
if ( ret >= 0 && pkt.stream_index == self->video_index && pkt.size > 0 )
{
// Determine time code of the packet
- if ( pkt.pts == AV_NOPTS_VALUE )
+ if ( use_pts && pkt.pts == AV_NOPTS_VALUE )
{
self->invalid_pts_counter++;
if ( self->invalid_pts_counter > 20 )
/** Filter processing.
*/
-static mlt_frame filter_process( mlt_filter this, mlt_frame frame )
+static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable )
{
+ // Get the filter
+ mlt_filter filter = mlt_frame_pop_service( frame );
+
// Get the properties of the filter
- mlt_properties properties = MLT_FILTER_PROPERTIES( this );
+ mlt_properties properties = MLT_FILTER_PROPERTIES( filter );
+
+ mlt_service_lock( MLT_FILTER_SERVICE( filter ) );
// Get the region transition
mlt_transition transition = mlt_properties_get_data( properties, "_transition", NULL );
if ( transition == NULL )
{
// Create the transition
- mlt_profile profile = mlt_service_profile( MLT_FILTER_SERVICE( this ) );
+ mlt_profile profile = mlt_service_profile( MLT_FILTER_SERVICE( filter ) );
transition = mlt_factory_transition( profile, "region", NULL );
// Register with the filter
mlt_properties_set_data( properties, "_transition", transition, 0, ( mlt_destructor )mlt_transition_close, NULL );
// Pass a reference to this filter down
- mlt_properties_set_data( MLT_TRANSITION_PROPERTIES( transition ), "_region_filter", this, 0, NULL, NULL );
+ mlt_properties_set_data( MLT_TRANSITION_PROPERTIES( transition ), "_region_filter", filter, 0, NULL, NULL );
}
+ mlt_service_unlock( MLT_FILTER_SERVICE( filter ) );
+
// Pass all properties down
- mlt_properties_pass( MLT_TRANSITION_PROPERTIES( transition ), properties, "" );
+ mlt_properties_inherit( MLT_TRANSITION_PROPERTIES( transition ), properties );
+
+ // Make the frame's position relative to this filter's in point
+ mlt_frame_set_position( frame, mlt_filter_get_position( filter, frame ) );
// Process the frame
- return mlt_transition_process( transition, frame, NULL );
+ mlt_transition_process( transition, frame, NULL );
+
+ return mlt_frame_get_image( frame, image, format, width, height, writable );
+}
+
+static mlt_frame filter_process( mlt_filter this, mlt_frame frame )
+{
+ mlt_frame_push_service( frame, this );
+ mlt_frame_push_get_image( frame, filter_get_image );
+
+ return frame;
}
/** Constructor for the filter.
// Return the filter
return this;
}
-
int track = 0;
mlt_producer producer = NULL;
mlt_tractor mix = NULL;
- mlt_playlist playlist = mlt_playlist_init( );
+ mlt_playlist playlist = mlt_playlist_new( profile );
mlt_properties group = mlt_properties_new( );
mlt_tractor tractor = mlt_tractor_new( );
mlt_properties properties = MLT_TRACTOR_PROPERTIES( tractor );
if ( producer != NULL && !mlt_producer_is_cut( producer ) )
mlt_playlist_append( playlist, producer );
producer = NULL;
- mlt_playlist_blank( playlist, atof( argv[ ++ i ] ) );
+ if ( strchr( argv[ i + 1 ], ':' ) )
+ mlt_playlist_blank_time( playlist, argv[ ++ i ] );
+ else
+ // support for legacy where plain int is an out point instead of length
+ mlt_playlist_blank( playlist, atof( argv[ ++ i ] ) );
}
else if ( !strcmp( argv[ i ], "-track" ) ||
!strcmp( argv[ i ], "-null-track" ) ||
{
mlt_multitrack_connect( multitrack, MLT_PLAYLIST_PRODUCER( playlist ), track ++ );
track_service( field, playlist, ( mlt_destructor )mlt_playlist_close );
- playlist = mlt_playlist_init( );
+ playlist = mlt_playlist_new( profile );
}
if ( playlist != NULL )
{
#include <stdlib.h>
#include <string.h>
-static int create_instance( mlt_transition this, char *name, char *value, int count )
+static int create_instance( mlt_transition transition, char *name, char *value, int count )
{
// Return from this function
int error = 0;
*arg ++ = '\0';
// Create the filter
- mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( this ) );
+ mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( transition ) );
filter = mlt_factory_filter( profile, type, arg );
// If we have a filter, then initialise and store it
if ( filter != NULL )
{
- // Properties of this
- mlt_properties properties = MLT_TRANSITION_PROPERTIES( this );
+ // Properties of transition
+ mlt_properties properties = MLT_TRANSITION_PROPERTIES( transition );
// String to hold the property name
char id[ 256 ];
// Pass all the key properties on the filter down
mlt_properties_pass( MLT_FILTER_PROPERTIES( filter ), properties, key );
+ mlt_properties_pass_list( MLT_FILTER_PROPERTIES( filter ), properties, "in, out, length" );
// Ensure that filter is assigned
mlt_properties_set_data( properties, id, filter, 0, ( mlt_destructor )mlt_filter_close, NULL );
return error;
}
-static uint8_t *filter_get_alpha_mask( mlt_frame this )
+static uint8_t *filter_get_alpha_mask( mlt_frame frame )
{
uint8_t *alpha = NULL;
// Obtain properties of frame
- mlt_properties properties = MLT_FRAME_PROPERTIES( this );
+ mlt_properties properties = MLT_FRAME_PROPERTIES( frame );
// Get the shape frame
mlt_frame shape_frame = mlt_properties_get_data( properties, "shape_frame", NULL );
// Get the width and height of the image
- int region_width = mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "width" );
- int region_height = mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "height" );
+ int region_width = mlt_properties_get_int( properties, "width" );
+ int region_height = mlt_properties_get_int( properties, "height" );
uint8_t *image = NULL;
mlt_image_format format = mlt_image_yuv422;
alpha = mlt_frame_get_alpha_mask( shape_frame );
+ int size = region_width * region_height;
+ uint8_t *alpha_duplicate = mlt_pool_alloc( size );
+
// Generate from the Y component of the image if no alpha available
if ( alpha == NULL )
{
- int size = region_width * region_height;
- uint8_t *p = mlt_pool_alloc( size );
- alpha = p;
+ alpha = alpha_duplicate;
while ( size -- )
{
- *p ++ = ( int )( ( ( *image ++ - 16 ) * 299 ) / 255 );
+ *alpha ++ = ( int )( ( ( *image ++ - 16 ) * 299 ) / 255 );
image ++;
}
- mlt_frame_set_alpha( this, alpha, region_width * region_height, mlt_pool_release );
}
else
{
- mlt_frame_set_alpha( this, alpha, region_width * region_height, NULL );
+ memcpy( alpha_duplicate, alpha, size );
}
+ mlt_frame_set_alpha( frame, alpha_duplicate, region_width * region_height, mlt_pool_release );
- return alpha;
+ return alpha_duplicate;
}
/** Do it :-).
mlt_frame b_frame = mlt_frame_pop_frame( frame );
// Get the watermark transition object
- mlt_transition this = mlt_frame_pop_service( frame );
+ mlt_transition transition = mlt_frame_pop_service( frame );
// Get the properties of the transition
- mlt_properties properties = MLT_TRANSITION_PROPERTIES( this );
+ mlt_properties properties = MLT_TRANSITION_PROPERTIES( transition );
+
+ // Get the properties of the a frame
+ mlt_properties a_props = MLT_FRAME_PROPERTIES( frame );
- mlt_service_lock( MLT_TRANSITION_SERVICE( this ) );
+ mlt_service_lock( MLT_TRANSITION_SERVICE( transition ) );
// Get the composite from the transition
mlt_transition composite = mlt_properties_get_data( properties, "composite", NULL );
mlt_filter filter = mlt_properties_get_data( properties, "_filter_0", NULL );
// Get the position
- mlt_position position = mlt_transition_get_position( this, frame );
+ mlt_position position = mlt_transition_get_position( transition, frame );
// Create a composite if we don't have one
if ( composite == NULL )
{
// Create composite via the factory
- mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( this ) );
+ mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( transition ) );
composite = mlt_factory_transition( profile, "composite", NULL );
// If we have one
char *value = mlt_properties_get_value( properties, i );
// Create an instance
- if ( create_instance( this, name, value, count ) == 0 )
+ if ( create_instance( transition, name, value, count ) == 0 )
count ++;
}
}
}
}
- mlt_properties_set_int( MLT_FRAME_PROPERTIES( frame ), "width", *width );
- mlt_properties_set_int( MLT_FRAME_PROPERTIES( frame ), "height", *height );
+ mlt_properties_set_int( a_props, "width", *width );
+ mlt_properties_set_int( a_props, "height", *height );
// Only continue if we have both filter and composite
if ( composite != NULL )
// Ensure a destructor
char *name = mlt_properties_get( properties, "_unique_id" );
- mlt_properties_set_data( MLT_FRAME_PROPERTIES( frame ), name, b_frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
+ mlt_properties_set_data( a_props, name, b_frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
}
+ // Properties of the B frame
+ mlt_properties b_props = MLT_FRAME_PROPERTIES( b_frame );
+
// filter_only prevents copying the alpha channel of the shape to the output frame
// by compositing filtered frame over itself
if ( mlt_properties_get_int( properties, "filter_only" ) )
{
+ char *name = mlt_properties_get( properties, "_unique_id" );
frame = composite_copy_region( composite, b_frame, position );
+ mlt_properties_set_data( b_props, name, frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
}
// Make sure the filter is in the correct position
resource = "pixbuf:<svg width='100' height='100'><circle cx='50' cy='50' r='50' fill='black'/></svg>";
// Create the producer
- mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( this ) );
+ mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( transition ) );
producer = mlt_factory_producer( profile, factory, resource );
// If we have one
if ( mlt_service_get_frame( MLT_PRODUCER_SERVICE( producer ), &shape_frame, 0 ) == 0 )
{
// Ensure that the shape frame will be closed
- mlt_properties_set_data( MLT_FRAME_PROPERTIES( b_frame ), "shape_frame", shape_frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
+ mlt_properties_set_data( b_props, "shape_frame", shape_frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
// Specify the callback for evaluation
b_frame->get_alpha_mask = filter_get_alpha_mask;
error = mlt_frame_get_image( frame, image, format, width, height, 0 );
}
- mlt_service_unlock( MLT_TRANSITION_SERVICE( this ) );
+ mlt_service_unlock( MLT_TRANSITION_SERVICE( transition ) );
return error;
}
/** Filter processing.
*/
-static mlt_frame transition_process( mlt_transition this, mlt_frame a_frame, mlt_frame b_frame )
+static mlt_frame transition_process( mlt_transition transition, mlt_frame a_frame, mlt_frame b_frame )
{
// Push the transition on to the frame
- mlt_frame_push_service( a_frame, this );
+ mlt_frame_push_service( a_frame, transition );
// Push the b_frame on to the stack
mlt_frame_push_frame( a_frame, b_frame );
mlt_transition transition_region_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
{
// Create a new transition
- mlt_transition this = mlt_transition_new( );
+ mlt_transition transition = mlt_transition_new( );
// Further initialisation
- if ( this != NULL )
+ if ( transition != NULL )
{
// Get the properties from the transition
- mlt_properties properties = MLT_TRANSITION_PROPERTIES( this );
+ mlt_properties properties = MLT_TRANSITION_PROPERTIES( transition );
// Assign the transition process method
- this->process = transition_process;
+ transition->process = transition_process;
// Default factory
mlt_properties_set( properties, "factory", mlt_environment( "MLT_PRODUCER" ) );
}
// Return the transition
- return this;
+ return transition;
}
char *dest = jack_port_get_buffer( self->ports[i], frames );
jack_ringbuffer_read( self->ringbuffers[i], dest, ring_size < jack_size ? ring_size : jack_size );
+ if ( ring_size < jack_size )
+ memset( dest + ring_size, 0, jack_size - ring_size );
}
return error;
mlt_audio_format afmt = mlt_audio_float;
// Set the preferred params of the test card signal
+ double speed = mlt_properties_get_double( MLT_FRAME_PROPERTIES(frame), "_speed" );
int channels = mlt_properties_get_int( properties, "channels" );
int frequency = mlt_properties_get_int( properties, "frequency" );
+ int scrub = mlt_properties_get_int( properties, "scrub_audio" );
int samples = mlt_sample_calculator( mlt_properties_get_double( properties, "fps" ), frequency, self->counter++ );
float *buffer;
init_audio = 0;
}
- if ( init_audio == 0 )
+ if ( init_audio == 0 && ( speed == 1.0 || speed == 0.0 ) )
{
int i;
size_t mlt_size = samples * sizeof(float);
float volume = mlt_properties_get_double( properties, "volume" );
+ if ( !scrub && speed == 0.0 )
+ volume = 0.0;
+
if ( volume != 1.0 )
{
float *p = buffer;
type: integer
minimum: 1
default: 2
+
- identifier: out_1
title: Send L
type: string
+
- identifier: out_2
title: Send R
type: string
+
- identifier: volume
title: Volume
type: float
minimum: 0.0
default: 1.0
+
- identifier: refresh
description: >
Applications should set this to update the video frame when paused.
type: integer
minimum: 0
maximum: 1
+
+ - identifier: audio_off
+ title: Audio off
+ type: integer
+ description: If 1, disable audio output
+ mutable: yes
+ minimum: 0
+ maximum: 1
+ default: 0
+ widget: checkbox
+
+ - identifier: scrub_audio
+ title: Audio scrubbing
+ type: integer
+ description: If enabled, sound is played even when the speed is not normal.
+ mutable: yes
+ minimum: 0
+ maximum: 1
+ default: 0
+ widget: checkbox
static void on_jack_start( mlt_properties owner, mlt_properties properties )
{
- fprintf(stderr, "%s\n", __FUNCTION__);
+ mlt_log_verbose( NULL, "%s\n", __FUNCTION__ );
jack_client_t *jack_client = mlt_properties_get_data( properties, "jack_client", NULL );
jack_transport_start( jack_client );
}
static void on_jack_stop( mlt_properties owner, mlt_properties properties )
{
- fprintf(stderr, "%s\n", __FUNCTION__);
+ mlt_log_verbose( NULL, "%s\n", __FUNCTION__ );
jack_client_t *jack_client = mlt_properties_get_data( properties, "jack_client", NULL );
jack_transport_stop( jack_client );
}
static void on_jack_seek( mlt_properties owner, mlt_filter filter, mlt_position *position )
{
mlt_properties properties = MLT_FILTER_PROPERTIES( filter );
-
+ mlt_log_verbose( MLT_FILTER_SERVICE(filter), "%s: %d\n", __FUNCTION__, *position );
mlt_properties_set_int( properties, "_sync_guard", 1 );
mlt_properties_set_position( properties, "_jack_seek", *position );
jack_nframes_t jack_frame = jack_get_sample_rate( jack_client );
jack_frame *= *position / mlt_profile_fps( profile );
- fprintf(stderr, "%s: %d\n", __FUNCTION__, *position);
jack_transport_locate( jack_client, jack_frame );
}
}
ring_size = jack_ringbuffer_read_space( output_buffers[i] );
jack_ringbuffer_read( output_buffers[i], ( char * )jack_output_buffers[i], ring_size < jack_size ? ring_size : jack_size );
+ if ( ring_size < jack_size )
+ memset( &jack_output_buffers[i][ring_size], 0, jack_size - ring_size );
// Return audio through in port
jack_input_buffers[i] = jack_port_get_buffer( jack_input_ports[i], frames );
// Set the preferred params of the test card signal
int channels = mlt_properties_get_int( properties, "channels" );
int frequency = mlt_properties_get_int( properties, "frequency" );
+ int scrub = mlt_properties_get_int( properties, "scrub_audio" );
static int counter = 0;
int samples = mlt_sample_calculator( mlt_properties_get_double( properties, "fps" ), frequency, counter++ );
int16_t *pcm;
pthread_cond_wait( &audio_cond, &audio_mutex );
if ( running )
{
- if ( mlt_properties_get_double( properties, "_speed" ) == 1 )
+ if ( scrub || mlt_properties_get_double( properties, "_speed" ) == 1 )
memcpy( &audio_buffer[ audio_avail ], pcm, bytes );
else
memset( &audio_buffer[ audio_avail ], 0, bytes );
type: integer
minimum: 0
maximum: 1
+
+ - identifier: scrub_audio
+ title: Audio scrubbing
+ type: integer
+ description: If enabled, sound is played even when the speed is not normal.
+ mutable: yes
+ minimum: 0
+ maximum: 1
+ default: 0
+ widget: checkbox
// Set the preferred params of the test card signal
int channels = mlt_properties_get_int( properties, "channels" );
int frequency = mlt_properties_get_int( properties, "frequency" );
+ int scrub = mlt_properties_get_int( properties, "scrub_audio" );
static int counter = 0;
int samples = mlt_sample_calculator( mlt_properties_get_double( self->properties, "fps" ), frequency, counter++ );
pthread_cond_wait( &self->audio_cond, &self->audio_mutex );
if ( self->running )
{
- if ( mlt_properties_get_double( properties, "_speed" ) == 1 )
+ if ( scrub || mlt_properties_get_double( properties, "_speed" ) == 1 )
memcpy( &self->audio_buffer[ self->audio_avail ], pcm, bytes );
else
memset( &self->audio_buffer[ self->audio_avail ], 0, bytes );
language: en
tags:
- Audio
+description: >
+ Simple DirectMedia Layer audio only output module.
+
+parameters:
+ - identifier: volume
+ title: Volume
+ type: float
+ description: Audio level factor.
+ mutable: yes
+
+ - identifier: audio_off
+ title: Audio off
+ type: integer
+ description: If 1, disable audio output
+ mutable: yes
+ minimum: 0
+ maximum: 1
+ default: 0
+ widget: checkbox
+
+ - identifier: audio_buffer
+ title: Audio buffer
+ type: integer
+ description: Size of the sdl audio buffer.
+ mutable: yes
+ default: 2048
+ minimum: 128
+
+ - identifier: scrub_audio
+ title: Audio scrubbing
+ type: integer
+ description: If enabled, sound is played even when the speed is not normal.
+ mutable: yes
+ minimum: 0
+ maximum: 1
+ default: 0
+ widget: checkbox
static void on_start_playlist( deserialise_context context, const xmlChar *name, const xmlChar **atts)
{
- mlt_playlist playlist = mlt_playlist_init( );
+ mlt_playlist playlist = mlt_playlist_new( context->profile );
mlt_service service = MLT_PLAYLIST_SERVICE( playlist );
mlt_properties properties = MLT_SERVICE_PROPERTIES( service );
// Get the playlist from the stack
enum service_type type;
mlt_service service = context_pop_service( context, &type );
- mlt_position length = 0;
if ( type == mlt_playlist_type && service != NULL )
{
{
if ( xmlStrcmp( atts[0], _x("length") ) == 0 )
{
- length = atoll( _s(atts[1]) );
+ // Append a blank to the playlist
+ mlt_playlist_blank_time( MLT_PLAYLIST( service ), _s(atts[1]) );
break;
}
}
- // Append a blank to the playlist
- mlt_playlist_blank( MLT_PLAYLIST( service ), length - 1 );
-
// Push the playlist back onto the stack
context_push_service( context, service, type );
}
case ':':
case '=':
- url[ i++ ] = '\0';
- value = &url[ i ];
+#ifdef WIN32
+ if ( url[i] == ':' && url[i + 1] != '/' )
+ {
+#endif
+ url[ i++ ] = '\0';
+ value = &url[ i ];
+#ifdef WIN32
+ }
+#endif
break;
case '&':