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
4911e585
Commit
4911e585
authored
Mar 28, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: ts: read ObjectDescriptor
parent
ebc54664
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
modules/demux/mpeg4_iod.c
modules/demux/mpeg4_iod.c
+49
-0
No files found.
modules/demux/mpeg4_iod.c
View file @
4911e585
...
...
@@ -312,6 +312,46 @@ static bool IOD_InitialObjectDesc_Read( vlc_object_t *p_object, unsigned i_data,
return
true
;
}
static
bool
IODObjectDescriptorRead
(
vlc_object_t
*
p_object
,
unsigned
i_data
,
const
uint8_t
*
p_data
,
iod_read_params_t
params
)
{
iod_descriptor_t
*
p_iod
=
params
.
p_iod
;
if
(
i_data
<
3
+
2
)
return
false
;
uint16_t
i_object_descriptor_id
=
(
IODGetBytes
(
&
i_data
,
&
p_data
,
1
)
<<
2
);
uint8_t
i_flags
=
IODGetBytes
(
&
i_data
,
&
p_data
,
1
);
i_object_descriptor_id
|=
i_flags
>>
6
;
iod_debug
(
p_object
,
" * ObjectDescriptorID: %"
PRIu16
,
i_object_descriptor_id
);
if
(
(
i_flags
>>
5
)
&
0x01
)
{
p_iod
->
psz_url
=
IODGetURL
(
&
i_data
,
&
p_data
);
iod_debug
(
p_object
,
" * URL: %s"
,
p_iod
->
psz_url
);
return
true
;
}
if
(
i_data
<
2
)
/* at least one ES desc */
return
false
;
/* 1..255 ESdescr */
uint8_t
i_desc_count
=
IOD_Desc_Read
(
p_object
,
&
i_data
,
&
p_data
,
IODTag_ESDescr
,
ES_DESCRIPTOR_COUNT
,
params
);
if
(
i_desc_count
==
0
)
{
iod_debug
(
p_object
,
" * missing ES Descriptor"
);
return
false
;
}
/* 0..255 OCIdescr */
/* 0..255 IPMPdescpointer */
/* 0..255 IPMPdesc */
/* 0..1 IPMPtoollistdesc */
/* 0..255 Extensiondescr */
return
true
;
}
static
uint8_t
IOD_Desc_Read
(
vlc_object_t
*
p_object
,
unsigned
*
pi_data
,
const
uint8_t
**
pp_data
,
uint8_t
i_target_tag
,
uint8_t
i_max_desc
,
iod_read_params_t
params
)
{
...
...
@@ -331,6 +371,15 @@ static uint8_t IOD_Desc_Read( vlc_object_t *p_object, unsigned *pi_data, const u
i_target_tag
,
i_tag
,
*
pi_data
);
switch
(
i_tag
)
{
case
IODTag_ObjectDescr
:
{
/* iod_descriptor_t *p_iod = (iod_descriptor_t *) param; */
if
(
!
IODObjectDescriptorRead
(
p_object
,
i_descriptor_data
,
p_descriptor_data
,
params
)
)
{};
break
;
}
case
IODTag_InitialObjectDescr
:
{
/* iod_descriptor_t *p_iod = (iod_descriptor_t *) param; */
...
...
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