X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fsrc%2FMltPlaylist.cpp;h=14245947c7f7dce69a050a44c6f0a38dd5742f53;hb=c1dda4b336a041cef7ad422a9dffc4705c7128fa;hp=4b613b32d965bfc2a43b5ca64b7ec84d2d6bb181;hpb=e18ebb54d19da2259f74dfa107d2d5bdebd220be;p=melted diff --git a/mlt++/src/MltPlaylist.cpp b/mlt++/src/MltPlaylist.cpp index 4b613b3..1424594 100644 --- a/mlt++/src/MltPlaylist.cpp +++ b/mlt++/src/MltPlaylist.cpp @@ -44,7 +44,7 @@ ClipInfo::ClipInfo( mlt_playlist_clip_info *info ) : 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 ), @@ -96,6 +96,7 @@ Playlist::Playlist( Service &producer ) : } Playlist::Playlist( Playlist &playlist ) : + Mlt::Producer( playlist ), instance( playlist.get_playlist( ) ) { inc_ref( ); @@ -160,13 +161,19 @@ Producer *Playlist::current( ) 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 ); @@ -241,7 +248,12 @@ bool Playlist::is_mix( int clip ) 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 )