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 );
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 );
+ return mlt_playlist_is_blank_at( get_playlist( ), position ) != 0;
}
Producer *Playlist::replace_with_blank( int clip )