Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
ea1648d1
Commit
ea1648d1
authored
Dec 28, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DTV: use vlc_strerror_c()
parent
9ce4212b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
26 deletions
+46
-26
modules/access/dtv/en50221.c
modules/access/dtv/en50221.c
+11
-7
modules/access/dtv/linux.c
modules/access/dtv/linux.c
+35
-19
No files found.
modules/access/dtv/en50221.c
View file @
ea1648d1
...
...
@@ -296,7 +296,8 @@ static int TPDUSend( cam_t * p_cam, uint8_t i_slot, uint8_t i_tag,
if
(
write
(
p_cam
->
fd
,
p_data
,
i_size
)
!=
i_size
)
{
msg_Err
(
p_cam
->
obj
,
"cannot write to CAM device (%m)"
);
msg_Err
(
p_cam
->
obj
,
"cannot write to CAM device: %s"
,
vlc_strerror_c
(
errno
)
);
return
VLC_EGENERIC
;
}
...
...
@@ -322,7 +323,7 @@ static int TPDURecv( cam_t *p_cam, uint8_t i_slot, uint8_t *pi_tag,
while
(
poll
(
pfd
,
1
,
CAM_READ_TIMEOUT
)
==
-
1
)
if
(
errno
!=
EINTR
)
{
msg_Err
(
p_cam
->
obj
,
"poll error: %
m"
);
msg_Err
(
p_cam
->
obj
,
"poll error: %
s"
,
vlc_strerror_c
(
errno
)
);
return
VLC_EGENERIC
;
}
...
...
@@ -347,7 +348,8 @@ static int TPDURecv( cam_t *p_cam, uint8_t i_slot, uint8_t *pi_tag,
if
(
i_size
<
5
)
{
msg_Err
(
p_cam
->
obj
,
"cannot read from CAM device (%d:%m)"
,
i_size
);
msg_Err
(
p_cam
->
obj
,
"cannot read from CAM device (%d): %s"
,
i_size
,
vlc_strerror_c
(
errno
)
);
if
(
pi_size
==
NULL
)
free
(
p_data
);
return
VLC_EGENERIC
;
...
...
@@ -881,7 +883,8 @@ static int APDUSend( cam_t * p_cam, int i_session_id, int i_tag,
i_ret
=
ioctl
(
p_cam
->
fd
,
CA_SEND_MSG
,
&
ca_msg
);
if
(
i_ret
<
0
)
{
msg_Err
(
p_cam
->
obj
,
"Error sending to CAM: %m"
);
msg_Err
(
p_cam
->
obj
,
"Error sending to CAM: %s"
,
vlc_strerror_c
(
errno
)
);
i_ret
=
VLC_EGENERIC
;
}
}
...
...
@@ -1998,7 +2001,7 @@ cam_t *en50221_Init( vlc_object_t *obj, int fd )
* ASIC. */
if
(
ioctl
(
fd
,
CA_GET_SLOT_INFO
,
&
info
)
<
0
)
{
msg_Err
(
obj
,
"cannot get slot info: %
m"
);
msg_Err
(
obj
,
"cannot get slot info: %
s"
,
vlc_strerror_c
(
errno
)
);
goto
error
;
}
if
(
info
.
flags
==
0
)
...
...
@@ -2516,7 +2519,7 @@ char *en50221_Status( cam_t *p_cam, char *psz_request )
if
(
ioctl
(
p_cam
->
fd
,
CA_GET_CAP
,
&
caps
)
<
0
)
{
fprintf
(
p
,
"ioctl
CA_GET_CAP failed (%m)
\n
"
);
fprintf
(
p
,
"ioctl
(CA_GET_CAP) failed: %s
\n
"
,
vlc_strerror_c
(
errno
)
);
goto
out
;
}
...
...
@@ -2557,7 +2560,8 @@ char *en50221_Status( cam_t *p_cam, char *psz_request )
sinfo
.
num
=
i_slot
;
if
(
ioctl
(
p_cam
->
fd
,
CA_GET_SLOT_INFO
,
&
sinfo
)
<
0
)
{
fprintf
(
p
,
"ioctl CA_GET_SLOT_INFO failed (%m)<br>
\n
"
);
fprintf
(
p
,
"ioctl(CA_GET_SLOT_INFO) failed: %s<br>
\n
"
,
vlc_strerror_c
(
errno
)
);
continue
;
}
...
...
modules/access/dtv/linux.c
View file @
ea1648d1
...
...
@@ -204,7 +204,8 @@ dvb_device_t *dvb_open (vlc_object_t *obj)
d
->
dir
=
dvb_open_adapter
(
adapter
);
if
(
d
->
dir
==
-
1
)
{
msg_Err
(
obj
,
"cannot access adapter %"
PRIu8
": %m"
,
adapter
);
msg_Err
(
obj
,
"cannot access adapter %"
PRIu8
": %s"
,
adapter
,
vlc_strerror_c
(
errno
));
free
(
d
);
return
NULL
;
}
...
...
@@ -221,14 +222,16 @@ dvb_device_t *dvb_open (vlc_object_t *obj)
d
->
demux
=
dvb_open_node
(
d
,
"demux"
,
O_RDONLY
);
if
(
d
->
demux
==
-
1
)
{
msg_Err
(
obj
,
"cannot access demultiplexer: %m"
);
msg_Err
(
obj
,
"cannot access demultiplexer: %s"
,
vlc_strerror_c
(
errno
));
close
(
d
->
dir
);
free
(
d
);
return
NULL
;
}
if
(
ioctl
(
d
->
demux
,
DMX_SET_BUFFER_SIZE
,
1
<<
20
)
<
0
)
msg_Warn
(
obj
,
"cannot expand demultiplexing buffer: %m"
);
msg_Warn
(
obj
,
"cannot expand demultiplexing buffer: %s"
,
vlc_strerror_c
(
errno
));
/* We need to filter at least one PID. The tap for TS demultiplexing
* cannot be configured otherwise. So add the PAT. */
...
...
@@ -241,7 +244,8 @@ dvb_device_t *dvb_open (vlc_object_t *obj)
param
.
flags
=
DMX_IMMEDIATE_START
;
if
(
ioctl
(
d
->
demux
,
DMX_SET_PES_FILTER
,
&
param
)
<
0
)
{
msg_Err
(
obj
,
"cannot setup TS demultiplexer: %m"
);
msg_Err
(
obj
,
"cannot setup TS demultiplexer: %s"
,
vlc_strerror_c
(
errno
));
goto
error
;
}
#ifndef USE_DMX
...
...
@@ -253,7 +257,7 @@ dvb_device_t *dvb_open (vlc_object_t *obj)
d
->
demux
=
dvb_open_node
(
d
,
"dvr"
,
O_RDONLY
);
if
(
d
->
demux
==
-
1
)
{
msg_Err
(
obj
,
"cannot access DVR: %
m"
);
msg_Err
(
obj
,
"cannot access DVR: %
s"
,
vlc_strerror_c
(
errno
)
);
close
(
d
->
dir
);
free
(
d
);
return
NULL
;
...
...
@@ -270,7 +274,8 @@ dvb_device_t *dvb_open (vlc_object_t *obj)
close
(
ca
);
}
else
msg_Dbg
(
obj
,
"conditional access module not available (%m)"
);
msg_Dbg
(
obj
,
"conditional access module not available: %s"
,
vlc_strerror_c
(
errno
));
#endif
return
d
;
...
...
@@ -339,7 +344,8 @@ ssize_t dvb_read (dvb_device_t *d, void *buf, size_t len)
msg_Err
(
d
->
obj
,
"cannot dequeue events fast enough!"
);
return
-
1
;
}
msg_Err
(
d
->
obj
,
"cannot dequeue frontend event: %m"
);
msg_Err
(
d
->
obj
,
"cannot dequeue frontend event: %s"
,
vlc_strerror_c
(
errno
));
return
0
;
}
...
...
@@ -356,7 +362,7 @@ ssize_t dvb_read (dvb_device_t *d, void *buf, size_t len)
msg_Err
(
d
->
obj
,
"cannot demux data fast enough!"
);
return
-
1
;
}
msg_Err
(
d
->
obj
,
"cannot demux: %
m"
);
msg_Err
(
d
->
obj
,
"cannot demux: %
s"
,
vlc_strerror_c
(
errno
)
);
return
0
;
}
return
val
;
...
...
@@ -405,7 +411,8 @@ int dvb_add_pid (dvb_device_t *d, uint16_t pid)
errno
=
EMFILE
;
error:
#endif
msg_Err
(
d
->
obj
,
"cannot add PID 0x%04"
PRIu16
": %m"
,
pid
);
msg_Err
(
d
->
obj
,
"cannot add PID 0x%04"
PRIu16
": %s"
,
pid
,
vlc_strerror_c
(
errno
));
return
-
1
;
}
...
...
@@ -437,7 +444,7 @@ static int dvb_open_frontend (dvb_device_t *d)
int
fd
=
dvb_open_node
(
d
,
"frontend"
,
O_RDWR
);
if
(
fd
==
-
1
)
{
msg_Err
(
d
->
obj
,
"cannot access frontend: %
m"
);
msg_Err
(
d
->
obj
,
"cannot access frontend: %
s"
,
vlc_strerror_c
(
errno
)
);
return
-
1
;
}
...
...
@@ -466,7 +473,8 @@ unsigned dvb_enum_systems (dvb_device_t *d)
if
(
ioctl
(
d
->
frontend
,
FE_GET_PROPERTY
,
&
props
)
<
0
)
{
msg_Err
(
d
->
obj
,
"cannot enumerate frontend systems: %m"
);
msg_Err
(
d
->
obj
,
"cannot enumerate frontend systems: %s"
,
vlc_strerror_c
(
errno
));
goto
legacy
;
}
...
...
@@ -525,7 +533,8 @@ legacy:
#endif
if
(
ioctl
(
d
->
frontend
,
FE_GET_PROPERTY
,
&
props
)
<
0
)
{
msg_Err
(
d
->
obj
,
"unsupported kernel DVB version 3 or older (%m)"
);
msg_Err
(
d
->
obj
,
"unsupported kernel DVB version 3 or older (%s)"
,
vlc_strerror_c
(
errno
));
return
0
;
}
...
...
@@ -544,7 +553,8 @@ legacy:
struct
dvb_frontend_info
info
;
if
(
ioctl
(
d
->
frontend
,
FE_GET_INFO
,
&
info
)
<
0
)
{
msg_Err
(
d
->
obj
,
"cannot get frontend info: %m"
);
msg_Err
(
d
->
obj
,
"cannot get frontend info: %s"
,
vlc_strerror_c
(
errno
));
return
0
;
}
msg_Dbg
(
d
->
obj
,
" name %s"
,
info
.
name
);
...
...
@@ -635,7 +645,8 @@ static int dvb_vset_props (dvb_device_t *d, size_t n, va_list ap)
if
(
ioctl
(
d
->
frontend
,
FE_SET_PROPERTY
,
&
props
)
<
0
)
{
msg_Err
(
d
->
obj
,
"cannot set frontend tuning parameters: %m"
);
msg_Err
(
d
->
obj
,
"cannot set frontend tuning parameters: %s"
,
vlc_strerror_c
(
errno
));
return
-
1
;
}
return
0
;
...
...
@@ -715,7 +726,8 @@ int dvb_set_sec (dvb_device_t *d, uint64_t freq_Hz, char pol,
/* Always try to configure high voltage, but only warn on enable failure */
int
val
=
var_InheritBool
(
d
->
obj
,
"dvb-high-voltage"
);
if
(
ioctl
(
d
->
frontend
,
FE_ENABLE_HIGH_LNB_VOLTAGE
,
&
val
)
<
0
&&
val
)
msg_Err
(
d
->
obj
,
"cannot enable high LNB voltage: %m"
);
msg_Err
(
d
->
obj
,
"cannot enable high LNB voltage: %s"
,
vlc_strerror_c
(
errno
));
/* Windows BDA exposes a higher-level API covering LNB oscillators.
* So lets pretend this is platform-specific stuff and do it here. */
...
...
@@ -810,7 +822,8 @@ known:
uncmd
.
msg_len
=
4
;
/* length */
if
(
ioctl
(
d
->
frontend
,
FE_DISEQC_SEND_MASTER_CMD
,
&
uncmd
)
<
0
)
{
msg_Err
(
d
->
obj
,
"cannot send uncommitted DiSEqC command: %m"
);
msg_Err
(
d
->
obj
,
"cannot send uncommitted DiSEqC command: %s"
,
vlc_strerror_c
(
errno
));
return
-
1
;
}
/* Repeat uncommitted command */
...
...
@@ -818,14 +831,16 @@ known:
if
(
ioctl
(
d
->
frontend
,
FE_DISEQC_SEND_MASTER_CMD
,
&
uncmd
)
<
0
)
{
msg_Err
(
d
->
obj
,
"cannot send repeated uncommitted DiSEqC command: %m"
);
"cannot send repeated uncommitted DiSEqC command: %s"
,
vlc_strerror_c
(
errno
));
return
-
1
;
}
msleep
(
125000
);
/* wait 125 ms before committed DiSEqC command */
}
if
(
ioctl
(
d
->
frontend
,
FE_DISEQC_SEND_MASTER_CMD
,
&
cmd
)
<
0
)
{
msg_Err
(
d
->
obj
,
"cannot send committed DiSEqC command: %m"
);
msg_Err
(
d
->
obj
,
"cannot send committed DiSEqC command: %s"
,
vlc_strerror_c
(
errno
));
return
-
1
;
}
msleep
(
54000
+
15000
);
...
...
@@ -835,7 +850,8 @@ known:
if
(
ioctl
(
d
->
frontend
,
FE_DISEQC_SEND_BURST
,
satno
?
SEC_MINI_B
:
SEC_MINI_A
)
<
0
)
{
msg_Err
(
d
->
obj
,
"cannot send Mini-DiSEqC tone burst: %m"
);
msg_Err
(
d
->
obj
,
"cannot send Mini-DiSEqC tone burst: %s"
,
vlc_strerror_c
(
errno
));
return
-
1
;
}
msleep
(
15000
);
...
...
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