/** Filter processing.
*/
-static mlt_frame filter_process( mlt_filter this, mlt_frame frame )
+static mlt_frame filter_process( mlt_filter filter, mlt_frame frame )
{
// Only call this if we have a means to get audio
if ( mlt_frame_is_test_audio( frame ) == 0 )
{
// Push the filter on to the stack
- mlt_frame_push_audio( frame, this );
+ mlt_frame_push_audio( frame, filter );
// Assign our get_audio method
mlt_frame_push_audio( frame, resample_get_audio );
mlt_filter filter_avresample_init( char *arg )
{
// Create a filter
- mlt_filter this = mlt_filter_new( );
+ mlt_filter filter = mlt_filter_new( );
// Initialise if successful
- if ( this != NULL )
+ if ( filter != NULL )
{
// Calculate size of the buffer
int size = AVCODEC_MAX_AUDIO_FRAME_SIZE * sizeof( int16_t );
int16_t *buffer = mlt_pool_alloc( size );
// Assign the process method
- this->process = filter_process;
+ filter->process = filter_process;
// Deal with argument
if ( arg != NULL )
- mlt_properties_set( MLT_FILTER_PROPERTIES( this ), "frequency", arg );
+ mlt_properties_set( MLT_FILTER_PROPERTIES( filter ), "frequency", arg );
// Default to 2 channel output
- mlt_properties_set_int( MLT_FILTER_PROPERTIES( this ), "channels", 2 );
+ mlt_properties_set_int( MLT_FILTER_PROPERTIES( filter ), "channels", 2 );
// Store the buffer
- mlt_properties_set_data( MLT_FILTER_PROPERTIES( this ), "buffer", buffer, size, mlt_pool_release, NULL );
+ mlt_properties_set_data( MLT_FILTER_PROPERTIES( filter ), "buffer", buffer, size, mlt_pool_release, NULL );
}
- return this;
+ return filter;
}