]> git.sesse.net Git - mlt/blobdiff - src/modules/avformat/factory.c
avformat/factory.c, jackrack/jack_rack.c, jackrack/plugin_settings.c, vmfx/filter_chr...
[mlt] / src / modules / avformat / factory.c
index bf01e9589b0e924bcf624a964693487ddf809804..5ccb204f4518167d83f104860a46e4ea54f44f4c 100644 (file)
@@ -3,19 +3,19 @@
  * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
  * Author: Charles Yates <charles.yates@pandora.be>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <string.h>
 #include <framework/mlt_factory.h>
 #include "producer_avformat.h"
 #include "consumer_avformat.h"
+#include "filter_avcolour_space.h"
+#include "filter_avdeinterlace.h"
+#include "filter_avresample.h"
 
 // ffmpeg Header files
-#include <ffmpeg/avformat.h>
+#include <avformat.h>
 
 // A static flag used to determine if avformat has been initialised
 static int avformat_initialised = 0;
@@ -57,7 +60,7 @@ void av_free( void *ptr )
 void avformat_destroy( void *ignore )
 {
        // Clean up
-       av_free_static( );
+       // av_free_static( ); -XXX this is deprecated
 
        // Destroy the mutex
        pthread_mutex_destroy( &avformat_mutex );
@@ -84,6 +87,7 @@ static void avformat_init( )
                pthread_mutex_init( &avformat_mutex, NULL );
                av_register_all( );
                mlt_factory_register_for_clean_up( NULL, avformat_destroy );
+               av_log_set_level( -1 );
        }
 }
 
@@ -97,6 +101,15 @@ void *mlt_create_producer( char *id, void *arg )
 
 void *mlt_create_filter( char *id, void *arg )
 {
+       avformat_init( );
+       if ( !strcmp( id, "avcolour_space" ) )
+               return filter_avcolour_space_init( arg );
+#ifdef USE_MMX
+       if ( !strcmp( id, "avdeinterlace" ) )
+               return filter_avdeinterlace_init( arg );
+#endif
+       if ( !strcmp( id, "avresample" ) )
+               return filter_avresample_init( arg );
        return NULL;
 }