]> git.sesse.net Git - vlc/blobdiff - src/misc/image.c
Add obsolete option for all --*-caching values
[vlc] / src / misc / image.c
index e6e3109c9b95d8518a5c9a29978e4f18cf8d2499..63e7e4347c621376222aad4f4ae15d0785de1dc2 100644 (file)
 #include <vlc_es.h>
 #include <vlc_image.h>
 #include <vlc_stream.h>
-#include <vlc_charset.h>
+#include <vlc_fs.h>
 #include <vlc_sout.h>
 #include <libvlc.h>
+#include <vlc_modules.h>
 
 static picture_t *ImageRead( image_handler_t *, block_t *,
                              video_format_t *, video_format_t * );
@@ -377,7 +378,7 @@ static int ImageWriteUrl( image_handler_t *p_image, picture_t *p_pic,
         p_fmt_out->i_chroma = image_Ext2Fourcc( psz_url );
     }
 
-    file = utf8_fopen( psz_url, "wb" );
+    file = vlc_fopen( psz_url, "wb" );
     if( !file )
     {
         msg_Err( p_image->p_parent, "%s: %m", psz_url );
@@ -609,7 +610,7 @@ static const struct
     { VLC_CODEC_PCX,               "image/pcx" },
     { VLC_CODEC_PNG,               "image/png" },
     { VLC_CODEC_TIFF,              "image/tiff" },
-    { VLC_CODEC_TARGA,             "iamge/x-tga" },
+    { VLC_CODEC_TARGA,             "image/x-tga" },
     { VLC_FOURCC('x','p','m',' '), "image/x-xpixmap" },
     { 0, NULL }
 };
@@ -655,8 +656,7 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
 {
     decoder_t *p_dec;
 
-    p_dec = vlc_custom_create( p_this, sizeof( *p_dec ), VLC_OBJECT_GENERIC,
-                               "image decoder" );
+    p_dec = vlc_custom_create( p_this, sizeof( *p_dec ), "image decoder" );
     if( p_dec == NULL )
         return NULL;
 
@@ -671,8 +671,6 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
     p_dec->pf_picture_link    = video_link_picture;
     p_dec->pf_picture_unlink  = video_unlink_picture;
 
-    vlc_object_attach( p_dec, p_this );
-
     /* Find a suitable decoder module */
     p_dec->p_module = module_need( p_dec, "decoder", "$codec", false );
     if( !p_dec->p_module )
@@ -751,8 +749,6 @@ static encoder_t *CreateEncoder( vlc_object_t *p_this, video_format_t *fmt_in,
     p_enc->fmt_out.video.i_width = p_enc->fmt_in.video.i_width;
     p_enc->fmt_out.video.i_height = p_enc->fmt_in.video.i_height;
 
-    vlc_object_attach( p_enc, p_this );
-
     /* Find a suitable decoder module */
     p_enc->p_module = module_need( p_enc, "encoder", NULL, false );
     if( !p_enc->p_module )
@@ -784,13 +780,9 @@ static filter_t *CreateFilter( vlc_object_t *p_this, es_format_t *p_fmt_in,
                                video_format_t *p_fmt_out,
                                const char *psz_module )
 {
-    static const char typename[] = "filter";
     filter_t *p_filter;
 
-    p_filter = vlc_custom_create( p_this, sizeof(filter_t),
-                                  VLC_OBJECT_GENERIC, typename );
-    vlc_object_attach( p_filter, p_this );
-
+    p_filter = vlc_custom_create( p_this, sizeof(filter_t), "filter" );
     p_filter->pf_video_buffer_new =
         (picture_t *(*)(filter_t *))video_new_buffer;
     p_filter->pf_video_buffer_del =