]> git.sesse.net Git - vlc/commitdiff
* browsed through all code files starting with A to F and added non-blocking intf_Use...
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 22 Aug 2006 23:22:14 +0000 (23:22 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 22 Aug 2006 23:22:14 +0000 (23:22 +0000)
I tried to select the most important msg_errs. If I missed your favourite, feel free to add it.
Feedback on the wording and the placement of the interaction calls is strongly welcomed.

For the records: I'm using some general topics for most of the dialogues to produce less work for the translators. The current ones go like this:
"Audio output failed", "Network interaction failed", "Streaming / Transcoding failed", "Audio filtering failed", "File reading failed", "Playback failure"

More to come.

16 files changed:
modules/access/cdda/access.c
modules/access/dshow/dshow.cpp
modules/access/dvb/access.c
modules/access/dvdnav.c
modules/access/dvdread.c
modules/access/file.c
modules/access/ftp.c
modules/access/rtsp/access.c
modules/audio_output/alsa.c
modules/audio_output/auhal.c
modules/codec/ffmpeg/encoder.c
modules/demux/asf/asf.c
modules/stream_out/es.c
modules/video_filter/crop.c
src/audio_output/filters.c
src/input/decoder.c

index 4c390aadc6e2c3df9e667d907517724d23febd53..3fa81698f3fb229464ddcf4ef0f895a4b8cf0646 100644 (file)
@@ -31,6 +31,7 @@
 #include "info.h"          /* headers for meta info retrieval */
 #include <vlc_playlist.h>  /* Has to come *after* cdda.h */
 #include "vlc_keys.h"
+#include <vlc_interaction.h>
 
 #include <cdio/cdio.h>
 #include <cdio/logging.h>
@@ -289,6 +290,9 @@ static block_t * CDDAReadBlocks( access_t * p_access )
     {
         msg_Err( p_access, "cannot get a new block of size: %i",
                 i_blocks * CDIO_CD_FRAMESIZE_RAW );
+        intf_UserFatal( p_access, VLC_FALSE, _("CD reading failed"), 
+                        _("VLC could not get a new block of size: %i."), 
+                        i_blocks * CDIO_CD_FRAMESIZE_RAW );
         return NULL;
     }
 
index acaa582c8e19c9b35592aa621d93cbe5392ec6ed..a160994a6f6de0b5393a935dc77902fa76622db8 100644 (file)
@@ -32,6 +32,7 @@
 #include <vlc/vlc.h>
 #include <vlc/input.h>
 #include <vlc/vout.h>
+#include <vlc_interaction.h>
 
 #include "common.h"
 #include "filter.h"
@@ -890,6 +891,9 @@ static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
     {
         msg_Err( p_this, "can't use device: %s, unsupported device type",
                  devicename.c_str() );
+        intf_UserFatal( p_vout, VLC_FALSE, _("Capturing failed"), 
+                        _("VLC cannot use the device \"%s\", because its device "
+                          "type is not supported.") );
         return VLC_EGENERIC;
     }
 
@@ -937,6 +941,9 @@ static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
     else {
         /* capture device */
         msg_Err( p_this, "capture device '%s' does not support required parameters !", devicename.c_str() );
+        intf_UserFatal( p_this, VLC_FALSE, _("Capturing failed"), 
+                        _("The capture device \"%s\" does not support the "
+                          "required parameters."), devicename.c_str() );
         p_device_filter->Release();
         return VLC_EGENERIC;
     }
index 0e0e297cfbabadc34c6db3600516e5f3217504d8..3c17b76482f8632205e5ed0787a7fc316b0bcf7e 100644 (file)
@@ -29,6 +29,7 @@
  *****************************************************************************/
 #include <vlc/vlc.h>
 #include <vlc/input.h>
+#include <vlc_interaction.h>
 
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
@@ -712,6 +713,9 @@ static int ParseMRL( access_t *p_access )
     {
         msg_Err( p_access, "the DVB input old syntax is deprecated, use vlc "
                           "-p dvb to see an explanation of the new syntax" );
+        intf_UserFatal( p_access, VLC_TRUE, _("Input syntax is deprecated"), 
+            _("The given syntax is deprecated. Run \"vlc -p dvb\" to see an " \
+                "explanation of the new syntax.") );
         free( psz_dup );
         return VLC_EGENERIC;
     }
@@ -756,6 +760,9 @@ static int ParseMRL( access_t *p_access )
             else
             {
                 msg_Err( p_access, "illegal polarization %c", *psz_parser );
+                intf_UserFatal( p_access, VLC_FALSE, _("Illegal Polarization"), 
+                                _("The provided polarization \"%c\" is not valid."),
+                                *psz_parser );
                 free( psz_dup );
                 return VLC_EGENERIC;
             }
index e7c3baa9032c71b2ee745ce8ead56a323922a3e3..8a768e3b56ce1644b1409da2f225c5b7d5318a03 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <vlc/vlc.h>
 #include <vlc/input.h>
+#include <vlc_interaction.h>
 
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
@@ -292,6 +293,9 @@ static int Open( vlc_object_t *p_this )
         if( dvdnav_title_play( p_sys->dvdnav, 1 ) != DVDNAV_STATUS_OK )
         {
             msg_Err( p_demux, "cannot set title (can't decrypt DVD?)" );
+            intf_UserFatal( p_demux, VLC_FALSE, _("Playback failure"), 
+                            _("VLC cannot set the DVD's title. It possibly "
+                              "cannot decrypt the entire disk.") );
             dvdnav_close( p_sys->dvdnav );
             free( p_sys );
             return VLC_EGENERIC;
index e6ed058835683bbc3f59c374508b859302da5e79..14bccedbf86fe6bfd7537dc1518e0ae5411a6231 100644 (file)
@@ -1,10 +1,10 @@
 /*****************************************************************************
  * dvdread.c : DvdRead input module for vlc
  *****************************************************************************
- * Copyright (C) 2001-2004 the VideoLAN team
+ * Copyright (C) 2001-2006 the VideoLAN team
  * $Id$
  *
- * Authors: Sthane Borel <stef@via.ecp.fr>
+ * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Gildas Bazin <gbazin@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -31,6 +31,7 @@
 
 #include <vlc/vlc.h>
 #include <vlc/input.h>
+#include <vlc_interaction.h>
 
 #include "iso_lang.h"
 
@@ -232,6 +233,8 @@ static int Open( vlc_object_t *p_this )
     if( !(p_dvdread = DVDOpen( psz_name )) )
     {
         msg_Err( p_demux, "DVDRead cannot open source: %s", psz_name );
+        intf_UserFatal( p_demux, VLC_FALSE, _("Playback failure"), 
+                        _("DVDRead could not open disk \"%s\"."), psz_name );
         free( psz_name );
         return VLC_EGENERIC;
     }
@@ -489,6 +492,9 @@ static int Demux( demux_t *p_demux )
                            1, p_buffer ) != 1 )
         {
             msg_Err( p_demux, "read failed for block %d", p_sys->i_next_vobu );
+            intf_UserWarn( p_demux, _("Playback failure"), 
+                            _("DVDRead could not read block %d."),
+                           p_sys->i_next_vobu );
             return -1;
         }
 
@@ -548,6 +554,9 @@ static int Demux( demux_t *p_demux )
     {
         msg_Err( p_demux, "read failed for %d/%d blocks at 0x%02x",
                  i_read, i_blocks_once, p_sys->i_cur_block );
+        intf_UserFatal( p_demux, VLC_FALSE, _("Playback failure"), 
+                        _("DVDRead could not read %d/%d blocks at 0x%02x."),
+                        i_read, i_blocks_once, p_sys->i_cur_block );
         return -1;
     }
 
index bbb295be092e8721fb66e4125cb5cb4f54abd3a1..0c876749e1a103b8c6f43e2827113f96e409353b 100644 (file)
@@ -27,6 +27,7 @@
  *****************************************************************************/
 #include <vlc/vlc.h>
 #include <vlc/input.h>
+#include <vlc_interaction.h>
 
 #include <stdlib.h>
 #include <string.h>
@@ -244,6 +245,9 @@ static int Open( vlc_object_t *p_this )
         else
         {
             msg_Err( p_access, "unknown file type for `%s'", psz_name );
+            intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"), 
+                            _("\"%s\"'s file type is unknown."),
+                            psz_name );
             free( psz_name );
             return VLC_EGENERIC;
         }
@@ -408,7 +412,12 @@ static int Read( access_t *p_access, uint8_t *p_buffer, int i_len )
     if( i_ret < 0 )
     {
         if( errno != EINTR && errno != EAGAIN )
+        {
             msg_Err( p_access, "read failed (%s)", strerror(errno) );
+            intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"), 
+                            _("VLC could not read file \"%s\"."),
+                            strerror(errno) );
+        }
 
         /* Delay a bit to avoid consuming all the CPU. This is particularly
          * useful when reading from an unconnected FIFO. */
@@ -507,6 +516,10 @@ static int Seek( access_t *p_access, int64_t i_pos )
     if( p_access->info.i_size < p_access->info.i_pos )
     {
         msg_Err( p_access, "seeking too far" );
+        intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"), 
+                        _("VLC seeked in the file too far. This usually means "
+                          "that your file is broken and therefore cannot be "
+                          "played." ) );
         p_access->info.i_pos = p_access->info.i_size;
     }
     else if( p_access->info.i_pos < 0 )
