Changeset 89298c16e4964b9033ab4cb6290a953775e92c76

Show
Ignore:
Timestamp:
08/23/06 01:22:14 (2 years ago)
Author:
Felix Paul Kühne <fkuehne@videolan.org>
git-committer:
Felix Paul Kühne <fkuehne@videolan.org> 1156288934 +0000
git-parent:

[dfc8392cd3b2de84dc55e0f4dabf9de63e4d2a42]

git-author:
Felix Paul Kühne <fkuehne@videolan.org> 1156288934 +0000
Message:

* browsed through all code files starting with A to F and added non-blocking intf_UserFatal calls next to msg_err where I think that it is necessary.
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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/cdda/access.c

    r25ee96d r89298c1  
    3232#include <vlc_playlist.h>  /* Has to come *after* cdda.h */ 
    3333#include "vlc_keys.h" 
     34#include <vlc_interaction.h> 
    3435 
    3536#include <cdio/cdio.h> 
     
    290291        msg_Err( p_access, "cannot get a new block of size: %i", 
    291292                i_blocks * CDIO_CD_FRAMESIZE_RAW ); 
     293        intf_UserFatal( p_access, VLC_FALSE, _("CD reading failed"),  
     294                        _("VLC could not get a new block of size: %i."),  
     295                        i_blocks * CDIO_CD_FRAMESIZE_RAW ); 
    292296        return NULL; 
    293297    } 
  • modules/access/dshow/dshow.cpp

    rfb220e5 r89298c1  
    3333#include <vlc/input.h> 
    3434#include <vlc/vout.h> 
     35#include <vlc_interaction.h> 
    3536 
    3637#include "common.h" 
     
    891892        msg_Err( p_this, "can't use device: %s, unsupported device type", 
    892893                 devicename.c_str() ); 
     894        intf_UserFatal( p_vout, VLC_FALSE, _("Capturing failed"),  
     895                        _("VLC cannot use the device \"%s\", because its device " 
     896                          "type is not supported.") ); 
    893897        return VLC_EGENERIC; 
    894898    } 
     
    938942        /* capture device */ 
    939943        msg_Err( p_this, "capture device '%s' does not support required parameters !", devicename.c_str() ); 
     944        intf_UserFatal( p_this, VLC_FALSE, _("Capturing failed"),  
     945                        _("The capture device \"%s\" does not support the " 
     946                          "required parameters."), devicename.c_str() ); 
    940947        p_device_filter->Release(); 
    941948        return VLC_EGENERIC; 
  • modules/access/dvb/access.c

    r2a06d83 r89298c1  
    3030#include <vlc/vlc.h> 
    3131#include <vlc/input.h> 
     32#include <vlc_interaction.h> 
    3233 
    3334#ifdef HAVE_UNISTD_H 
     
    713714        msg_Err( p_access, "the DVB input old syntax is deprecated, use vlc " 
    714715                          "-p dvb to see an explanation of the new syntax" ); 
     716        intf_UserFatal( p_access, VLC_TRUE, _("Input syntax is deprecated"),  
     717            _("The given syntax is deprecated. Run \"vlc -p dvb\" to see an " \ 
     718                "explanation of the new syntax.") ); 
    715719        free( psz_dup ); 
    716720        return VLC_EGENERIC; 
     
    757761            { 
    758762                msg_Err( p_access, "illegal polarization %c", *psz_parser ); 
     763                intf_UserFatal( p_access, VLC_FALSE, _("Illegal Polarization"),  
     764                                _("The provided polarization \"%c\" is not valid."), 
     765                                *psz_parser ); 
    759766                free( psz_dup ); 
    760767                return VLC_EGENERIC; 
  • modules/access/dvdnav.c

    r90a4cae r89298c1  
    2929#include <vlc/vlc.h> 
    3030#include <vlc/input.h> 
     31#include <vlc_interaction.h> 
    3132 
    3233#ifdef HAVE_UNISTD_H 
     
    293294        { 
    294295            msg_Err( p_demux, "cannot set title (can't decrypt DVD?)" ); 
     296            intf_UserFatal( p_demux, VLC_FALSE, _("Playback failure"),  
     297                            _("VLC cannot set the DVD's title. It possibly " 
     298                              "cannot decrypt the entire disk.") ); 
    295299            dvdnav_close( p_sys->dvdnav ); 
    296300            free( p_sys ); 
  • modules/access/dvdread.c

    r90a4cae r89298c1  
    22 * dvdread.c : DvdRead input module for vlc 
    33 ***************************************************************************** 
    4  * Copyright (C) 2001-2004 the VideoLAN team 
     4 * Copyright (C) 2001-2006 the VideoLAN team 
    55 * $Id$ 
    66 * 
    7  * Authors: Sthane Borel <stef@via.ecp.fr> 
     7 * Authors: Stéphane Borel <stef@via.ecp.fr> 
    88 *          Gildas Bazin <gbazin@videolan.org> 
    99 * 
     
    3232#include <vlc/vlc.h> 
    3333#include <vlc/input.h> 
     34#include <vlc_interaction.h> 
    3435 
    3536#include "iso_lang.h" 
     
    233234    { 
    234235        msg_Err( p_demux, "DVDRead cannot open source: %s", psz_name ); 
     236        intf_UserFatal( p_demux, VLC_FALSE, _("Playback failure"),  
     237                        _("DVDRead could not open disk \"%s\"."), psz_name ); 
    235238        free( psz_name ); 
    236239        return VLC_EGENERIC; 
     
    490493        { 
    491494            msg_Err( p_demux, "read failed for block %d", p_sys->i_next_vobu ); 
     495            intf_UserWarn( p_demux, _("Playback failure"),  
     496                            _("DVDRead could not read block %d."), 
     497                           p_sys->i_next_vobu ); 
    492498            return -1; 
    493499        } 
     
    549555        msg_Err( p_demux, "read failed for %d/%d blocks at 0x%02x", 
    550556                 i_read, i_blocks_once, p_sys->i_cur_block ); 
     557        intf_UserFatal( p_demux, VLC_FALSE, _("Playback failure"),  
     558                        _("DVDRead could not read %d/%d blocks at 0x%02x."), 
     559                        i_read, i_blocks_once, p_sys->i_cur_block ); 
    551560        return -1; 
    552561    } 
  • modules/access/file.c

    r4ecc5ff r89298c1  
    2828#include <vlc/vlc.h> 
    2929#include <vlc/input.h> 
     30#include <vlc_interaction.h> 
    3031 
    3132#include <stdlib.h> 
     
    245246        { 
    246247            msg_Err( p_access, "unknown file type for `%s'", psz_name ); 
     248            intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"),  
     249                            _("\"%s\"'s file type is unknown."), 
     250                            psz_name ); 
    247251            free( psz_name ); 
    248252            return VLC_EGENERIC; 
     
    409413    { 
    410414        if( errno != EINTR && errno != EAGAIN ) 
     415        { 
    411416            msg_Err( p_access, "read failed (%s)", strerror(errno) ); 
     417            intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"),  
     418                            _("VLC could not read file \"%s\"."), 
     419                            strerror(errno) ); 
     420        } 
    412421 
    413422        /* Delay a bit to avoid consuming all the CPU. This is particularly 
     
    508517    { 
    509518        msg_Err( p_access, "seeking too far" ); 
     519        intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"),  
     520                        _("VLC seeked in the file too far. This usually means " 
     521                          "that your file is broken and therefore cannot be " 
     522                          "played." ) ); 
    510523        p_access->info.i_pos = p_access->info.i_size; 
    511524    } 
     
    591604    { 
    592605        msg_Err( p_access, "cannot open file %s", psz_name ); 
     606        intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"),  
     607                        _("VLC could not open file \"%s\"."), psz_name ); 
    593608        return VLC_EGENERIC; 
    594609    } 
     
    614629        msg_Err( p_access, "cannot open file %s (%s)", psz_name, 
    615630                 strerror(errno) ); 
     631        intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"),  
     632                        _("VLC could not open file \"%s\" (%s)."), 
     633                        psz_name, strerror(errno) ); 
    616634        return VLC_EGENERIC; 
    617635    } 
  • modules/access/ftp.c

    r90a4cae r89298c1  
    3030#include <vlc/vlc.h> 
    3131#include <vlc/input.h> 
     32#include <vlc_interaction.h> 
    3233 
    3334#include "network.h" 
     
    106107    { 
    107108        msg_Err( p_access, "failed to connect with server" ); 
     109        intf_UserFatal( p_access, VLC_FALSE, _("Network interaction failed"),  
     110                        _("VLC could not connect with the given server.") ); 
    108111        return -1; 
    109112    } 
     
    119122    { 
    120123        msg_Err( p_access, "connection rejected" ); 
     124        intf_UserFatal( p_access, VLC_FALSE, _("Network interaction failed"),  
     125                        _("VLC's connection to the given server was rejected.") ); 
    121126        return -1; 
    122127    } 
     
    177182                    { 
    178183                        msg_Err( p_access, "account rejected" ); 
     184                        intf_UserFatal( p_access, VLC_FALSE,  
     185                                        _("Network interaction failed"),  
     186                                        _("Your account was rejected.") ); 
    179187                        return -1; 
    180188                    } 
     
    184192                default: 
    185193                    msg_Err( p_access, "password rejected" ); 
     194                    intf_UserFatal( p_access, VLC_FALSE,  
     195                                    _("Network interaction failed"),  
     196                                    _("Your password was rejected.") ); 
    186197                    return -1; 
    187198            } 
     
    189200        default: 
    190201            msg_Err( p_access, "user rejected" ); 
     202            intf_UserFatal( p_access, VLC_FALSE,  
     203                        _("Network interaction failed"),  
     204                        _("Your connection attemp to the server was rejected.") ); 
    191205            return -1; 
    192206    } 
  • modules/access/rtsp/access.c

    r4f15591 r89298c1  
    2727#include <vlc/vlc.h> 
    2828#include <vlc/input.h> 
     29#include <vlc_interaction.h> 
    2930 
    3031#include "network.h" 
     
    9091    { 
    9192        msg_Err( p_access, "cannot connect to %s:%d", psz_server, i_port ); 
     93        intf_UserFatal( p_access, VLC_FALSE, _("Connection failed"),  
     94                        _("VLC could not connect to \"%s:%d\"."), psz_server, i_port ); 
    9295        return VLC_EGENERIC; 
    9396    } 
     
    216219 
    217220            msg_Err( p_access, "rtsp session can not be established" ); 
     221            intf_UserFatal( p_access, VLC_FALSE, _("Session failed"),  
     222                    _("The requested RTSP session could not be established.") ); 
    218223            goto error; 
    219224        } 
  • modules/audio_output/alsa.c

    r33b6e2a r89298c1  
    3535 
    3636#include <vlc/aout.h> 
     37#include <vlc_interaction.h> 
    3738 
    3839#include "aout_internal.h" 
     
    323324    { 
    324325        msg_Err( p_aout, "no audio device given (maybe \"default\" ?)" ); 
     326        intf_UserFatal( p_aout, VLC_FALSE, _("No Audio Device"),  
     327                        _("No audio device name was given. You might want to " \ 
     328                          "enter \"default\".") ); 
    325329        free( p_sys ); 
    326330        return VLC_EGENERIC; 
     
    428432            msg_Err( p_aout, "cannot open ALSA device `%s' (%s)", 
    429433                             psz_iec_device, snd_strerror( i_snd_rc ) ); 
     434            intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),  
     435                            _("VLC could not open the ALSA device \"%s\" (%s)."), 
     436                            psz_iec_device, snd_strerror( i_snd_rc ) ); 
    430437            free( p_sys ); 
    431438            free( psz_device ); 
     
    460467            { 
    461468                if( i ) msleep( 100000 /* 100ms */ ); 
    462                 else msg_Err( p_aout, "audio device: %s is already in use", 
     469                else 
     470                { 
     471                    msg_Err( p_aout, "audio device: %s is already in use", 
    463472                              psz_device ); 
     473                    intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),  
     474                                    _("The audio device \"%s\" is already in use."), 
     475                                    psz_device ); 
     476                } 
    464477                continue; 
    465478            } 
     
    470483            msg_Err( p_aout, "cannot open ALSA device `%s' (%s)", 
    471484                             psz_device, snd_strerror( i_snd_rc ) ); 
     485            intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),  
     486                            _("VLC could not open the ALSA device \"%s\" (%s)."), 
     487                            psz_device, snd_strerror( i_snd_rc ) ); 
    472488            free( p_sys ); 
    473489            free( psz_device ); 
  • modules/audio_output/auhal.c

    r8e394d7 r89298c1  
    3131#include <vlc/vlc.h> 
    3232#include <vlc/aout.h> 
     33#include <vlc_interaction.h> 
    3334 
    3435#include "aout_internal.h" 
     
    241242    { 
    242243        msg_Err( p_aout, "Selected audio device is exclusively in use by another program." ); 
     244        intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),  
     245                        _("The selected audio output device is exclusively in " 
     246                          "use by another program.") ); 
    243247        goto error; 
    244248    } 
     
    423427                p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT; 
    424428                msg_Err( p_aout, "You should configure your speaker layout with Audio Midi Setup Utility in /Applications/Utilities. Now using Stereo mode." ); 
     429                intf_UserFatal( p_aout, VLC_FALSE, _("Audio device is not configured"),  
     430                                _("You should configure your speaker layout with " 
     431                                  "the \"Audio Midi Setup Utility\" in /Applications/" 
     432                                  "Utilities. Stereo mode is being used now.") ); 
    425433            } 
    426434        } 
  • modules/codec/ffmpeg/encoder.c

    r04870f7 r89298c1  
    3434#include <vlc/sout.h> 
    3535#include <vlc/decoder.h> 
     36#include <vlc_interaction.h> 
    3637 
    3738/* ffmpeg header */ 
     
    225226    { 
    226227        msg_Err( p_enc, "\"%s\" is not a video encoder", psz_namecodec ); 
     228        intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),  
     229                        _("\"%s\" is no video encoder."), psz_namecodec ); 
    227230        return VLC_EGENERIC; 
    228231    } 
     
    231234    { 
    232235        msg_Err( p_enc, "\"%s\" is not an audio encoder", psz_namecodec ); 
     236        intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),  
     237                        _("\"%s\" is no audio encoder."), psz_namecodec ); 
    233238        return VLC_EGENERIC; 
    234239    } 
     
    241246    { 
    242247        msg_Err( p_enc, "cannot find encoder %s", psz_namecodec ); 
     248        intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),  
     249                        _("VLC could not find encoder \"%s\"."), psz_namecodec ); 
    243250        return VLC_EGENERIC; 
    244251    } 
     
    610617                vlc_mutex_unlock( lockval.p_address ); 
    611618                msg_Err( p_enc, "cannot open encoder" ); 
     619                intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),  
     620                                _("VLC could not open the encoder.") ); 
    612621                free( p_sys ); 
    613622                return VLC_EGENERIC; 
     
    617626        { 
    618627            msg_Err( p_enc, "cannot open encoder" ); 
     628            intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),  
     629                            _("VLC could not open the encoder.") ); 
    619630            free( p_sys ); 
    620631            return VLC_EGENERIC; 
  • modules/demux/asf/asf.c

    r37bd471 r89298c1  
    2929#include <vlc/vlc.h> 
    3030#include <vlc/input.h> 
     31#include <vlc_interaction.h> 
    3132 
    3233#include "vlc_meta.h" 
     
    165166                { 
    166167                    msg_Err( p_demux, "failed to load the new header" ); 
     168                    intf_UserFatal( p_demux, VLC_FALSE, _("Could not demux ASF stream"),  
     169                                    _("VLC failed to load the ASF header.") ); 
    167170                    return 0; 
    168171                } 
  • modules/stream_out/es.c

    r2d824ac r89298c1  
    3131#include <vlc/input.h> 
    3232#include <vlc/sout.h> 
     33#include <vlc_interaction.h> 
    3334 
    3435/***************************************************************************** 
     
    361362        msg_Err( p_stream, "no suitable sout access module for `%s/%s://%s'", 
    362363                 psz_access, psz_mux, psz_dst ); 
     364        intf_UserFatal( p_stream, VLC_FALSE,  
     365                    _("Streaming / Transcoding failed"),  
     366                    _("There is no suitable stream-output access module for \"%s/%s://%s\"."),  
     367                          psz_access,  
     368                          psz_mux, psz_dst ); 
    363369        return( NULL ); 
    364370    } 
     
    370376        msg_Err( p_stream, "no suitable sout mux module for `%s/%s://%s'", 
    371377                 psz_access, psz_mux, psz_dst ); 
     378        intf_UserFatal( p_stream, VLC_FALSE,  
     379                        _("Streaming / Transcoding failed"),  
     380                        _("There is no suitable stream-output access module "\ 
     381                          "for \"%s/%s://%s\"."),  
     382                          psz_access, psz_mux, psz_dst ); 
    372383        sout_AccessOutDelete( p_access ); 
    373384        return( NULL ); 
  • modules/video_filter/crop.c

    r5f18b9d r89298c1  
    3030#include <vlc/vlc.h> 
    3131#include <vlc/vout.h> 
     32#include <vlc_interaction.h> 
    3233 
    3334#include "filter_common.h" 
     
    264265    { 
    265266        msg_Err( p_vout, "failed to create vout" ); 
     267        intf_UserFatal( p_vout, VLC_FALSE, _("Cropping failed"),  
     268                        _("VLC could not open the video output module.") ); 
    266269        return VLC_EGENERIC; 
    267270    } 
     
    341344    { 
    342345        msg_Err( p_vout, "failed to create vout" ); 
     346        intf_UserFatal( p_vout, VLC_FALSE, _("Cropping failed"),  
     347                        _("VLC could not open the video output module.") ); 
    343348        return VLC_EGENERIC; 
    344349    } 
  • src/audio_output/filters.c

    r2cb472d r89298c1  
    22 * filters.c : audio output filters management 
    33 ***************************************************************************** 
    4  * Copyright (C) 2002-2004 the VideoLAN team 
     4 * Copyright (C) 2002-2006 the VideoLAN team 
    55 * $Id$ 
    66 * 
     
    2929 
    3030#include <vlc/vlc.h> 
     31#include <vlc_interaction.h> 
    3132 
    3233#ifdef HAVE_ALLOCA_H 
     
    151152    { 
    152153        msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS ); 
     154        intf_UserFatal( p_aout, VLC_FALSE, _("Audio filtering failed"),  
     155                        _("The maximum number of filters (%d) was reached."), 
     156                        AOUT_MAX_FILTERS ); 
    153157        return -1; 
    154158    } 
     
    195199        ReleaseFilter( pp_filters[0] ); 
    196200        msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS ); 
     201        intf_UserFatal( p_aout, VLC_FALSE, _("Audio filtering failed"),  
     202                        _("The maximum number of filters (%d) was reached."), 
     203                        AOUT_MAX_FILTERS ); 
    197204        return -1; 
    198205    } 
     
    215222            ReleaseFilter( pp_filters[0] ); 
    216223            msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS ); 
     224            intf_UserFatal( p_aout, VLC_FALSE, _("Audio filtering failed"),  
     225                            _("The maximum number of filters (%d) was reached."), 
     226                            AOUT_MAX_FILTERS ); 
    217227            return -1; 
    218228        } 
  • src/input/decoder.c

    ra757f6a r89298c1  
    3333#include <vlc/vout.h> 
    3434#include <vlc/input.h> 
     35#include <vlc_interaction.h> 
    3536 
    3637#include "stream_output.h" 
     
    110111        { 
    111112            msg_Err( p_input, "could not create packetizer" ); 
     113            intf_UserFatal( p_input, VLC_FALSE, _("Streaming / Transcoding failed"),  
     114                            _("VLC could not open the packetizer module.") ); 
    112115            return NULL; 
    113116        } 
     
    120123        { 
    121124            msg_Err( p_input, "could not create decoder" ); 
     125            intf_UserFatal( p_input, VLC_FALSE, _("Streaming / Transcoding failed"),  
     126                            _("VLC could not open the decoder module.") ); 
    122127            return NULL; 
    123128        } 
     
    129134                 "VLC probably does not support this sound or video format.", 
    130135                 (char*)&p_dec->fmt_in.i_codec ); 
     136        intf_UserFatal( p_dec, VLC_FALSE, _("No suitable decoder module " 
     137            "for FOURCC \"4.4s\" found"), _("VLC probably does not support this " 
     138            "audio or video format. Regrettably, there is no way for you to " 
     139            "fix this.") ); 
    131140 
    132141        DeleteDecoder( p_dec );