]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/rv32.c
Move last.fm password from PasswordShowOnEdit to Password.
[vlc] / modules / video_filter / rv32.c
index 3d056cd697f4ea8131a3accf76fbbe3504b10e6c..10c56995086892accff9fb7002a38283e3452a74 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <vlc/vlc.h>
-#include <vlc/decoder.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_vout.h>
 #include "vlc_filter.h"
 
 /*****************************************************************************
@@ -49,7 +54,7 @@ static picture_t *Filter( filter_t *, picture_t * );
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("RV32 conversion filter") );
+    set_description( N_("RV32 conversion filter") );
     set_capability( "video filter2", 1 );
     set_callbacks( OpenFilter, CloseFilter );
 vlc_module_end();
@@ -72,10 +77,7 @@ static int OpenFilter( vlc_object_t *p_this )
     /* Allocate the memory needed to store the decoder's structure */
     if( ( p_filter->p_sys = p_sys =
           (filter_sys_t *)malloc(sizeof(filter_sys_t)) ) == NULL )
-    {
-        msg_Err( p_filter, "out of memory" );
-        return VLC_EGENERIC;
-    }
+        return VLC_ENOMEM;
 
     p_filter->pf_video_filter = Filter;
 
@@ -103,12 +105,10 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     unsigned int j;
 
     /* Request output picture */
-    p_pic_dst = p_filter->pf_vout_buffer_new( p_filter );
+    p_pic_dst = filter_NewPicture( p_filter );
     if( !p_pic_dst )
     {
-        msg_Warn( p_filter, "can't get output picture" );
-        if( p_pic->pf_release )
-            p_pic->pf_release( p_pic );
+        picture_Release( p_pic );
         return NULL;
     }
 
@@ -134,13 +134,9 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         }
     }
 
-    p_pic_dst->date = p_pic->date;
-    p_pic_dst->b_force = p_pic->b_force;
-    p_pic_dst->i_nb_fields = p_pic->i_nb_fields;
-    p_pic_dst->b_progressive = p_pic->b_progressive;
-    p_pic_dst->b_top_field_first = p_pic->b_top_field_first;
+    picture_CopyProperties( p_pic_dst, p_pic );
+    picture_Release( p_pic );
 
-    p_pic->pf_release( p_pic );
     return p_pic_dst;
 }