Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a23f364a
Commit
a23f364a
authored
Dec 15, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More comments.
parent
d2ca341d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
src/input/input_netlist.c
src/input/input_netlist.c
+14
-1
src/input/input_netlist.h
src/input/input_netlist.h
+4
-3
No files found.
src/input/input_netlist.c
View file @
a23f364a
...
...
@@ -147,6 +147,7 @@ int input_NetlistInit( input_thread_t * p_input, int i_nb_data, int i_nb_pes,
p_netlist
->
i_nb_data
=
i_nb_data
;
p_netlist
->
i_nb_pes
=
i_nb_pes
;
p_netlist
->
i_buffer_size
=
i_buffer_size
;
return
(
0
);
/* Everything went all right */
}
...
...
@@ -179,7 +180,8 @@ void input_NetlistMviovec( void * p_netlist, size_t i_nb_iovec )
/*****************************************************************************
* input_NetlistNewPacket: returns a free data_packet_t
*****************************************************************************/
struct
data_packet_s
*
input_NetlistNewPacket
(
void
*
p_netlist
)
struct
data_packet_s
*
input_NetlistNewPacket
(
void
*
p_netlist
,
size_t
i_buffer_size
)
{
unsigned
int
i_return
;
netlist_t
*
pt_netlist
;
/* for a cast */
...
...
@@ -188,6 +190,15 @@ struct data_packet_s * input_NetlistNewPacket( void * p_netlist )
pt_netlist
=
(
netlist_t
*
)
p_netlist
;
/* cast p_netlist -> netlist_t */
#ifdef DEBUG
if
(
i_buffer_size
>
p_netlist
->
i_buffer_size
)
{
/* This should not happen */
intf_ErrMsg
(
"Netlist packet too small !"
);
return
NULL
;
}
#endif
/* lock */
vlc_mutex_lock
(
&
pt_netlist
->
lock
);
...
...
@@ -205,6 +216,8 @@ struct data_packet_s * input_NetlistNewPacket( void * p_netlist )
/* unlock */
vlc_mutex_unlock
(
&
pt_netlist
->
lock
);
//if (i_buffer_size < p_pes->i_buffer_size) => diminuer p_payload_end
//risque de race condition : que se passe-t-il si aprs avoir rendu
//le lock un autre thread rend un paquet et crase
...
...
src/input/input_netlist.h
View file @
a23f364a
...
...
@@ -3,7 +3,9 @@
*****************************************************************************/
typedef
struct
netlist_s
{
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
size_t
i_buffer_size
;
/* Buffers */
byte_t
*
p_buffers
;
/* Big malloc'ed area */
...
...
@@ -20,7 +22,6 @@ typedef struct netlist_s
unsigned
int
i_nb_data
;
/* Index */
unsigned
int
i_data_start
,
i_data_end
;
unsigned
int
i_pes_start
,
i_pes_end
;
unsigned
int
i_iovec_start
,
i_iovec_end
;
...
...
@@ -34,7 +35,7 @@ int input_NetlistInit( struct input_thread_s *,
size_t
i_buffer_size
);
struct
iovec
*
input_NetlistGetiovec
(
void
*
);
void
input_NetlistMviovec
(
void
*
,
size_t
);
struct
data_packet_s
*
input_NetlistNewPacket
(
void
*
);
struct
data_packet_s
*
input_NetlistNewPacket
(
void
*
,
size_t
);
struct
pes_packet_s
*
input_NetlistNewPES
(
void
*
);
void
input_NetlistDeletePacket
(
void
*
,
struct
data_packet_s
*
);
void
input_NetlistDeletePES
(
void
*
,
struct
pes_packet_s
*
);
...
...
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