@@ -590,6 +603,8 @@ static int _OpenFile( access_t * p_access, const char * psz_name )
     if ( !p_sys->fd )
     {
         msg_Err( p_access, "cannot open file %s", psz_name );
+        intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"), 
+                        _("VLC could not open file \"%s\"."), psz_name );
         return VLC_EGENERIC;
     }
 
@@ -613,6 +628,9 @@ static int _OpenFile( access_t * p_access, const char * psz_name )
     {
         msg_Err( p_access, "cannot open file %s (%s)", psz_name,
                  strerror(errno) );
+        intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"), 
+                        _("VLC could not open file \"%s\" (%s)."),
+                        psz_name, strerror(errno) );
         return VLC_EGENERIC;
     }
 
index 70728ba3fd61f6feab734c2a6a90b0fbd1f8de78..7aa7ae64e6d9a74a1d6222633c2a7be81d302c43 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <vlc/vlc.h>
 #include <vlc/input.h>
+#include <vlc_interaction.h>
 
 #include "network.h"
 #include "vlc_url.h"
@@ -105,6 +106,8 @@ static int Connect( access_t *p_access, access_sys_t *p_sys )
     if( fd < 0 )
     {
         msg_Err( p_access, "failed to connect with server" );
+        intf_UserFatal( p_access, VLC_FALSE, _("Network interaction failed"), 
+                        _("VLC could not connect with the given server.") );
         return -1;
     }
 
