Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
bitstream
Commits
9252a6ae
Commit
9252a6ae
authored
Sep 14, 2020
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'quarium-scte35'
parents
540ea7ea
78548dbf
Pipeline
#22233
failed with stage
in 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
scte/35.h
scte/35.h
+20
-0
No files found.
scte/35.h
View file @
9252a6ae
...
...
@@ -669,6 +669,8 @@ static inline bool scte35_private_validate(const uint8_t *p_scte35)
*****************************************************************************/
#define SCTE35_SPLICE_DESC_HEADER_SIZE 6
#define SCTE35_SPLICE_DESC_IDENTIFIER 0x43554549
#define SCTE35_SPLICE_DESC_TAG_AVAIL 0x00
#define SCTE35_SPLICE_DESC_TAG_DTMF 0x01
#define SCTE35_SPLICE_DESC_TAG_SEG 0x02
...
...
@@ -703,6 +705,17 @@ static inline void scte35_splice_desc_set_identifier(uint8_t *p_desc,
#define SCTE35_SEG_DESC_DURATION_SIZE 5
#define SCTE35_SEG_DESC_SUB_SEG_SIZE 2
static
inline
void
scte35_seg_desc_init
(
uint8_t
*
p_desc
,
uint8_t
length
)
{
scte35_splice_desc_set_tag
(
p_desc
,
SCTE35_SPLICE_DESC_TAG_SEG
);
scte35_splice_desc_set_length
(
p_desc
,
SCTE35_SPLICE_DESC_HEADER_SIZE
-
DESC_HEADER_SIZE
+
SCTE35_SEG_DESC_HEADER_SIZE
+
length
);
scte35_splice_desc_set_identifier
(
p_desc
,
SCTE35_SPLICE_DESC_IDENTIFIER
);
p_desc
[
10
]
=
0x7f
;
}
static
inline
uint32_t
scte35_seg_desc_get_event_id
(
const
uint8_t
*
p_desc
)
{
return
((
uint32_t
)
p_desc
[
6
]
<<
24
)
|
(
p_desc
[
7
]
<<
16
)
|
...
...
@@ -771,6 +784,8 @@ scte35_seg_desc_set_delivery_not_restricted(uint8_t *p_desc,
if
(
scte35_seg_desc_has_cancel
(
p_desc
))
return
;
p_desc
[
11
]
=
(
p_desc
[
11
]
&
0xdf
)
|
(
flag
?
0x20
:
0x00
);
if
(
flag
)
p_desc
[
11
]
|=
0x1f
;
}
static
inline
bool
...
...
@@ -866,6 +881,11 @@ static inline uint8_t *scte35_seg_desc_get_component(const uint8_t *p_desc,
return
NULL
;
}
static
inline
void
scte35_seg_desc_component_init
(
uint8_t
*
p_comp
)
{
p_comp
[
1
]
=
0xfe
;
}
static
inline
uint8_t
scte35_seg_desc_component_get_tag
(
const
uint8_t
*
p_comp
)
{
return
p_comp
[
0
];
...
...
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