Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bitstream
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
bitstream
Commits
f2a1a8b8
Commit
f2a1a8b8
authored
Oct 10, 2011
by
Georgi Chorbadzhiyski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvb/si: Complete support for descriptor 0x44 (Cable delivery).
Add missing init and set functions.
parent
5eb30016
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
dvb/si/desc_44.h
dvb/si/desc_44.h
+32
-2
No files found.
dvb/si/desc_44.h
View file @
f2a1a8b8
...
...
@@ -4,6 +4,7 @@
* Copyright (C) 2009-2010 VideoLAN
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Georgi Chorbadzhiyski <georgi@unixsol.org>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
...
...
@@ -49,23 +50,52 @@ extern "C"
*****************************************************************************/
#define DESC44_HEADER_SIZE (DESC_HEADER_SIZE + 11)
static
inline
void
desc44_init
(
uint8_t
*
p_desc
)
{
desc_set_tag
(
p_desc
,
0x44
);
desc_set_length
(
p_desc
,
DESC44_HEADER_SIZE
-
DESC_HEADER_SIZE
);
p_desc
[
6
]
=
0xff
;
p_desc
[
7
]
|=
0xf0
;
}
static
inline
uint64_t
desc44_get_frequency
(
const
uint8_t
*
p_desc
)
{
return
(
uint64_t
)
dvb_bcd_get
(
p_desc
+
2
,
32
)
*
100
;
/* Hz */
}
static
inline
void
desc44_set_frequency_bcd
(
uint8_t
*
p_desc
,
uint32_t
i_freq_bcd
)
{
p_desc
[
2
]
=
(
i_freq_bcd
>>
24
)
&
0xff
;
p_desc
[
3
]
=
(
i_freq_bcd
>>
16
)
&
0xff
;
p_desc
[
4
]
=
(
i_freq_bcd
>>
8
)
&
0xff
;
p_desc
[
5
]
=
i_freq_bcd
&
0xff
;
}
static
inline
uint8_t
desc44_get_fecouter
(
const
uint8_t
*
p_desc
)
{
return
p_desc
[
7
]
&
0xf
;
}
static
inline
void
desc44_set_fecouter
(
uint8_t
*
p_desc
,
uint8_t
i_fecouter
)
{
p_desc
[
7
]
=
0xf0
|
(
i_fecouter
&
0x0f
);
}
static
inline
uint8_t
desc44_get_modulation
(
const
uint8_t
*
p_desc
)
{
return
p_desc
[
8
];
}
static
inline
void
desc44_set_modulation
(
uint8_t
*
p_desc
,
uint8_t
i_modulation
)
{
p_desc
[
8
]
=
i_modulation
;
}
#define desc44_get_symbolrate desc43_get_symbolrate
#define desc44_set_symbolrate_bcd desc43_set_symbolrate_bcd
#define desc44_get_fecinner desc43_get_fecinner
#define desc44_set_fecinner desc43_set_fecinner
static
inline
bool
desc44_validate
(
const
uint8_t
*
p_desc
)
{
...
...
@@ -98,14 +128,14 @@ static inline void desc44_print(const uint8_t *p_desc, f_print pf_print,
switch
(
i_print_type
)
{
case
PRINT_XML
:
pf_print
(
opaque
,
"<CABLE_DESC frequency=
\"
%"
PRIu64
"
\"
fecouter=
\"
0x%s
\"
modulation=
\"
0x
%s
\"
symbolrate=
\"
%u
\"
fecinner=
\"
%s
\"
/>"
,
"<CABLE_DESC frequency=
\"
%"
PRIu64
"
\"
fecouter=
\"
%s
\"
modulation=
\"
%s
\"
symbolrate=
\"
%u
\"
fecinner=
\"
%s
\"
/>"
,
desc44_get_frequency
(
p_desc
),
psz_fecouter
,
psz_modulation
,
desc44_get_symbolrate
(
p_desc
),
dvb_delivery_get_fec
(
desc43_get_fecinner
(
p_desc
)));
break
;
default:
pf_print
(
opaque
,
" - desc 44 dvb-c frequency=%"
PRIu64
" Hz fecouter=
0x%s modulation=0x
%s symbolrate=%u fecinner=%s"
,
" - desc 44 dvb-c frequency=%"
PRIu64
" Hz fecouter=
%s modulation=
%s symbolrate=%u fecinner=%s"
,
desc44_get_frequency
(
p_desc
),
psz_fecouter
,
psz_modulation
,
desc44_get_symbolrate
(
p_desc
),
dvb_delivery_get_fec
(
desc43_get_fecinner
(
p_desc
)));
...
...
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