return ret;
}
+/* Will this break when mlt_position is converted to double? -Zach */
int mlt_sample_calculator( float fps, int frequency, int64_t position )
{
int samples = 0;
{
int count = this->list[ i ]->frame_count / this->list[ i ]->repeat;
*progressive = count == 1;
- mlt_producer_seek( producer, position % count );
+ mlt_producer_seek( producer, (int)position % count );
}
else if ( !strcmp( eof, "pause" ) && total > 0 )
{
mlt_producer this_producer = MLT_PLAYLIST_PRODUCER( this );
mlt_producer_seek( this_producer, original - 1 );
producer = entry->producer;
- mlt_producer_seek( producer, entry->frame_out % count );
+ mlt_producer_seek( producer, (int)entry->frame_out % count );
mlt_producer_set_speed( this_producer, 0 );
mlt_producer_set_speed( producer, 0 );
*progressive = count == 1;
/** Return the clip at the specified position.
*/
-mlt_producer mlt_playlist_get_clip_at( mlt_playlist this, int position )
+mlt_producer mlt_playlist_get_clip_at( mlt_playlist this, mlt_position position )
{
int index = 0, total = 0;
return mlt_playlist_locate( this, &position, &index, &total );
/** Return the clip index of the specified position.
*/
-int mlt_playlist_get_clip_index_at( mlt_playlist this, int position )
+int mlt_playlist_get_clip_index_at( mlt_playlist this, mlt_position position )
{
int index = 0, total = 0;
mlt_playlist_locate( this, &position, &index, &total );
/** Determine if the specified position is a blank.
*/
-int mlt_playlist_is_blank_at( mlt_playlist this, int position )
+int mlt_playlist_is_blank_at( mlt_playlist this, mlt_position position )
{
return this == NULL || mlt_producer_is_blank( mlt_playlist_get_clip_at( this, position ) );
}
}
}
-void mlt_playlist_pad_blanks( mlt_playlist this, int position, int length, int find )
+void mlt_playlist_pad_blanks( mlt_playlist this, mlt_position position, int length, int find )
{
if ( this != NULL && length != 0 )
{
}
}
-int mlt_playlist_insert_at( mlt_playlist this, int position, mlt_producer producer, int mode )
+int mlt_playlist_insert_at( mlt_playlist this, mlt_position position, mlt_producer producer, int mode )
{
int ret = this == NULL || position < 0 || producer == NULL;
if ( ret == 0 )
return count;
}
-int mlt_playlist_remove_region( mlt_playlist this, int position, int length )
+int mlt_playlist_remove_region( mlt_playlist this, mlt_position position, int length )
{
int index = mlt_playlist_get_clip_index_at( this, position );
if ( index >= 0 && index < this->count )
return index;
}
-int mlt_playlist_move_region( mlt_playlist this, int position, int length, int new_position )
+int mlt_playlist_move_region( mlt_playlist this, mlt_position position, int length, int new_position )
{
if ( this != NULL )
{
extern int mlt_playlist_mix( mlt_playlist self, int clip, int length, mlt_transition transition );
extern int mlt_playlist_mix_add( mlt_playlist self, int clip, mlt_transition transition );
extern mlt_producer mlt_playlist_get_clip( mlt_playlist self, int clip );
-extern mlt_producer mlt_playlist_get_clip_at( mlt_playlist self, int position );
-extern int mlt_playlist_get_clip_index_at( mlt_playlist self, int position );
+extern mlt_producer mlt_playlist_get_clip_at( mlt_playlist self, mlt_position position );
+extern int mlt_playlist_get_clip_index_at( mlt_playlist self, mlt_position position );
extern int mlt_playlist_clip_is_mix( mlt_playlist self, int clip );
extern void mlt_playlist_consolidate_blanks( mlt_playlist self, int keep_length );
extern int mlt_playlist_is_blank( mlt_playlist self, int clip );
-extern int mlt_playlist_is_blank_at( mlt_playlist self, int position );
+extern int mlt_playlist_is_blank_at( mlt_playlist self, mlt_position position );
extern void mlt_playlist_insert_blank( mlt_playlist self, int clip, int length );
-extern void mlt_playlist_pad_blanks( mlt_playlist self, int position, int length, int find );
+extern void mlt_playlist_pad_blanks( mlt_playlist self, mlt_position position, int length, int find );
extern mlt_producer mlt_playlist_replace_with_blank( mlt_playlist self, int clip );
-extern int mlt_playlist_insert_at( mlt_playlist self, int position, mlt_producer producer, int mode );
+extern int mlt_playlist_insert_at( mlt_playlist self, mlt_position position, mlt_producer producer, int mode );
extern int mlt_playlist_clip_start( mlt_playlist self, int clip );
extern int mlt_playlist_clip_length( mlt_playlist self, int clip );
extern int mlt_playlist_blanks_from( mlt_playlist self, int clip, int bounded );
-extern int mlt_playlist_remove_region( mlt_playlist self, int position, int length );
-extern int mlt_playlist_move_region( mlt_playlist self, int position, int length, int new_position );
+extern int mlt_playlist_remove_region( mlt_playlist self, mlt_position position, int length );
+extern int mlt_playlist_move_region( mlt_playlist self, mlt_position position, int length, int new_position );
extern void mlt_playlist_close( mlt_playlist self );
#endif
}
else if ( use_points && !strcmp( eof, "loop" ) && position >= mlt_producer_get_playtime( this ) )
{
- position = position % mlt_producer_get_playtime( this );
+ position = (int)position % (int)mlt_producer_get_playtime( this );
}
// Set the position
{
this->types |= mlt_prop_string;
this->prop_string = malloc( 32 );
- sprintf( this->prop_string, "%d", this->prop_position );
+ sprintf( this->prop_string, "%d", (int)this->prop_position ); /* I don't know if this is wanted. -Zach */
}
else if ( this->types & mlt_prop_int64 )
{
}
mlt_service_type;
+/* I don't want to break anyone's applications without warning. -Zach */
+#undef DOUBLE_MLT_POSITION
+#ifdef DOUBLE_MLT_POSITION
+typedef double mlt_position;
+#else
typedef int32_t mlt_position;
+#endif
+
typedef struct mlt_frame_s *mlt_frame, **mlt_frame_ptr;
typedef struct mlt_properties_s *mlt_properties;
typedef struct mlt_event_struct *mlt_event;