]> git.sesse.net Git - vlc/blobdiff - modules/codec/ffmpeg/encoder.c
* browsed through all code files starting with A to F and added non-blocking intf_Use...
[vlc] / modules / codec / ffmpeg / encoder.c
index 2f389461eea3b542a4d36faea9773bd022ffe157..7de89dccacff711e95f5367177cb583c4846b1f7 100644 (file)
@@ -33,6 +33,7 @@
 #include <vlc/aout.h>
 #include <vlc/sout.h>
 #include <vlc/decoder.h>
+#include <vlc_interaction.h>
 
 /* ffmpeg header */
 #define HAVE_MMX 1
@@ -224,12 +225,16 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
     if( p_enc->fmt_out.i_cat == VIDEO_ES && i_cat != VIDEO_ES )
     {
         msg_Err( p_enc, "\"%s\" is not a video encoder", psz_namecodec );
+        intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"), 
+                        _("\"%s\" is no video encoder."), psz_namecodec );
         return VLC_EGENERIC;
     }
 
     if( p_enc->fmt_out.i_cat == AUDIO_ES && i_cat != AUDIO_ES )
     {
         msg_Err( p_enc, "\"%s\" is not an audio encoder", psz_namecodec );
+        intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"), 
+                        _("\"%s\" is no audio encoder."), psz_namecodec );
         return VLC_EGENERIC;
     }
 
@@ -240,6 +245,8 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
     if( !p_codec )
     {
         msg_Err( p_enc, "cannot find encoder %s", psz_namecodec );
+        intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"), 
+                        _("VLC could not find encoder \"%s\"."), psz_namecodec );
         return VLC_EGENERIC;
     }
 
@@ -609,6 +616,8 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
             {
                 vlc_mutex_unlock( lockval.p_address );
                 msg_Err( p_enc, "cannot open encoder" );
+                intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"), 
+                                _("VLC could not open the encoder.") );
                 free( p_sys );
                 return VLC_EGENERIC;
             }
@@ -616,6 +625,8 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
         else
         {
             msg_Err( p_enc, "cannot open encoder" );
+            intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"), 
+                            _("VLC could not open the encoder.") );
             free( p_sys );
             return VLC_EGENERIC;
         }