Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
aa87371f
Commit
aa87371f
authored
May 11, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Linux DVB: migrate EN 50221 code
This needs testing (my DVB driver is not CI-capable).
parent
2b4266d1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
11 deletions
+51
-11
modules/access/Modules.am
modules/access/Modules.am
+5
-0
modules/access/dtv/dtv.h
modules/access/dtv/dtv.h
+5
-0
modules/access/dtv/en50221.c
modules/access/dtv/en50221.c
+3
-3
modules/access/dtv/en50221.h
modules/access/dtv/en50221.h
+2
-1
modules/access/dtv/linux.c
modules/access/dtv/linux.c
+36
-7
No files found.
modules/access/Modules.am
View file @
aa87371f
...
...
@@ -135,6 +135,11 @@ libdtv_plugin_la_DEPENDENCIES =
if HAVE_LINUX
libdtv_plugin_la_SOURCES += dtv/linux.c
if HAVE_DVBPSI
libdtv_plugin_la_SOURCES += dtv/en50221.c dtv/en50221.h
libdtv_plugin_la_CFLAGS += -DHAVE_DVBPSI $(DVBPSI_CFLAGS)
libdtv_plugin_la_LIBADD += $(DVBPSI_LIBS)
endif
libvlc_LTLIBRARIES += libdtv_plugin.la
endif
...
...
modules/access/dtv/dtv.h
View file @
aa87371f
...
...
@@ -43,6 +43,11 @@ const delsys_t *dvb_guess_system (dvb_device_t *);
float
dvb_get_signal_strength
(
dvb_device_t
*
);
float
dvb_get_snr
(
dvb_device_t
*
);
#ifdef HAVE_DVBPSI
struct
dvbpsi_pmt_s
;
void
dvb_set_ca_pmt
(
dvb_device_t
*
,
struct
dvbpsi_pmt_s
*
);
#endif
int
dvb_set_inversion
(
dvb_device_t
*
,
int
);
int
dvb_tune
(
dvb_device_t
*
);
...
...
modules/access/d
vb
/en50221.c
→
modules/access/d
tv
/en50221.c
View file @
aa87371f
...
...
@@ -50,13 +50,13 @@
# include <dvbpsi/demux.h>
# include <dvbpsi/sdt.h>
#undef ENABLE_HTTPD
#ifdef ENABLE_HTTPD
# include <vlc_httpd.h>
#endif
#include "dvb.h"
#include "../../demux/dvb-text.h"
#include "en50221.h"
#include "../demux/dvb-text.h"
#include "dtv/en50221.h"
typedef
struct
en50221_session_t
{
...
...
modules/access/d
vb
/en50221.h
→
modules/access/d
tv
/en50221.h
View file @
aa87371f
...
...
@@ -24,10 +24,11 @@
*****************************************************************************/
typedef
struct
cam
cam_t
;
struct
dvbpsi_pmt_s
;
cam_t
*
en50221_Init
(
vlc_object_t
*
,
int
fd
);
void
en50221_Poll
(
cam_t
*
);
int
en50221_SetCAPMT
(
cam_t
*
,
dvbpsi_pmt_t
*
);
int
en50221_SetCAPMT
(
cam_t
*
,
struct
dvbpsi_pmt_s
*
);
char
*
en50221_Status
(
cam_t
*
,
char
*
req
);
void
en50221_End
(
cam_t
*
);
...
...
modules/access/dtv/linux.c
View file @
aa87371f
...
...
@@ -37,6 +37,9 @@
#include <linux/dvb/dmx.h>
#include "dtv/dtv.h"
#ifdef HAVE_DVBPSI
# include "dtv/en50221.h"
#endif
#ifndef O_SEARCH
# define O_SEARCH O_RDONLY
...
...
@@ -179,7 +182,9 @@ struct dvb_device
uint16_t
pid
;
}
pids
[
MAX_PIDS
];
#endif
int
ca
;
#ifdef HAVE_DVBPSI
cam_t
*
cam
;
#endif
struct
dvb_frontend_info
info
;
bool
budget
;
//size_t buffer_size;
...
...
@@ -209,7 +214,9 @@ dvb_device_t *dvb_open (vlc_object_t *obj, bool tune)
d
->
obj
=
obj
;
d
->
frontend
=
-
1
;
d
->
ca
=
-
1
;
#ifdef HAVE_DVBPSI
d
->
cam
=
NULL
;
#endif
d
->
budget
=
var_InheritBool
(
obj
,
"dvb-budget-mode"
);
#ifndef USE_DMX
...
...
@@ -290,10 +297,17 @@ dvb_device_t *dvb_open (vlc_object_t *obj, bool tune)
msg_Dbg
(
obj
,
" (%"
PRIu32
" tolerance)"
,
d
->
info
.
symbol_rate_tolerance
);
d
->
ca
=
dvb_open_node
(
dirfd
,
device
,
"ca"
,
O_RDWR
);
if
(
d
->
ca
==
-
1
)
#ifdef HAVE_DVBPSI
int
ca
=
dvb_open_node
(
dirfd
,
device
,
"ca"
,
O_RDWR
);
if
(
ca
!=
-
1
)
{
d
->
cam
=
en50221_Init
(
obj
,
ca
);
if
(
d
->
cam
==
NULL
)
close
(
ca
);
}
else
msg_Dbg
(
obj
,
"conditional access module not available (%m)"
);
#endif
}
close
(
dirfd
);
return
d
;
...
...
@@ -315,8 +329,10 @@ void dvb_close (dvb_device_t *d)
close
(
d
->
pids
[
i
].
fd
);
}
#endif
if
(
d
->
ca
!=
-
1
)
close
(
d
->
ca
);
#ifdef HAVE_DVBPSI
if
(
d
->
cam
!=
NULL
)
en50221_End
(
d
->
cam
);
#endif
if
(
d
->
frontend
!=
-
1
)
close
(
d
->
frontend
);
close
(
d
->
demux
);
...
...
@@ -332,6 +348,11 @@ ssize_t dvb_read (dvb_device_t *d, void *buf, size_t len)
struct
pollfd
ufd
[
2
];
int
n
;
#ifdef HAVE_DVBPSI
if
(
d
->
cam
!=
NULL
)
en50221_Poll
(
d
->
cam
);
#endif
ufd
[
0
].
fd
=
d
->
demux
;
ufd
[
0
].
events
=
POLLIN
;
if
(
d
->
frontend
!=
-
1
)
...
...
@@ -481,6 +502,14 @@ float dvb_get_snr (dvb_device_t *d)
return
snr
/
65535
.;
}
#ifdef HAVE_DVBPSI
void
dvb_set_ca_pmt
(
dvb_device_t
*
d
,
struct
dvbpsi_pmt_s
*
pmt
)
{
if
(
d
->
cam
!=
NULL
)
en50221_SetCAPMT
(
d
->
cam
,
pmt
);
}
#endif
static
int
dvb_vset_props
(
dvb_device_t
*
d
,
size_t
n
,
va_list
ap
)
{
struct
dtv_property
buf
[
n
],
*
prop
=
buf
;
...
...
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