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
dacadc6e
Commit
dacadc6e
authored
Mar 21, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DVB: merge all CAM stuff in a single file (untested)
parent
d9720721
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
500 additions
and
536 deletions
+500
-536
modules/access/dvb/dvb.h
modules/access/dvb/dvb.h
+2
-9
modules/access/dvb/en50221.c
modules/access/dvb/en50221.c
+464
-60
modules/access/dvb/en50221.h
modules/access/dvb/en50221.h
+6
-112
modules/access/dvb/http.c
modules/access/dvb/http.c
+1
-1
modules/access/dvb/linux_dvb.c
modules/access/dvb/linux_dvb.c
+27
-354
No files found.
modules/access/dvb/dvb.h
View file @
dacadc6e
...
...
@@ -50,7 +50,6 @@ typedef struct
#define MAX_DEMUX 256
#include "en50221.h"
struct
scan_t
;
struct
scan_parameter_t
;
...
...
@@ -62,7 +61,7 @@ struct access_sys_t
mtime_t
i_frontend_timeout
;
bool
b_budget_mode
;
cam_t
cam
;
struct
cam
*
p_
cam
;
/* */
int
i_read_once
;
...
...
@@ -118,7 +117,7 @@ int DVROpen( access_t * );
void
DVRClose
(
access_t
*
);
int
CAMOpen
(
access_t
*
);
int
CAMPoll
(
access_t
*
);
void
CAMPoll
(
access_t
*
);
int
CAMSet
(
access_t
*
,
dvbpsi_pmt_t
*
);
void
CAMClose
(
access_t
*
);
#ifdef ENABLE_HTTPD
...
...
@@ -131,9 +130,3 @@ void HTTPClose( access_t *p_access );
const
char
*
HTTPExtractValue
(
const
char
*
psz_uri
,
const
char
*
psz_name
,
char
*
psz_value
,
int
i_value_max
);
#endif
/*****************************************************************************
* Hacks
*****************************************************************************/
#define STRINGIFY( z ) UGLY_KLUDGE( z )
#define UGLY_KLUDGE( z ) #z
modules/access/dvb/en50221.c
View file @
dacadc6e
This diff is collapsed.
Click to expand it.
modules/access/dvb/en50221.h
View file @
dacadc6e
...
...
@@ -25,117 +25,11 @@
typedef
struct
cam
cam_t
;
typedef
struct
en50221_session_t
{
unsigned
i_slot
;
int
i_resource_id
;
void
(
*
pf_handle
)(
cam_t
*
,
int
,
uint8_t
*
,
int
);
void
(
*
pf_close
)(
cam_t
*
,
int
);
void
(
*
pf_manage
)(
cam_t
*
,
int
);
void
*
p_sys
;
}
en50221_session_t
;
#define EN50221_MMI_NONE 0
#define EN50221_MMI_ENQ 1
#define EN50221_MMI_ANSW 2
#define EN50221_MMI_MENU 3
#define EN50221_MMI_MENU_ANSW 4
#define EN50221_MMI_LIST 5
typedef
struct
en50221_mmi_object_t
{
int
i_object_type
;
union
{
struct
{
bool
b_blind
;
char
*
psz_text
;
}
enq
;
struct
{
bool
b_ok
;
char
*
psz_answ
;
}
answ
;
struct
{
char
*
psz_title
,
*
psz_subtitle
,
*
psz_bottom
;
char
**
ppsz_choices
;
int
i_choices
;
}
menu
;
/* menu and list are the same */
struct
{
int
i_choice
;
}
menu_answ
;
}
u
;
}
en50221_mmi_object_t
;
static
inline
void
en50221_MMIFree
(
en50221_mmi_object_t
*
p_object
)
{
int
i
;
switch
(
p_object
->
i_object_type
)
{
case
EN50221_MMI_ENQ
:
FREENULL
(
p_object
->
u
.
enq
.
psz_text
);
break
;
case
EN50221_MMI_ANSW
:
if
(
p_object
->
u
.
answ
.
b_ok
)
{
FREENULL
(
p_object
->
u
.
answ
.
psz_answ
);
}
break
;
case
EN50221_MMI_MENU
:
case
EN50221_MMI_LIST
:
FREENULL
(
p_object
->
u
.
menu
.
psz_title
);
FREENULL
(
p_object
->
u
.
menu
.
psz_subtitle
);
FREENULL
(
p_object
->
u
.
menu
.
psz_bottom
);
for
(
i
=
0
;
i
<
p_object
->
u
.
menu
.
i_choices
;
i
++
)
{
free
(
p_object
->
u
.
menu
.
ppsz_choices
[
i
]
);
}
FREENULL
(
p_object
->
u
.
menu
.
ppsz_choices
);
break
;
default:
break
;
}
}
/* CA management */
#define MAX_CI_SLOTS 16
#define MAX_SESSIONS 32
#define MAX_PROGRAMS 24
struct
cam
{
vlc_object_t
*
obj
;
int
i_ca_type
;
int
fd
;
mtime_t
i_timeout
,
i_next_event
;
unsigned
i_nb_slots
;
bool
pb_active_slot
[
MAX_CI_SLOTS
];
bool
pb_tc_has_data
[
MAX_CI_SLOTS
];
bool
pb_slot_mmi_expected
[
MAX_CI_SLOTS
];
bool
pb_slot_mmi_undisplayed
[
MAX_CI_SLOTS
];
en50221_session_t
p_sessions
[
MAX_SESSIONS
];
dvbpsi_pmt_t
*
pp_selected_programs
[
MAX_PROGRAMS
];
int
i_selected_programs
;
};
int
en50221_Init
(
cam_t
*
);
int
en50221_Poll
(
cam_t
*
);
cam_t
*
en50221_Init
(
vlc_object_t
*
,
int
fd
);
void
en50221_Poll
(
cam_t
*
);
int
en50221_SetCAPMT
(
cam_t
*
,
dvbpsi_pmt_t
*
);
int
en50221_OpenMMI
(
cam_t
*
,
unsigned
i_slot
);
int
en50221_CloseMMI
(
cam_t
*
,
unsigned
i_slot
);
en50221_mmi_object_t
*
en50221_GetMMIObject
(
cam_t
*
,
unsigned
i_slot
);
void
en50221_SendMMIObject
(
cam_t
*
,
unsigned
i_slot
,
en50221_mmi_object_t
*
);
char
*
en50221_Status
(
cam_t
*
,
char
*
req
);
void
en50221_End
(
cam_t
*
);
#define STRINGIFY( z ) UGLY_KLUDGE( z )
#define UGLY_KLUDGE( z ) #z
modules/access/dvb/http.c
View file @
dacadc6e
...
...
@@ -242,7 +242,7 @@ static int HttpCallback( httpd_file_sys_t *p_args,
p_sys
->
i_httpd_timeout
=
mdate
()
+
INT64_C
(
3000000
);
/* 3 s */
p_sys
->
psz_request
=
psz_request
;
p_sys
->
b_request_frontend_info
=
true
;
if
(
p_sys
->
cam
.
fd
!=
-
1
)
if
(
p_sys
->
p_cam
!=
NULL
)
{
p_sys
->
b_request_mmi_info
=
true
;
}
...
...
modules/access/dvb/linux_dvb.c
View file @
dacadc6e
This diff is collapsed.
Click to expand it.
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