Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
183d5cda
Commit
183d5cda
authored
Feb 04, 2016
by
Thomas Guillem
Browse files
dialog: use new API
parent
9d230b93
Changes
39
Hide whitespace changes
Inline
Side-by-side
modules/access/avcapture.m
View file @
183d5cda
...
...
@@ -282,9 +282,9 @@ static int Open(vlc_object_t *p_this)
arrayByAddingObjectsFromArray:
[
AVCaptureDevice
devicesWithMediaType
:
AVMediaTypeMuxed
]]
retain
];
if
(
[
myVideoDevices
count
]
==
0
)
{
dialog_
Fatal
(
p_demux
,
_
(
"No video devices found"
),
_
(
"Your Mac does not seem to be equipped with a suitable video input device. "
"Please check your connectors and drivers."
));
vlc_
dialog_
display_error
(
p_demux
,
_
(
"No video devices found"
),
_
(
"Your Mac does not seem to be equipped with a suitable video input device. "
"Please check your connectors and drivers."
));
msg_Err
(
p_demux
,
"Can't find any suitable video device"
);
goto
error
;
}
...
...
@@ -311,9 +311,9 @@ static int Open(vlc_object_t *p_this)
}
if
(
!
p_sys
->
device
)
{
dialog_
Fatal
(
p_demux
,
_
(
"No video devices found"
),
_
(
"Your Mac does not seem to be equipped with a suitable input device. "
"Please check your connectors and drivers."
));
vlc_
dialog_
display_error
(
p_demux
,
_
(
"No video devices found"
),
_
(
"Your Mac does not seem to be equipped with a suitable input device. "
"Please check your connectors and drivers."
));
msg_Err
(
p_demux
,
"Can't find any suitable video device"
);
goto
error
;
}
...
...
modules/access/bluray.c
View file @
183d5cda
...
...
@@ -784,9 +784,9 @@ static int blurayOpen(vlc_object_t *object)
msg_Err
(
p_demux
,
"BD-J menus not supported. Playing without menus. "
"BD-J support: %d, JVM found: %d, JVM usable: %d"
,
disc_info
->
bdj_supported
,
disc_info
->
libjvm_detected
,
disc_info
->
bdj_handled
);
dialog_
Fatal
(
p_demux
,
_
(
"Java required"
),
_
(
"This Blu-ray disc needs Java for menus.%s
\n
Disc is played without menus."
),
!
disc_info
->
libjvm_detected
?
_
(
" Java was not found from your system."
)
:
""
);
vlc_
dialog_
display_error
(
p_demux
,
_
(
"Java required"
),
_
(
"This Blu-ray disc needs Java for menus.%s
\n
Disc is played without menus."
),
!
disc_info
->
libjvm_detected
?
_
(
" Java was not found from your system."
)
:
""
);
p_sys
->
b_menu
=
false
;
}
...
...
@@ -841,7 +841,7 @@ static int blurayOpen(vlc_object_t *object)
error:
if
(
error_msg
)
dialog_
Fatal
(
p_demux
,
_
(
"Blu-ray error"
),
"%s"
,
error_msg
);
vlc_
dialog_
display_error
(
p_demux
,
_
(
"Blu-ray error"
),
"%s"
,
error_msg
);
blurayClose
(
object
);
if
(
p_demux
->
s
!=
NULL
)
{
...
...
@@ -2204,11 +2204,13 @@ static void blurayHandleEvent(demux_t *p_demux, const BD_EVENT *e)
*/
case
BD_EVENT_ERROR
:
/* fatal error (with menus) */
dialog_Fatal
(
p_demux
,
_
(
"Blu-ray error"
),
"Playback with BluRay menus failed"
);
vlc_dialog_display_error
(
p_demux
,
_
(
"Blu-ray error"
),
"Playback with BluRay menus failed"
);
p_sys
->
b_fatal_error
=
true
;
break
;
case
BD_EVENT_ENCRYPTED
:
dialog_Fatal
(
p_demux
,
_
(
"Blu-ray error"
),
"This disc seems to be encrypted"
);
vlc_dialog_display_error
(
p_demux
,
_
(
"Blu-ray error"
),
"This disc seems to be encrypted"
);
p_sys
->
b_fatal_error
=
true
;
break
;
case
BD_EVENT_READ_ERROR
:
...
...
modules/access/dshow/dshow.cpp
View file @
183d5cda
...
...
@@ -42,7 +42,7 @@
#include <vlc_access.h>
#include <vlc_demux.h>
#include <vlc_dialog.h>
/* dialog_
Fatal
*/
#include <vlc_dialog.h>
/*
vlc_
dialog_
display_error
*/
#include <vlc_charset.h>
/* FromWide */
#include <initguid.h>
...
...
@@ -520,7 +520,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
if
(
!
b_use_video
&&
!
b_use_audio
)
{
dialog_
Fatal
(
p_this
,
_
(
"Capture failed"
),
vlc_
dialog_
display_error
(
p_this
,
_
(
"Capture failed"
),
_
(
"No video or audio device selected."
)
);
return
VLC_EGENERIC
;
}
...
...
@@ -594,7 +594,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
(
b_use_video
&&
!
b_use_audio
&&
b_err_video
)
)
{
msg_Err
(
p_this
,
"FATAL: could not open ANY device"
)
;
dialog_
Fatal
(
p_this
,
_
(
"Capture failed"
),
vlc_
dialog_
display_error
(
p_this
,
_
(
"Capture failed"
),
_
(
"VLC cannot open ANY capture device. "
"Check the error log for details."
)
);
return
VLC_EGENERIC
;
...
...
@@ -1018,7 +1018,7 @@ 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
()
);
dialog_
Fatal
(
p_this
,
_
(
"Capture failed"
),
vlc_
dialog_
display_error
(
p_this
,
_
(
"Capture failed"
),
_
(
"The device you selected cannot be used, because its "
"type is not supported."
)
);
return
VLC_EGENERIC
;
...
...
@@ -1071,7 +1071,7 @@ 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
()
);
dialog_
Fatal
(
p_this
,
_
(
"Capture failed"
),
vlc_
dialog_
display_error
(
p_this
,
_
(
"Capture failed"
),
_
(
"The capture device
\"
%s
\"
does not support the "
"required parameters."
),
devicename
.
c_str
()
);
p_device_filter
->
Release
();
...
...
modules/access/dtv/access.c
View file @
183d5cda
...
...
@@ -473,10 +473,10 @@ static int Open (vlc_object_t *obj)
if
(
delsys
==
NULL
||
Tune
(
obj
,
dev
,
delsys
,
freq
))
{
msg_Err
(
obj
,
"tuning to %"
PRIu64
" Hz failed"
,
freq
);
dialog_
Fatal
(
obj
,
N_
(
"Digital broadcasting"
),
N_
(
"The selected digital tuner does not support "
"the specified parameters.
\n
"
"Please check the preferences."
));
vlc_
dialog_
display_error
(
obj
,
N_
(
"Digital broadcasting"
),
N_
(
"The selected digital tuner does not support "
"the specified parameters.
\n
"
"Please check the preferences."
));
goto
error
;
}
}
...
...
modules/access/dvb/scan.c
View file @
183d5cda
...
...
@@ -87,7 +87,7 @@ typedef struct
struct
scan_t
{
vlc_object_t
*
p_obj
;
struct
dialog_progress_bar_t
*
p_dialog
;
vlc_dialog_id
*
p_dialog
_id
;
uint64_t
i_index
;
scan_parameter_t
parameter
;
int64_t
i_time_start
;
...
...
@@ -212,7 +212,7 @@ scan_t *scan_New( vlc_object_t *p_obj, const scan_parameter_t *p_parameter )
p_scan
->
p_obj
=
VLC_OBJECT
(
p_obj
);
p_scan
->
i_index
=
0
;
p_scan
->
p_dialog
=
NULL
;
p_scan
->
p_dialog
_id
=
NULL
;
TAB_INIT
(
p_scan
->
i_service
,
p_scan
->
pp_service
);
p_scan
->
parameter
=
*
p_parameter
;
p_scan
->
i_time_start
=
mdate
();
...
...
@@ -222,8 +222,8 @@ scan_t *scan_New( vlc_object_t *p_obj, const scan_parameter_t *p_parameter )
void
scan_Destroy
(
scan_t
*
p_scan
)
{
if
(
p_scan
->
p_dialog
!=
NULL
)
dialog_
ProgressDestroy
(
p_scan
->
p_dialog
);
if
(
p_scan
->
p_dialog
_id
!=
NULL
)
vlc_
dialog_
release
(
p_scan
->
p_obj
,
p_scan
->
p_dialog
_id
);
for
(
int
i
=
0
;
i
<
p_scan
->
i_service
;
i
++
)
scan_service_Delete
(
p_scan
->
pp_service
[
i
]
);
...
...
@@ -647,7 +647,6 @@ int scan_Next( scan_t *p_scan, scan_configuration_t *p_cfg )
if
(
i_ret
)
return
i_ret
;
char
*
psz_text
;
int
i_service
=
0
;
for
(
int
i
=
0
;
i
<
p_scan
->
i_service
;
i
++
)
...
...
@@ -658,18 +657,28 @@ int scan_Next( scan_t *p_scan, scan_configuration_t *p_cfg )
const
mtime_t
i_eta
=
f_position
>
0
.
005
?
(
mdate
()
-
p_scan
->
i_time_start
)
*
(
1
.
0
/
f_position
-
1
.
0
)
:
-
1
;
char
psz_eta
[
MSTRTIME_MAX_SIZE
];
const
char
*
psz_fmt
=
_
(
"%.1f MHz (%d services)
\n
~%s remaining"
);
if
(
asprintf
(
&
psz_text
,
_
(
"%.1f MHz (%d services)
\n
~%s remaining"
),
(
double
)
p_cfg
->
i_frequency
/
1000000
,
i_service
,
secstotimestr
(
psz_eta
,
i_eta
/
1000000
)
)
>=
0
)
if
(
i_eta
>=
0
)
msg_Info
(
p_scan
->
p_obj
,
"Scan ETA %s | %f"
,
secstotimestr
(
psz_eta
,
i_eta
/
1000000
),
f_position
*
100
);
if
(
p_scan
->
p_dialog_id
==
NULL
)
{
if
(
i_eta
>=
0
)
msg_Info
(
p_scan
->
p_obj
,
"Scan ETA %s | %f"
,
secstotimestr
(
psz_eta
,
i_eta
/
1000000
),
f_position
*
100
);
if
(
p_scan
->
p_dialog
==
NULL
)
p_scan
->
p_dialog
=
dialog_ProgressCreate
(
p_scan
->
p_obj
,
_
(
"Scanning DVB"
),
psz_text
,
_
(
"Cancel"
)
);
if
(
p_scan
->
p_dialog
!=
NULL
)
dialog_ProgressSet
(
p_scan
->
p_dialog
,
psz_text
,
f_position
);
free
(
psz_text
);
p_scan
->
p_dialog_id
=
vlc_dialog_display_progress
(
p_scan
->
p_obj
,
false
,
f_position
,
_
(
"Cancel"
),
_
(
"Scanning DVB"
),
psz_fmt
,
(
double
)
p_cfg
->
i_frequency
/
1000000
,
i_service
,
secstotimestr
(
psz_eta
,
i_eta
/
1000000
)
);
}
else
{
vlc_dialog_update_progress_text
(
p_scan
->
p_obj
,
p_scan
->
p_dialog_id
,
f_position
,
psz_fmt
,
(
double
)
p_cfg
->
i_frequency
/
1000000
,
i_service
,
secstotimestr
(
psz_eta
,
i_eta
/
1000000
)
);
}
p_scan
->
i_index
++
;
...
...
@@ -678,7 +687,9 @@ int scan_Next( scan_t *p_scan, scan_configuration_t *p_cfg )
bool
scan_IsCancelled
(
scan_t
*
p_scan
)
{
return
p_scan
->
p_dialog
&&
dialog_ProgressCancelled
(
p_scan
->
p_dialog
);
if
(
p_scan
->
p_dialog_id
==
NULL
)
return
false
;
return
vlc_dialog_is_cancelled
(
p_scan
->
p_obj
,
p_scan
->
p_dialog_id
);
}
static
scan_service_t
*
ScanFindService
(
scan_t
*
p_scan
,
int
i_service_start
,
int
i_program
)
...
...
modules/access/dvdnav.c
View file @
183d5cda
...
...
@@ -291,9 +291,9 @@ static int CommonOpen( 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?)"
);
dialog_
Fatal
(
p_demux
,
_
(
"Playback failure"
),
"%s"
,
_
(
"VLC cannot set the DVD's title. It possibly "
"cannot decrypt the entire disc."
)
);
vlc_
dialog_
display_error
(
p_demux
,
_
(
"Playback failure"
),
"%s"
,
_
(
"VLC cannot set the DVD's title. It possibly "
"cannot decrypt the entire disc."
)
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
modules/access/dvdread.c
View file @
183d5cda
...
...
@@ -198,7 +198,7 @@ static int Open( vlc_object_t *p_this )
if
(
p_dvdread
==
NULL
)
{
msg_Err
(
p_demux
,
"DVDRead cannot open source: %s"
,
psz_file
);
dialog_
Fatal
(
p_demux
,
_
(
"Playback failure"
),
vlc_
dialog_
display_error
(
p_demux
,
_
(
"Playback failure"
),
_
(
"DVDRead could not open the disc
\"
%s
\"
."
),
psz_file
);
free
(
psz_file
);
return
VLC_EGENERIC
;
...
...
@@ -460,7 +460,7 @@ 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
);
dialog_
Fatal
(
p_demux
,
_
(
"Playback failure"
),
vlc_
dialog_
display_error
(
p_demux
,
_
(
"Playback failure"
),
_
(
"DVDRead could not read block %d."
),
p_sys
->
i_next_vobu
);
return
-
1
;
...
...
@@ -528,7 +528,7 @@ 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
);
dialog_
Fatal
(
p_demux
,
_
(
"Playback failure"
),
vlc_
dialog_
display_error
(
p_demux
,
_
(
"Playback failure"
),
_
(
"DVDRead could not read %d/%d blocks at 0x%02x."
),
i_read
,
i_blocks_once
,
p_sys
->
i_cur_block
);
return
-
1
;
...
...
modules/access/file.c
View file @
183d5cda
...
...
@@ -174,11 +174,11 @@ int FileOpen( vlc_object_t *p_this )
p_access
->
psz_filepath
?
p_access
->
psz_filepath
:
p_access
->
psz_location
,
vlc_strerror_c
(
errno
));
dialog_
Fatal
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not open the file
\"
%s
\"
(%s)."
),
p_access
->
psz_filepath
?
p_access
->
psz_filepath
:
p_access
->
psz_location
,
vlc_strerror
(
errno
));
vlc_
dialog_
display_error
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not open the file
\"
%s
\"
(%s)."
),
p_access
->
psz_filepath
?
p_access
->
psz_filepath
:
p_access
->
psz_location
,
vlc_strerror
(
errno
));
return
VLC_EGENERIC
;
}
...
...
@@ -289,9 +289,9 @@ static ssize_t Read (access_t *p_access, uint8_t *p_buffer, size_t i_len)
}
msg_Err
(
p_access
,
"read error: %s"
,
vlc_strerror_c
(
errno
));
dialog_
Fatal
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not read the file (%s)."
),
vlc_strerror
(
errno
));
vlc_
dialog_
display_error
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not read the file (%s)."
),
vlc_strerror
(
errno
));
val
=
0
;
}
...
...
modules/access/ftp.c
View file @
183d5cda
...
...
@@ -338,8 +338,8 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
if
(
fd
==
-
1
)
{
msg_Err
(
p_access
,
"connection failed"
);
dialog_
Fatal
(
p_access
,
_
(
"Network interaction failed"
),
"%s"
,
_
(
"VLC could not connect with the given server."
)
);
vlc_
dialog_
display_error
(
p_access
,
_
(
"Network interaction failed"
),
"%s"
,
_
(
"VLC could not connect with the given server."
)
);
return
-
1
;
}
...
...
@@ -354,8 +354,8 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
if
(
i_answer
/
100
!=
2
)
{
msg_Err
(
p_access
,
"connection rejected"
);
dialog_
Fatal
(
p_access
,
_
(
"Network interaction failed"
),
"%s"
,
_
(
"VLC's connection to the given server was rejected."
)
);
vlc_
dialog_
display_error
(
p_access
,
_
(
"Network interaction failed"
),
"%s"
,
_
(
"VLC's connection to the given server was rejected."
)
);
return
-
1
;
}
...
...
@@ -488,9 +488,9 @@ static int LoginUserPwd( vlc_object_t *p_access, access_sys_t *p_sys,
if
(
i_answer
/
100
!=
2
)
{
msg_Err
(
p_access
,
"account rejected"
);
dialog_
Fatal
(
p_access
,
_
(
"Network interaction failed"
),
"%s"
,
_
(
"Your account was rejected."
)
);
vlc_
dialog_
display_error
(
p_access
,
_
(
"Network interaction failed"
),
"%s"
,
_
(
"Your account was rejected."
)
);
return
-
1
;
}
msg_Dbg
(
p_access
,
"account accepted"
);
...
...
modules/access/live555.cpp
View file @
183d5cda
...
...
@@ -670,8 +670,8 @@ describe:
{
msg_Dbg
(
p_demux
,
"connection error %d"
,
i_code
);
if
(
i_code
==
403
)
dialog_
Fatal
(
p_demux
,
_
(
"RTSP connection failed"
),
_
(
"Access to the stream is denied by the server configuration."
)
);
vlc_
dialog_
display_error
(
p_demux
,
_
(
"RTSP connection failed"
),
_
(
"Access to the stream is denied by the server configuration."
)
);
}
if
(
p_sys
->
rtsp
)
RTSPClient
::
close
(
p_sys
->
rtsp
);
p_sys
->
rtsp
=
NULL
;
...
...
modules/access/mtp.c
View file @
183d5cda
...
...
@@ -192,9 +192,9 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
default:
msg_Err
(
p_access
,
"read failed: %s"
,
vlc_strerror_c
(
errno
)
);
dialog_
Fatal
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not read the file: %s"
),
vlc_strerror
(
errno
)
);
vlc_
dialog_
display_error
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not read the file: %s"
),
vlc_strerror
(
errno
)
);
p_access
->
info
.
b_eof
=
true
;
return
0
;
}
...
...
@@ -281,9 +281,9 @@ static int open_file( access_t *p_access, const char *path )
{
msg_Err
(
p_access
,
"cannot open file %s: %s"
,
path
,
vlc_strerror_c
(
errno
)
);
dialog_
Fatal
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not open the file
\"
%s
\"
: %s"
),
path
,
vlc_strerror
(
errno
)
);
vlc_
dialog_
display_error
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not open the file
\"
%s
\"
: %s"
),
path
,
vlc_strerror
(
errno
)
);
return
-
1
;
}
#ifdef F_RDAHEAD
...
...
modules/access/nfs.c
View file @
183d5cda
...
...
@@ -108,8 +108,9 @@ nfs_check_status(access_t *p_access, int i_status, const char *psz_error,
msg_Err
(
p_access
,
"%s failed: %d, '%s'"
,
psz_func
,
i_status
,
psz_error
);
if
(
!
p_access
->
p_sys
->
b_error
)
dialog_Fatal
(
p_access
,
_
(
"NFS operation failed"
),
"%s"
,
psz_error
);
vlc_dialog_display_error
(
p_access
,
_
(
"NFS operation failed"
),
"%s"
,
psz_error
);
}
else
msg_Warn
(
p_access
,
"%s interrupted"
,
psz_func
);
...
...
modules/access/qtsound.m
View file @
183d5cda
...
...
@@ -259,9 +259,9 @@ static int Open(vlc_object_t *p_this)
myAudioDevices
=
[[[
QTCaptureDevice
inputDevicesWithMediaType
:
QTMediaTypeSound
]
arrayByAddingObjectsFromArray:
[
QTCaptureDevice
inputDevicesWithMediaType
:
QTMediaTypeMuxed
]]
retain
];
if
([
myAudioDevices
count
]
==
0
)
{
dialog_
Fatal
(
p_demux
,
_
(
"No Audio Input device found"
),
_
(
"Your Mac does not seem to be equipped with a suitable audio input device."
"Please check your connectors and drivers."
));
vlc_
dialog_
display_error
(
p_demux
,
_
(
"No Audio Input device found"
),
_
(
"Your Mac does not seem to be equipped with a suitable audio input device."
"Please check your connectors and drivers."
));
msg_Err
(
p_demux
,
"Can't find any Audio device"
);
goto
error
;
...
...
@@ -290,9 +290,9 @@ static int Open(vlc_object_t *p_this)
p_sys
->
audiodevice
=
[
QTCaptureDevice
defaultInputDeviceWithMediaType
:
QTMediaTypeSound
];
}
if
(
!
p_sys
->
audiodevice
)
{
dialog_
Fatal
(
p_demux
,
_
(
"No audio input device found"
),
_
(
"Your Mac does not seem to be equipped with a suitable audio input device."
"Please check your connectors and drivers."
));
vlc_
dialog_
display_error
(
p_demux
,
_
(
"No audio input device found"
),
_
(
"Your Mac does not seem to be equipped with a suitable audio input device."
"Please check your connectors and drivers."
));
msg_Err
(
p_demux
,
"Can't find any Audio device"
);
goto
error
;
...
...
modules/access/rtp/rtp.c
View file @
183d5cda
...
...
@@ -753,7 +753,7 @@ void rtp_autodetect (demux_t *demux, rtp_session_t *session,
msg_Err
(
demux
,
"unspecified payload format (type %"
PRIu8
")"
,
ptype
);
msg_Info
(
demux
,
"A valid SDP is needed to parse this RTP stream."
);
dialog_
Fatal
(
demux
,
N_
(
"SDP required"
),
vlc_
dialog_
display_error
(
demux
,
N_
(
"SDP required"
),
N_
(
"A description in SDP format is required to receive the RTP "
"stream. Note that rtp:// URIs cannot work with dynamic "
"RTP payload format (%"
PRIu8
")."
),
ptype
);
...
...
modules/access/rtsp/access.c
View file @
183d5cda
...
...
@@ -84,8 +84,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
);
dialog_
Fatal
(
p_access
,
_
(
"Connection failed"
),
_
(
"VLC could not connect to
\"
%s:%d
\"
."
),
psz_server
,
i_port
);
vlc_
dialog_
display_error
(
p_access
,
_
(
"Connection failed"
),
_
(
"VLC could not connect to
\"
%s:%d
\"
."
),
psz_server
,
i_port
);
return
VLC_EGENERIC
;
}
...
...
@@ -228,8 +228,8 @@ static int Open( vlc_object_t *p_this )
msg_Err
(
p_access
,
"rtsp session can not be established"
);
dialog_
Fatal
(
p_access
,
_
(
"Session failed"
),
"%s"
,
_
(
"The requested RTSP session could not be established."
)
);
vlc_
dialog_
display_error
(
p_access
,
_
(
"Session failed"
),
"%s"
,
_
(
"The requested RTSP session could not be established."
)
);
goto
error
;
}
...
...
modules/access/vdr.c
View file @
183d5cda
...
...
@@ -376,9 +376,9 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
{
/* abort on read error */
msg_Err
(
p_access
,
"failed to read (%s)"
,
vlc_strerror_c
(
errno
)
);
dialog_
Fatal
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not read the file (%s)."
),
vlc_strerror
(
errno
)
);
vlc_
dialog_
display_error
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not read the file (%s)."
),
vlc_strerror
(
errno
)
);
SwitchFile
(
p_access
,
-
1
);
return
0
;
}
...
...
@@ -541,7 +541,7 @@ static bool SwitchFile( access_t *p_access, unsigned i_file )
return
true
;
error:
dialog_
Fatal
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not"
vlc_
dialog_
display_error
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not"
" open the file
\"
%s
\"
(%s)."
),
psz_path
,
vlc_strerror
(
errno
)
);
if
(
p_sys
->
fd
!=
-
1
)
{
...
...
modules/access_output/file.c
View file @
183d5cda
...
...
@@ -318,12 +318,12 @@ static int Open( vlc_object_t *p_this )
break
;
flags
&=
~
O_EXCL
;
}
while
(
dialog_
Q
uestion
(
p_access
,
path
,
_
(
"The output file already exists. "
"If recording continues, the file will be "
"overridden and its conten
t
w
il
l be lost."
),
_
(
"Keep existing file"
),
_
(
"O
ver
w
ri
te"
),
NULL
)
==
2
);
while
(
vlc_
dialog_
wait_q
uestion
(
p_access
,
VLC_DIALOG_QUESTION_NORMAL
,
_
(
"Keep existing file"
),
_
(
"Overwrite"
),
NULL
,
path
,
_
(
"The outpu
t
f
il
e already exists. "
"If recording continues, the file will be "
"o
verri
dden and its content will be lost."
)
)
==
1
);
free
(
buf
);
if
(
fd
==
-
1
)
return
VLC_EGENERIC
;
...
...
modules/audio_output/alsa.c
View file @
183d5cda
...
...
@@ -387,9 +387,9 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
{
msg_Err
(
aout
,
"cannot open ALSA device
\"
%s
\"
: %s"
,
device
,
snd_strerror
(
val
));
dialog_
Fatal
(
aout
,
_
(
"Audio output failed"
),
_
(
"The audio device
\"
%s
\"
could not be used:
\n
%s."
),
sys
->
device
,
snd_strerror
(
val
));
vlc_
dialog_
display_error
(
aout
,
_
(
"Audio output failed"
),
_
(
"The audio device
\"
%s
\"
could not be used:
\n
%s."
),
sys
->
device
,
snd_strerror
(
val
));
free
(
devbuf
);
return
VLC_EGENERIC
;
}
...
...
modules/audio_output/auhal.c
View file @
183d5cda
...
...
@@ -31,7 +31,7 @@
#import <vlc_common.h>
#import <vlc_plugin.h>
#import <vlc_dialog.h> // dialog_
Fatal
#import <vlc_dialog.h> //
vlc_
dialog_
display_error
#import <vlc_aout.h> // aout_*
#import <AudioUnit/AudioUnit.h> // AudioUnit
...
...
@@ -422,9 +422,9 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
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."
);
dialog_
Fatal
(
p_aout
,
_
(
"Audio output failed"
),
"%s"
,
_
(
"The selected audio output device is exclusively in "
"use by another program."
));
vlc_
dialog_
display_error
(
p_aout
,
_
(
"Audio output failed"
),
"%s"
,
_
(
"The selected audio output device is exclusively in "
"use by another program."
));
goto
error
;
}
...
...
@@ -630,10 +630,11 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
if
(
fmt
->
i_physical_channels
==
0
)
{
fmt
->
i_physical_channels
=
AOUT_CHANS_STEREO
;
msg_Err
(
p_aout
,
"You should configure your speaker layout with Audio Midi Setup in /Applications/Utilities. VLC will output Stereo only."
);
dialog_Fatal
(
p_aout
,
_
(
"Audio device is not configured"
),
"%s"
,
_
(
"You should configure your speaker layout with "
"
\"
Audio Midi Setup
\"
in /Applications/"
"Utilities. VLC will output Stereo only."
));
vlc_dialog_display_error
(
p_aout
,
_
(
"Audio device is not configured"
),
"%s"
,
_
(
"You should configure your speaker layout with "
"
\"
Audio Midi Setup
\"
in /Applications/"
"Utilities. VLC will output Stereo only."
));
}
}
free
(
layout
);
...
...
modules/codec/avcodec/encoder.c
View file @
183d5cda
...
...
@@ -317,16 +317,16 @@ int 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
);
dialog_
Fatal
(
p_enc
,
_
(
"Streaming / Transcoding failed"
),
_
(
"
\"
%s
\"
is no video encoder."
),
psz_namecodec
);
vlc_
dialog_
display_error
(
p_enc
,
_
(
"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
);
dialog_
Fatal
(
p_enc
,
_
(
"Streaming / Transcoding failed"
),
_
(
"
\"
%s
\"
is no audio encoder."
),
psz_namecodec
);
vlc_
dialog_
display_error
(
p_enc
,
_
(
"Streaming / Transcoding failed"
),
_
(
"
\"
%s
\"
is no audio encoder."
),
psz_namecodec
);
return
VLC_EGENERIC
;
}
...
...
@@ -359,7 +359,7 @@ int OpenEncoder( vlc_object_t *p_this )
"*** Please check with your Libav/FFmpeg packager. ***
\n
"
"*** This is NOT a VLC media player issue. ***"
,
psz_namecodec
);
dialog_
Fatal
(
p_enc
,
_
(
"Streaming / Transcoding failed"
),
_
(
vlc_
dialog_
display_error
(
p_enc
,
_
(
"Streaming / Transcoding failed"
),
_
(
/* I have had enough of all these MPEG-3 transcoding bug reports.
* Downstream packager, you had better not patch this out, or I will be really
* annoyed. Think about it - you don't want to fork the VLC translation files,
...
...
@@ -876,9 +876,9 @@ errmsg:
if
(
likely
((
unsigned
)
p_enc
->
fmt_in
.
i_cat
<
sizeof
(
types
)
/
sizeof
(
types
[
0
])))
type
=
types
[
p_enc
->
fmt_in
.
i_cat
];
msg_Err
(
p_enc
,
"cannot open %4.4s %s encoder"
,
fcc
.
txt
,
type
);
dialog_
Fatal
(
p_enc
,
_
(
"Streaming / Transcoding failed"
),
_
(
"VLC could not open the %4.4s %s encoder."
),
fcc
.
txt
,
vlc_gettext
(
type
)
);
vlc_
dialog_
display_error
(
p_enc
,
_
(
"Streaming / Transcoding failed"
),
_
(
"VLC could not open the %4.4s %s encoder."
),
fcc
.
txt
,
vlc_gettext
(
type
)
);
av_dict_free
(
&
options
);
goto
error
;
}
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment