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
8a50a4e0
Commit
8a50a4e0
authored
Oct 10, 2011
by
Georgi Chorbadzhiyski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg/psi: Complete support for descriptor 0x09 (CA).
parent
f40306d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
mpeg/psi/desc_09.h
mpeg/psi/desc_09.h
+18
-0
No files found.
mpeg/psi/desc_09.h
View file @
8a50a4e0
...
@@ -47,16 +47,34 @@ extern "C"
...
@@ -47,16 +47,34 @@ extern "C"
*****************************************************************************/
*****************************************************************************/
#define DESC09_HEADER_SIZE (DESC_HEADER_SIZE + 4)
#define DESC09_HEADER_SIZE (DESC_HEADER_SIZE + 4)
static
inline
void
desc09_init
(
uint8_t
*
p_desc
)
{
desc_set_tag
(
p_desc
,
0x09
);
desc_set_length
(
p_desc
,
DESC09_HEADER_SIZE
-
DESC_HEADER_SIZE
);
}
static
inline
uint16_t
desc09_get_sysid
(
const
uint8_t
*
p_desc
)
static
inline
uint16_t
desc09_get_sysid
(
const
uint8_t
*
p_desc
)
{
{
return
(
p_desc
[
2
]
<<
8
)
|
p_desc
[
3
];
return
(
p_desc
[
2
]
<<
8
)
|
p_desc
[
3
];
}
}
static
inline
void
desc09_set_sysid
(
uint8_t
*
p_desc
,
uint16_t
i_sysid
)
{
p_desc
[
2
]
=
i_sysid
>>
8
;
p_desc
[
3
]
=
i_sysid
&
0xff
;
}
static
inline
uint16_t
desc09_get_pid
(
const
uint8_t
*
p_desc
)
static
inline
uint16_t
desc09_get_pid
(
const
uint8_t
*
p_desc
)
{
{
return
((
p_desc
[
4
]
&
0x1f
)
<<
8
)
|
p_desc
[
5
];
return
((
p_desc
[
4
]
&
0x1f
)
<<
8
)
|
p_desc
[
5
];
}
}
static
inline
void
desc09_set_pid
(
uint8_t
*
p_desc
,
uint16_t
i_pid
)
{
p_desc
[
4
]
=
((
i_pid
>>
8
)
&
0xff
)
|
0xE0
;
p_desc
[
5
]
=
i_pid
&
0xff
;
}
static
inline
bool
desc09_validate
(
const
uint8_t
*
p_desc
)
static
inline
bool
desc09_validate
(
const
uint8_t
*
p_desc
)
{
{
return
desc_get_length
(
p_desc
)
>=
DESC09_HEADER_SIZE
-
DESC_HEADER_SIZE
;
return
desc_get_length
(
p_desc
)
>=
DESC09_HEADER_SIZE
-
DESC_HEADER_SIZE
;
...
...
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