@@ -118,6 +121,8 @@ static int Connect( access_t *p_access, access_sys_t *p_sys )
     if( i_answer / 100 != 2 )
     {
         msg_Err( p_access, "connection rejected" );
+        intf_UserFatal( p_access, VLC_FALSE, _("Network interaction failed"), 
+                        _("VLC's connection to the given server was rejected.") );
         return -1;
     }
 
@@ -176,6 +181,9 @@ static int Connect( access_t *p_access, access_sys_t *p_sys )
                     if( i_answer / 100 != 2 )
                     {
                         msg_Err( p_access, "account rejected" );
+                        intf_UserFatal( p_access, VLC_FALSE, 
+                                        _("Network interaction failed"), 
+                                        _("Your account was rejected.") );
                         return -1;
                     }
                     msg_Dbg( p_access, "account accepted" );
@@ -183,11 +191,17 @@ static int Connect( access_t *p_access, access_sys_t *p_sys )
 
                 default:
                     msg_Err( p_access, "password rejected" );
+                    intf_UserFatal( p_access, VLC_FALSE, 
+                                    _("Network interaction failed"), 
+                                    _("Your password was rejected.") );
                     return -1;
             }
             break;
         default:
             msg_Err( p_access, "user rejected" );
+            intf_UserFatal( p_access, VLC_FALSE, 
+                        _("Network interaction failed"), 
+                        _("Your connection attemp to the server was rejected.") );
             return -1;
     }
 
