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
20229421
Commit
20229421
authored
Dec 11, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prototypes for netlist functions.
parent
fd5a24a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
0 deletions
+135
-0
src/input/input_netlist.c
src/input/input_netlist.c
+99
-0
src/input/input_netlist.h
src/input/input_netlist.h
+36
-0
No files found.
src/input/input_netlist.c
0 → 100644
View file @
20229421
/*****************************************************************************
* input_netlist.c: netlist management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
*
* Authors:
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "stream_control.h"
#include "input_ext-intf.h"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
/*****************************************************************************
* input_NetlistInit: allocates netlist buffers and init indexes
*****************************************************************************/
int
input_NetlistInit
(
input_thread_t
*
p_input
,
int
i_nb_data
,
int
i_nb_pes
,
size_t
i_buffer_size
)
{
/* p_input->p_method_data = malloc(sizeof(netlist_t)) */
/* p_buffers = malloc(i_buffer_size*i_nb_data) */
/* p_data = malloc(...*(i_nb_data + INPUT_READ_ONCE)) */
/* p_pes = malloc(...*(i_nb_pes + INPUT_READ_ONCE)) */
/* vlc_mutex_init */
/* i_*_start = 0, i_*_end = i_nb_* */
/* tous les paquets dans les netlists */
}
/*****************************************************************************
* input_NetlistGetiovec: returns an iovec pointer for a readv() operation
*****************************************************************************/
struct
iovec
*
input_NetlistGetiovec
(
void
*
p_netlist
)
{
/* fonction la plus difficile, terminer par celle-la */
}
/*****************************************************************************
* input_NetlistNewPacket: returns a free data_packet_t
*****************************************************************************/
struct
data_packet_s
*
input_NetlistNewPacket
(
void
*
p_netlist
)
{
/* cast p_netlist -> netlist_t */
/* lock */
/* return pp_free_data[i_data_start], i_data_start++ */
}
/*****************************************************************************
* input_NetlistNewPES: returns a free pes_packet_t
*****************************************************************************/
struct
pes_packet_s
*
input_NetlistNewPES
(
void
*
p_netlist
)
{
/* pareil */
}
/*****************************************************************************
* input_NetlistDeletePacket: puts a data_packet_t back into the netlist
*****************************************************************************/
void
input_NetlistDeletePacket
(
void
*
p_netlist
,
data_packet_t
*
p_data
)
{
/* pp_free_data[i_data_end] = p_data, i_data_end++ */
}
/*****************************************************************************
* input_NetlistDeletePES: puts a pes_packet_t back into the netlist
*****************************************************************************/
void
input_NetlistDeletePES
(
void
*
p_netlist
,
pes_packet_s
*
p_pes
)
{
/* idem, plus detruire tous les data_packet_t dans p_pes->p_first,
* p_pes->p_first->p_next, etc. */
}
/*****************************************************************************
* input_NetlistEnd: frees all allocated structures
*****************************************************************************/
void
input_NetlistEnd
(
input_thread_t
*
)
{
}
src/input/input_netlist.h
0 → 100644
View file @
20229421
/*****************************************************************************
* netlist_t: structure to manage a netlist
*****************************************************************************/
typedef
struct
netlist_s
{
vlc_mutex_lock
lock
;
/* Buffers */
byte_t
*
p_buffers
;
/* Big malloc'ed area */
data_packet_t
*
p_data
;
/* malloc'ed area */
pes_packet_t
*
p_pes
;
/* malloc'ed area */
/* FIFOs of free packets */
data_packet_t
**
pp_free_data
;
pes_packet_t
**
pp_free_pes
;
struct
iovec
*
p_free_iovec
;
/* 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
;
}
netlist_t
;
/*****************************************************************************
* Prototypes
*****************************************************************************/
int
input_NetlistInit
(
struct
input_thread_s
*
,
int
i_nb_data
,
int
i_nb_pes
,
size_t
i_buffer_size
);
struct
iovec
*
input_NetlistGetiovec
(
void
*
);
struct
data_packet_s
*
input_NetlistNewPacket
(
void
*
);
struct
pes_packet_s
*
input_NetlistNewPES
(
void
*
);
void
input_NetlistDeletePacket
(
void
*
,
struct
data_packet_s
*
);
void
input_NetlistDeletePES
(
void
*
,
struct
pes_packet_s
*
);
void
input_NetlistEnd
(
struct
input_thread_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