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
2d79bfcb
Commit
2d79bfcb
authored
Dec 29, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hidden gory buffer management details in a private section of data_packet_t.
parent
9ecb59ab
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
198 additions
and
133 deletions
+198
-133
include/input_ext-dec.h
include/input_ext-dec.h
+21
-17
include/input_ext-plugins.h
include/input_ext-plugins.h
+162
-101
plugins/dvd/input_dvd.c
plugins/dvd/input_dvd.c
+3
-3
plugins/dvdread/input_dvdread.c
plugins/dvdread/input_dvdread.c
+3
-3
plugins/mpeg_system/input_es.c
plugins/mpeg_system/input_es.c
+2
-2
plugins/mpeg_system/input_ps.c
plugins/mpeg_system/input_ps.c
+3
-3
plugins/mpeg_system/input_ts.c
plugins/mpeg_system/input_ts.c
+2
-2
plugins/vcd/input_vcd.c
plugins/vcd/input_vcd.c
+2
-2
No files found.
include/input_ext-dec.h
View file @
2d79bfcb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_ext-dec.h,v 1.4
7 2001/12/27 03:47:08
massiot Exp $
* $Id: input_ext-dec.h,v 1.4
8 2001/12/29 03:07:51
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
...
@@ -40,21 +40,25 @@
...
@@ -40,21 +40,25 @@
*****************************************************************************
*****************************************************************************
* Describe a data packet.
* Describe a data packet.
*****************************************************************************/
*****************************************************************************/
#define DATA_PACKET \
/* start of the PS or TS packet */
\
byte_t * p_demux_start; \
/* start of the PES payload in this packet */
\
byte_t * p_payload_start; \
byte_t * p_payload_end;
/* guess ? :-) */
\
/* is the packet messed up ? */
\
boolean_t b_discard_payload;
typedef
struct
data_packet_s
typedef
struct
data_packet_s
{
{
/* Decoders information */
/* Used to chain the packets that carry data for a same PES or PSI */
byte_t
*
p_demux_start
;
/* start of the PS or TS packet */
byte_t
*
p_payload_start
;
/* start of the PES payload in this packet */
byte_t
*
p_payload_end
;
/* guess ? :-) */
boolean_t
b_discard_payload
;
/* is the packet messed up ? */
/* Used to chain the TS packets that carry data for a same PES or PSI */
struct
data_packet_s
*
p_next
;
struct
data_packet_s
*
p_next
;
/* Buffer manager information */
DATA_PACKET
byte_t
*
p_buffer
;
/* raw data packet */
unsigned
int
i_size
;
/* buffer size */
/* Please note that at least one buffer allocator (in particular, the
* Next Generation Buffer Allocator) extends this structure with
* private data after DATA_PACKET. */
}
data_packet_t
;
}
data_packet_t
;
/*****************************************************************************
/*****************************************************************************
...
@@ -65,6 +69,9 @@ typedef struct data_packet_s
...
@@ -65,6 +69,9 @@ typedef struct data_packet_s
*****************************************************************************/
*****************************************************************************/
typedef
struct
pes_packet_s
typedef
struct
pes_packet_s
{
{
/* Chained list to the next PES packet (depending on the context) */
struct
pes_packet_s
*
p_next
;
/* PES properties */
/* PES properties */
boolean_t
b_data_alignment
;
/* used to find the beginning of
boolean_t
b_data_alignment
;
/* used to find the beginning of
* a video or audio unit */
* a video or audio unit */
...
@@ -76,18 +83,15 @@ typedef struct pes_packet_s
...
@@ -76,18 +83,15 @@ typedef struct pes_packet_s
int
i_rate
;
/* current pace of reading
int
i_rate
;
/* current pace of reading
* (see stream_control.h) */
* (see stream_control.h) */
int
i_pes_size
;
/* size of the current PES packet */
unsigned
int
i_pes_size
;
/* size of the current PES packet */
/* Chained list to packets */
/* Chained list to packets */
data_packet_t
*
p_first
;
/* The first packet contained by this
data_packet_t
*
p_first
;
/* The first packet contained by this
* PES (used by decoders). */
* PES (used by decoders). */
data_packet_t
*
p_last
;
/* The last packet contained by this
data_packet_t
*
p_last
;
/* The last packet contained by this
PES (used by the buffer allocator) */
PES (used by the buffer allocator) */
int
i_nb_data
;
/* Number of data packets in the chained
unsigned
int
i_nb_data
;
/* Number of data packets in the chained
list */
list */
/* Chained list used by the input buffers manager */
struct
pes_packet_s
*
p_next
;
}
pes_packet_t
;
}
pes_packet_t
;
/*****************************************************************************
/*****************************************************************************
...
...
include/input_ext-plugins.h
View file @
2d79bfcb
This diff is collapsed.
Click to expand it.
plugins/dvd/input_dvd.c
View file @
2d79bfcb
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* -dvd_udf to find files
* -dvd_udf to find files
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.11
2 2001/12/29 00:39:49
massiot Exp $
* $Id: input_dvd.c,v 1.11
3 2001/12/29 03:07:51
massiot Exp $
*
*
* Author: Stphane Borel <stef@via.ecp.fr>
* Author: Stphane Borel <stef@via.ecp.fr>
*
*
...
@@ -123,9 +123,9 @@ DECLARE_BUFFERS_SHARED( FLAGS, NB_LIFO );
...
@@ -123,9 +123,9 @@ DECLARE_BUFFERS_SHARED( FLAGS, NB_LIFO );
DECLARE_BUFFERS_INIT
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_INIT
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_END_SHARED
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_END_SHARED
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET_SHARED
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET_SHARED
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPACKET_SHARED
(
FLAGS
,
NB_LIFO
,
1
5
0
);
DECLARE_BUFFERS_DELETEPACKET_SHARED
(
FLAGS
,
NB_LIFO
,
1
00
0
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPES
_SHARED
(
FLAGS
,
NB_LIFO
,
150
,
15
0
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
100
0
);
DECLARE_BUFFERS_TOIO
(
FLAGS
,
DVD_LB_SIZE
);
DECLARE_BUFFERS_TOIO
(
FLAGS
,
DVD_LB_SIZE
);
DECLARE_BUFFERS_SHAREBUFFER
(
FLAGS
);
DECLARE_BUFFERS_SHAREBUFFER
(
FLAGS
);
...
...
plugins/dvdread/input_dvdread.c
View file @
2d79bfcb
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading.
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: input_dvdread.c,v 1.
7 2001/12/29 00:39:49
massiot Exp $
* $Id: input_dvdread.c,v 1.
8 2001/12/29 03:07:51
massiot Exp $
*
*
* Author: Stphane Borel <stef@via.ecp.fr>
* Author: Stphane Borel <stef@via.ecp.fr>
*
*
...
@@ -114,9 +114,9 @@ DECLARE_BUFFERS_SHARED( FLAGS, NB_LIFO );
...
@@ -114,9 +114,9 @@ DECLARE_BUFFERS_SHARED( FLAGS, NB_LIFO );
DECLARE_BUFFERS_INIT
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_INIT
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_END_SHARED
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_END_SHARED
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET_SHARED
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET_SHARED
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPACKET_SHARED
(
FLAGS
,
NB_LIFO
,
1
5
0
);
DECLARE_BUFFERS_DELETEPACKET_SHARED
(
FLAGS
,
NB_LIFO
,
1
00
0
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPES
_SHARED
(
FLAGS
,
NB_LIFO
,
150
,
15
0
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
100
0
);
DECLARE_BUFFERS_TOIO
(
FLAGS
,
DVD_LB_SIZE
);
DECLARE_BUFFERS_TOIO
(
FLAGS
,
DVD_LB_SIZE
);
DECLARE_BUFFERS_SHAREBUFFER
(
FLAGS
);
DECLARE_BUFFERS_SHAREBUFFER
(
FLAGS
);
...
...
plugins/mpeg_system/input_es.c
View file @
2d79bfcb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* input_es.c: Elementary Stream demux and packet management
* input_es.c: Elementary Stream demux and packet management
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: input_es.c,v 1.
8 2001/12/27 03:47:08
massiot Exp $
* $Id: input_es.c,v 1.
9 2001/12/29 03:07:51
massiot Exp $
*
*
* Author: Christophe Massiot <massiot@via.ecp.fr>
* Author: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -98,7 +98,7 @@ DECLARE_BUFFERS_END( FLAGS, NB_LIFO );
...
@@ -98,7 +98,7 @@ DECLARE_BUFFERS_END( FLAGS, NB_LIFO );
DECLARE_BUFFERS_NEWPACKET
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPACKET
(
FLAGS
,
NB_LIFO
,
150
);
DECLARE_BUFFERS_DELETEPACKET
(
FLAGS
,
NB_LIFO
,
150
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
150
,
150
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
150
);
DECLARE_BUFFERS_TOIO
(
FLAGS
,
ES_PACKET_SIZE
);
DECLARE_BUFFERS_TOIO
(
FLAGS
,
ES_PACKET_SIZE
);
/*****************************************************************************
/*****************************************************************************
...
...
plugins/mpeg_system/input_ps.c
View file @
2d79bfcb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management
* input_ps.c: PS demux and packet management
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_ps.c,v 1.
8 2001/12/27 03:47:09
massiot Exp $
* $Id: input_ps.c,v 1.
9 2001/12/29 03:07:51
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
...
@@ -100,9 +100,9 @@ DECLARE_BUFFERS_EMBEDDED( FLAGS, NB_LIFO );
...
@@ -100,9 +100,9 @@ DECLARE_BUFFERS_EMBEDDED( FLAGS, NB_LIFO );
DECLARE_BUFFERS_INIT
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_INIT
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_END
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_END
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPACKET
(
FLAGS
,
NB_LIFO
,
15
0
);
DECLARE_BUFFERS_DELETEPACKET
(
FLAGS
,
NB_LIFO
,
30
0
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
150
,
15
0
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
30
0
);
/*****************************************************************************
/*****************************************************************************
...
...
plugins/mpeg_system/input_ts.c
View file @
2d79bfcb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* input_ts.c: TS demux and netlist management
* input_ts.c: TS demux and netlist management
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_ts.c,v 1.
7 2001/12/27 03:47:09
massiot Exp $
* $Id: input_ts.c,v 1.
8 2001/12/29 03:07:51
massiot Exp $
*
*
* Authors: Henri Fallon <henri@videolan.org>
* Authors: Henri Fallon <henri@videolan.org>
*
*
...
@@ -101,7 +101,7 @@ DECLARE_BUFFERS_END( FLAGS, NB_LIFO );
...
@@ -101,7 +101,7 @@ DECLARE_BUFFERS_END( FLAGS, NB_LIFO );
DECLARE_BUFFERS_NEWPACKET
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPACKET
(
FLAGS
,
NB_LIFO
,
1000
);
DECLARE_BUFFERS_DELETEPACKET
(
FLAGS
,
NB_LIFO
,
1000
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
1
000
,
1
50
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
150
);
DECLARE_BUFFERS_TOIO
(
FLAGS
,
TS_PACKET_SIZE
);
DECLARE_BUFFERS_TOIO
(
FLAGS
,
TS_PACKET_SIZE
);
/*****************************************************************************
/*****************************************************************************
...
...
plugins/vcd/input_vcd.c
View file @
2d79bfcb
...
@@ -102,9 +102,9 @@ DECLARE_BUFFERS_EMBEDDED( FLAGS, NB_LIFO );
...
@@ -102,9 +102,9 @@ DECLARE_BUFFERS_EMBEDDED( FLAGS, NB_LIFO );
DECLARE_BUFFERS_INIT
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_INIT
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_END
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_END
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPACKET
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPACKET
(
FLAGS
,
NB_LIFO
,
1
5
0
);
DECLARE_BUFFERS_DELETEPACKET
(
FLAGS
,
NB_LIFO
,
1
00
0
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_NEWPES
(
FLAGS
,
NB_LIFO
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
1
50
,
15
0
);
DECLARE_BUFFERS_DELETEPES
(
FLAGS
,
NB_LIFO
,
1
00
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