index 1d4d0ccd422da053e25c244953bb88a7fafe46eb..e917f1e9c90503a4cbae816259581b6ae253d7ea 100644 (file)
@@ -26,6 +26,7 @@
  *****************************************************************************/
 #include <vlc/vlc.h>
 #include <vlc/input.h>
+#include <vlc_interaction.h>
 
 #include "network.h"
 #include "rtsp.h"
@@ -89,6 +90,8 @@ static int RtspConnect( void *p_userdata, char *psz_server, int i_port )
     if( p_sys->fd < 0 )
     {
         msg_Err( p_access, "cannot connect to %s:%d", psz_server, i_port );
+        intf_UserFatal( p_access, VLC_FALSE, _("Connection failed"), 
+                        _("VLC could not connect to \"%s:%d\"."), psz_server, i_port );
         return VLC_EGENERIC;
     }
 
@@ -215,6 +218,8 @@ static int Open( vlc_object_t *p_this )
 
 
             msg_Err( p_access, "rtsp session can not be established" );
+            intf_UserFatal( p_access, VLC_FALSE, _("Session failed"), 
+                    _("The requested RTSP session could not be established.") );
             goto error;
         }
 
index b5120ccb4072bd428bbde4d2c08178da9575a2f5..7b45b4a2b077446956a0f3dc5c2cee2ffdf3691c 100644 (file)
@@ -34,6 +34,7 @@
 #include <vlc/vlc.h>
 
 #include <vlc/aout.h>
+#include <vlc_interaction.h>
 
 #include "aout_internal.h"
 
@@ -322,6 +323,9 @@ static int Open( vlc_object_t *p_this )
     if( (psz_device = config_GetPsz( p_aout, "alsadev" )) == NULL )
     {
         msg_Err( p_aout, "no audio device given (maybe \"default\" ?)" );
+        intf_UserFatal( p_aout, VLC_FALSE, _("No Audio Device"), 
+                        _("No audio device name was given. You might want to " \
+                          "enter \"default\".") );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -427,6 +431,9 @@ static int Open( vlc_object_t *p_this )
         {
             msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
                              psz_iec_device, snd_strerror( i_snd_rc ) );
+            intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"), 
+                            _("VLC could not open the ALSA device \"%s\" (%s)."),
+                            psz_iec_device, snd_strerror( i_snd_rc ) );
             free( p_sys );
             free( psz_device );
             return VLC_EGENERIC;
@@ -459,8 +466,14 @@ static int Open( vlc_object_t *p_this )
                    SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK ) ) == -EBUSY )
             {
                 if( i ) msleep( 100000 /* 100ms */ );
-                else msg_Err( p_aout, "audio device: %s is already in use",
+                else
+                {
+                    msg_Err( p_aout, "audio device: %s is already in use",
                               psz_device );
+                    intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"), 
+                                    _("The audio device \"%s\" is already in use."),
+                                    psz_device );
+                }
                 continue;
             }
             break;
@@ -469,6 +482,9 @@ static int Open( vlc_object_t *p_this )
         {
             msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
                              psz_device, snd_strerror( i_snd_rc ) );
+            intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"), 
+                            _("VLC could not open the ALSA device \"%s\" (%s)."),
+                            psz_device, snd_strerror( i_snd_rc ) );
             free( p_sys );
             free( psz_device );
             return VLC_EGENERIC;
index 1e272f0f3db11eb2d09054ac1f1ac9978a39c7dd..80cd622fb4abefae42c5fdb9633098b1b0f097a6 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <vlc/vlc.h>
 #include <vlc/aout.h>
+#include <vlc_interaction.h>
 
 #include "aout_internal.h"
 
