Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
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
libdvbpsi
Commits
70b55cdd
Commit
70b55cdd
authored
May 20, 2013
by
Michael Krufky
Committed by
Jean-Paul Saman
Feb 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dr_a1: convert from linked list to array
Signed-off-by:
Michael Krufky
<
mkrufky@linuxtv.org
>
parent
9ce75c05
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
58 deletions
+3
-58
src/descriptors/dr_a1.c
src/descriptors/dr_a1.c
+2
-42
src/descriptors/dr_a1.h
src/descriptors/dr_a1.h
+1
-16
No files found.
src/descriptors/dr_a1.c
View file @
70b55cdd
...
@@ -80,31 +80,12 @@ dvbpsi_DecodeServiceLocationDr (dvbpsi_descriptor_t * p_descriptor)
...
@@ -80,31 +80,12 @@ dvbpsi_DecodeServiceLocationDr (dvbpsi_descriptor_t * p_descriptor)
for
(
int
i
=
0
;
i
<
p_decoded
->
i_number_elements
;
i
++
)
for
(
int
i
=
0
;
i
<
p_decoded
->
i_number_elements
;
i
++
)
{
{
dvbpsi_service_location_element_t
*
p_element
=
dvbpsi_service_location_element_t
*
p_element
=
&
p_decoded
->
elements
[
i
];
(
dvbpsi_service_location_element_t
*
)
malloc
(
sizeof
(
dvbpsi_service_location_element_t
));
if
(
!
p_element
)
return
NULL
;
memset
(
p_element
,
0
,
sizeof
(
dvbpsi_service_location_element_t
));
p_element
->
i_stream_type
=
buf
[
0
];
p_element
->
i_stream_type
=
buf
[
0
];
p_element
->
i_elementary_pid
=
p_element
->
i_elementary_pid
=
((
uint16_t
)
(
buf
[
1
]
&
0x1f
)
<<
8
)
|
buf
[
2
];
((
uint16_t
)
(
buf
[
1
]
&
0x1f
)
<<
8
)
|
buf
[
2
];
memcpy
(
p_element
->
i_iso_639_code
,
&
buf
[
3
],
3
);
memcpy
(
p_element
->
i_iso_639_code
,
&
buf
[
3
],
3
);
if
(
p_decoded
->
p_first_element
==
NULL
)
p_decoded
->
p_first_element
=
p_element
;
else
{
dvbpsi_service_location_element_t
*
p_last_element
=
p_decoded
->
p_first_element
;
while
(
p_last_element
->
p_next
!=
NULL
)
p_last_element
=
p_last_element
->
p_next
;
p_last_element
->
p_next
=
p_element
;
}
buf
+=
6
;
buf
+=
6
;
}
}
...
@@ -112,27 +93,6 @@ dvbpsi_DecodeServiceLocationDr (dvbpsi_descriptor_t * p_descriptor)
...
@@ -112,27 +93,6 @@ dvbpsi_DecodeServiceLocationDr (dvbpsi_descriptor_t * p_descriptor)
return
p_decoded
;
return
p_decoded
;
}
}
/*****************************************************************************
* dvbpsi_FreeServiceLocationDr
*****************************************************************************/
void
dvbpsi_FreeServiceLocationDr
(
dvbpsi_service_location_dr_t
*
descriptor
)
{
dvbpsi_service_location_element_t
*
p_element
=
NULL
;
if
(
descriptor
==
NULL
)
return
;
p_element
=
descriptor
->
p_first_element
;
while
(
p_element
)
{
dvbpsi_service_location_element_t
*
p_next
=
p_element
->
p_next
;
free
(
p_element
);
p_element
=
p_next
;
}
}
#if 0
#if 0
/*****************************************************************************
/*****************************************************************************
* dvbpsi_GenServiceDr
* dvbpsi_GenServiceDr
...
...
src/descriptors/dr_a1.h
View file @
70b55cdd
...
@@ -41,9 +41,6 @@ extern "C"
...
@@ -41,9 +41,6 @@ extern "C"
uint8_t
i_stream_type
;
uint8_t
i_stream_type
;
uint16_t
i_elementary_pid
;
uint16_t
i_elementary_pid
;
char
i_iso_639_code
[
3
];
char
i_iso_639_code
[
3
];
struct
dvbpsi_service_location_element_s
*
p_next
;
}
dvbpsi_service_location_element_t
;
}
dvbpsi_service_location_element_t
;
/*****************************************************************************
/*****************************************************************************
...
@@ -65,7 +62,7 @@ extern "C"
...
@@ -65,7 +62,7 @@ extern "C"
uint16_t
i_pcr_pid
;
/*!< PCR_PID */
uint16_t
i_pcr_pid
;
/*!< PCR_PID */
uint8_t
i_number_elements
;
/*!< number of elements used for this service */
uint8_t
i_number_elements
;
/*!< number of elements used for this service */
dvbpsi_service_location_element_t
*
p_first_element
;
dvbpsi_service_location_element_t
elements
[
0xff
]
;
}
dvbpsi_service_location_dr_t
;
}
dvbpsi_service_location_dr_t
;
...
@@ -84,18 +81,6 @@ extern "C"
...
@@ -84,18 +81,6 @@ extern "C"
dvbpsi_service_location_dr_t
dvbpsi_service_location_dr_t
*
dvbpsi_DecodeServiceLocationDr
(
dvbpsi_descriptor_t
*
p_descriptor
);
*
dvbpsi_DecodeServiceLocationDr
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_FreeServiceLocationDr
*****************************************************************************/
/*!
* \fn void dvbpsi_FreeServiceLocationDr(
dvbpsi_service_location_dr_t * p_descriptor)
* \brief frees service location descriptor
* \param p_descriptor pointer to the descriptor structure
*/
void
dvbpsi_FreeServiceLocationDr
(
dvbpsi_service_location_dr_t
*
p_descriptor
);
#if 0
#if 0
/*****************************************************************************
/*****************************************************************************
* dvbpsi_GenServiceDataDr
* dvbpsi_GenServiceDataDr
...
...
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