producer( new Producer( info->producer ) ),
cut( new Producer( info->cut ) ),
start( info->start ),
- resource( strdup( info->resource ) ),
+ resource( info->resource? strdup( info->resource ) : 0 ),
frame_in( info->frame_in ),
frame_out( info->frame_out ),
frame_count( info->frame_count ),
}
Playlist::Playlist( Playlist &playlist ) :
+ Mlt::Producer( playlist ),
instance( playlist.get_playlist( ) )
{
inc_ref( );
ClipInfo *Playlist::clip_info( int index, ClipInfo *info )
{
mlt_playlist_clip_info clip_info;
- mlt_playlist_get_clip_info( get_playlist( ), &clip_info, index );
+ if ( mlt_playlist_get_clip_info( get_playlist( ), &clip_info, index ) )
+ return NULL;
if ( info == NULL )
return new ClipInfo( &clip_info );
info->update( &clip_info );
return info;
}
+void Playlist::delete_clip_info( ClipInfo *info )
+{
+ delete info;
+}
+
int Playlist::insert( Producer &producer, int where, int in, int out )
{
return mlt_playlist_insert( get_playlist( ), producer.get_producer( ), where, in, out );
return mlt_playlist_split( get_playlist( ), clip, position );
}
+int Playlist::split_at( int position, bool left )
+{
+ return mlt_playlist_split_at( get_playlist( ), position, left );
+}
+
int Playlist::join( int clip, int count, int merge )
{
return mlt_playlist_join( get_playlist( ), clip, count, merge );
bool Playlist::is_blank( int clip )
{
- return mlt_playlist_is_blank( get_playlist( ), clip );
+ return mlt_playlist_is_blank( get_playlist( ), clip ) != 0;
+}
+
+bool Playlist::is_blank_at( int position )
+{
+ return mlt_playlist_is_blank_at( get_playlist( ), position ) != 0;
}
Producer *Playlist::replace_with_blank( int clip )
{
return mlt_playlist_consolidate_blanks( get_playlist( ), keep_length );
}
+
+void Playlist::insert_blank( int clip, int length )
+{
+ mlt_playlist_insert_blank( get_playlist( ), clip, length );
+}
+
+void Playlist::pad_blanks( int position, int length, int find )
+{
+ mlt_playlist_pad_blanks( get_playlist( ), position, length, find );
+}
+
+int Playlist::insert_at( int position, Producer *producer, int mode )
+{
+ return mlt_playlist_insert_at( get_playlist( ), position, producer->get_producer( ), mode );
+}
+
+int Playlist::insert_at( int position, Producer &producer, int mode )
+{
+ return mlt_playlist_insert_at( get_playlist( ), position, producer.get_producer( ), mode );
+}
+
+int Playlist::clip_start( int clip )
+{
+ return mlt_playlist_clip_start( get_playlist( ), clip );
+}
+
+int Playlist::blanks_from( int clip, int bounded )
+{
+ return mlt_playlist_blanks_from( get_playlist( ), clip, bounded );
+}
+
+int Playlist::clip_length( int clip )
+{
+ return mlt_playlist_clip_length( get_playlist( ), clip );
+}
+
+int Playlist::remove_region( int position, int length )
+{
+ return mlt_playlist_remove_region( get_playlist( ), position, length );
+}
+
+int Playlist::move_region( int position, int length, int new_position )
+{
+ return mlt_playlist_move_region( get_playlist( ), position, length, new_position );
+}
+