@@ -240,6 +241,9 @@ static int Open( vlc_object_t * p_this )
     if( p_sys->i_hog_pid != -1 && p_sys->i_hog_pid != getpid() )
     {
         msg_Err( p_aout, "Selected audio device is exclusively in use by another program." );
+        intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"), 
+                        _("The selected audio output device is exclusively in "
+                          "use by another program.") );
         goto error;
     }
 
@@ -422,6 +426,10 @@ static int OpenAnalog( aout_instance_t *p_aout )
             {
                 p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
                 msg_Err( p_aout, "You should configure your speaker layout with Audio Midi Setup Utility in /Applications/Utilities. Now using Stereo mode." );
+                intf_UserFatal( p_aout, VLC_FALSE, _("Audio device is not configured"), 
+                                _("You should configure your speaker layout with "
+                                  "the \"Audio Midi Setup Utility\" in /Applications/"
+                                  "Utilities. Stereo mode is being used now.") );
             }
         }
         if( layout ) free( layout );
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;
         }
index e6ad882a184ccd35007a3b752110110f4ff51e2d..afe8dc5f4b9f3da8ccbe1dc11ee0c1c4ade0f4be 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <vlc/vlc.h>
 #include <vlc/input.h>
+#include <vlc_interaction.h>
 
 #include "vlc_meta.h"
 
@@ -164,6 +165,8 @@ static int Demux( demux_t *p_demux )
                 if( DemuxInit( p_demux ) )
                 {
                     msg_Err( p_demux, "failed to load the new header" );
+                    intf_UserFatal( p_demux, VLC_FALSE, _("Could not demux ASF stream"), 
+                                    _("VLC failed to load the ASF header.") );
                     return 0;
                 }
                 continue;
index b385d4962e666d92b01e57dea9d84497013be5b6..0536d5dda58859056f88f9307b7bfc4edbfc5272 100644 (file)
@@ -30,6 +30,7 @@
 #include <vlc/vlc.h>
 #include <vlc/input.h>
 #include <vlc/sout.h>
+#include <vlc_interaction.h>
 
 /*****************************************************************************
  * Module descriptor
@@ -360,6 +361,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     {
         msg_Err( p_stream, "no suitable sout access module for `%s/%s://%s'",
                  psz_access, psz_mux, psz_dst );
+        intf_UserFatal( p_stream, VLC_FALSE, 
+                    _("Streaming / Transcoding failed"), 
+                    _("There is no suitable stream-output access module for \"%s/%s://%s\"."), 
+                          psz_access, 
+                          psz_mux, psz_dst );
         return( NULL );
     }
 
@@ -369,6 +375,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     {
         msg_Err( p_stream, "no suitable sout mux module for `%s/%s://%s'",
                  psz_access, psz_mux, psz_dst );
+        intf_UserFatal( p_stream, VLC_FALSE, 
+                        _("Streaming / Transcoding failed"), 
+                        _("There is no suitable stream-output access module "\
+                          "for \"%s/%s://%s\"."), 
+                          psz_access, psz_mux, psz_dst );
         sout_AccessOutDelete( p_access );
         return( NULL );
     }
index 4b196efd54d2e76a01810ac497bfa4a319d6d7dc..516c40c3cff420ff905190b3e9b37f1eb3ab2901 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <vlc/vlc.h>
 #include <vlc/vout.h>
+#include <vlc_interaction.h>
 
 #include "filter_common.h"
 
@@ -263,6 +264,8 @@ static int Init( vout_thread_t *p_vout )
     if( p_vout->p_sys->p_vout == NULL )
     {
         msg_Err( p_vout, "failed to create vout" );
+        intf_UserFatal( p_vout, VLC_FALSE, _("Cropping failed"), 
+                        _("VLC could not open the video output module.") );
         return VLC_EGENERIC;
     }
 
@@ -340,6 +343,8 @@ static int Manage( vout_thread_t *p_vout )
     if( p_vout->p_sys->p_vout == NULL )
     {
         msg_Err( p_vout, "failed to create vout" );
+        intf_UserFatal( p_vout, VLC_FALSE, _("Cropping failed"), 
+                        _("VLC could not open the video output module.") );
         return VLC_EGENERIC;
     }
 
index 197dcd296989c7d8b220d466a24b3d6fd2f8fdc3..62a5800277bc7a2a93bbe8d062a65a4b168577e6 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * filters.c : audio output filters management
  *****************************************************************************
- * Copyright (C) 2002-2004 the VideoLAN team
+ * Copyright (C) 2002-2006 the VideoLAN team
  * $Id$
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
@@ -28,6 +28,7 @@
 #include <string.h>
 
 #include <vlc/vlc.h>
+#include <vlc_interaction.h>
 
 #ifdef HAVE_ALLOCA_H
 #   include <alloca.h>
@@ -150,6 +151,9 @@ int aout_FiltersCreatePipeline( aout_instance_t * p_aout,
     if( *pi_nb_filters + 1 > AOUT_MAX_FILTERS )
     {
         msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS );
+        intf_UserFatal( p_aout, VLC_FALSE, _("Audio filtering failed"), 
+                        _("The maximum number of filters (%d) was reached."),
+                        AOUT_MAX_FILTERS );
         return -1;
     }
 
@@ -194,6 +198,9 @@ int aout_FiltersCreatePipeline( aout_instance_t * p_aout,
     {
         ReleaseFilter( pp_filters[0] );
         msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS );
+        intf_UserFatal( p_aout, VLC_FALSE, _("Audio filtering failed"), 
+                        _("The maximum number of filters (%d) was reached."),
+                        AOUT_MAX_FILTERS );
         return -1;
     }
     pp_filters[1] = FindFilter( p_aout, &pp_filters[0]->output,
@@ -214,6 +221,9 @@ int aout_FiltersCreatePipeline( aout_instance_t * p_aout,
         {
             ReleaseFilter( pp_filters[0] );
             msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS );
+            intf_UserFatal( p_aout, VLC_FALSE, _("Audio filtering failed"), 
+                            _("The maximum number of filters (%d) was reached."),
+                            AOUT_MAX_FILTERS );
             return -1;
         }
         pp_filters[1] = FindFilter( p_aout, &pp_filters[0]->output,
index df510c276c25f46acc2d7e4990ee7fc638c1e2ea..1fe7b04316164b423bc87ef3d49444a04315fc93 100644 (file)
@@ -32,6 +32,7 @@
 #include <vlc/decoder.h>
 #include <vlc/vout.h>
 #include <vlc/input.h>
+#include <vlc_interaction.h>
 
 #include "stream_output.h"
 #include "input_internal.h"
@@ -109,6 +110,8 @@ decoder_t *input_DecoderNew( input_thread_t *p_input,
         if( p_dec == NULL )
         {
             msg_Err( p_input, "could not create packetizer" );
+            intf_UserFatal( p_input, VLC_FALSE, _("Streaming / Transcoding failed"), 
+                            _("VLC could not open the packetizer module.") );
             return NULL;
         }
     }
@@ -119,6 +122,8 @@ decoder_t *input_DecoderNew( input_thread_t *p_input,
         if( p_dec == NULL )
         {
             msg_Err( p_input, "could not create decoder" );
+            intf_UserFatal( p_input, VLC_FALSE, _("Streaming / Transcoding failed"), 
+                            _("VLC could not open the decoder module.") );
             return NULL;
         }
     }
@@ -128,6 +133,10 @@ decoder_t *input_DecoderNew( input_thread_t *p_input,
         msg_Err( p_dec, "no suitable decoder module for fourcc `%4.4s'.\n"
                  "VLC probably does not support this sound or video format.",
                  (char*)&p_dec->fmt_in.i_codec );
+        intf_UserFatal( p_dec, VLC_FALSE, _("No suitable decoder module "
+            "for FOURCC \"4.4s\" found"), _("VLC probably does not support this "
+            "audio or video format. Regrettably, there is no way for you to "
+            "fix this.") );
 
         DeleteDecoder( p_dec );
         vlc_object_destroy( p_dec );