Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
90820464
Commit
90820464
authored
Dec 19, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input-II now correctly handles private stream 1 (AC3, DVDSPU).
parent
42e8a2e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
23 deletions
+78
-23
src/ac3_decoder/ac3_decoder_thread.c
src/ac3_decoder/ac3_decoder_thread.c
+3
-3
src/input/input.c
src/input/input.c
+1
-0
src/input/input_programs.c
src/input/input_programs.c
+9
-5
src/input/mpeg_system.c
src/input/mpeg_system.c
+65
-15
No files found.
src/ac3_decoder/ac3_decoder_thread.c
View file @
90820464
...
...
@@ -367,11 +367,11 @@ void ac3_byte_stream_next (ac3_byte_stream_t * p_byte_stream)
p_ac3dec
->
p_data
=
DECODER_FIFO_START
(
*
p_ac3dec
->
p_fifo
)
->
p_first
;
/* parse ac3 magic header */
ptr
=
*
(
p_ac3dec
->
p_data
->
p_payload_start
+
2
);
ptr
=
*
(
p_ac3dec
->
p_data
->
p_payload_start
+
1
);
ptr
<<=
8
;
ptr
|=
*
(
p_ac3dec
->
p_data
->
p_payload_start
+
3
);
ptr
|=
*
(
p_ac3dec
->
p_data
->
p_payload_start
+
2
);
p_ac3dec
->
sync_ptr
=
ptr
;
p_ac3dec
->
p_data
->
p_payload_start
+=
4
;
p_ac3dec
->
p_data
->
p_payload_start
+=
3
;
/* We can release the fifo's data lock */
vlc_mutex_unlock
(
&
p_ac3dec
->
p_fifo
->
data_lock
);
...
...
src/input/input.c
View file @
90820464
...
...
@@ -4,6 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.59 2000/12/19 19:08:51 massiot Exp $
*
* Authors:
*
...
...
src/input/input_programs.c
View file @
90820464
...
...
@@ -2,6 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_programs.c,v 1.4 2000/12/19 19:08:51 massiot Exp $
*
* Authors:
*
...
...
@@ -389,11 +390,6 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
switch
(
p_es
->
i_type
)
{
/* FIXME ! */
case
AC3_AUDIO_ES
:
p_es
->
thread_id
=
ac3dec_CreateThread
(
GetAdecConfig
(
p_input
,
p_es
)
);
break
;
case
MPEG1_AUDIO_ES
:
case
MPEG2_AUDIO_ES
:
p_es
->
thread_id
=
adec_CreateThread
(
GetAdecConfig
(
p_input
,
p_es
)
);
...
...
@@ -404,6 +400,14 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
p_es
->
thread_id
=
vpar_CreateThread
(
GetVdecConfig
(
p_input
,
p_es
)
);
break
;
case
AC3_AUDIO_ES
:
p_es
->
thread_id
=
ac3dec_CreateThread
(
GetAdecConfig
(
p_input
,
p_es
)
);
break
;
case
DVD_SPU_ES
:
p_es
->
thread_id
=
spudec_CreateThread
(
GetVdecConfig
(
p_input
,
p_es
)
);
break
;
default:
intf_ErrMsg
(
"Unknown stream type %d"
,
p_es
->
i_type
);
return
(
-
1
);
...
...
src/input/mpeg_system.c
View file @
90820464
...
...
@@ -2,6 +2,7 @@
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: mpeg_system.c,v 1.9 2000/12/19 19:08:51 massiot Exp $
*
* Authors:
*
...
...
@@ -61,10 +62,6 @@ void input_DecodePES( input_thread_t * p_input, es_descriptor_t * p_es )
{
#define p_pes (p_es->p_pes)
/* FIXME: since we don't check the type of the stream anymore, we don't
* do the following : p_data->p_payload_start++; for DVD_SPU_ES, and
* DVD SPU support is BROKEN ! */
if
(
p_es
->
p_decoder_fifo
!=
NULL
)
{
vlc_mutex_lock
(
&
p_es
->
p_decoder_fifo
->
data_lock
);
...
...
@@ -344,6 +341,13 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
break
;
}
if
(
p_es
->
i_stream_id
==
0xBC
)
{
/* With private stream 1, the first byte of the payload
* is a stream_private_id, so skip it. */
i_pes_header_size
++
;
}
/* Now we've parsed the header, we just have to indicate in some
* specific data packets where the PES payload begins (renumber
* p_payload_start), so that the decoders can find the beginning
...
...
@@ -643,6 +647,22 @@ static void CRDecode( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm,
* PS Demultiplexing
*/
/*****************************************************************************
* GetID: Get the ID of a stream
*****************************************************************************/
static
u16
GetID
(
data_packet_t
*
p_data
)
{
u16
i_id
;
i_id
=
p_data
->
p_buffer
[
3
];
/* stream_id */
if
(
i_id
==
0xBD
)
{
/* stream_private_id */
i_id
|=
p_data
->
p_buffer
[
9
+
p_data
->
p_buffer
[
8
]
]
<<
8
;
}
return
(
i_id
);
}
/*****************************************************************************
* DecodePSM: Decode the Program Stream Map information
*****************************************************************************/
...
...
@@ -803,9 +823,20 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
int
i_dummy
;
/* This is a PES packet. Find out if we want it or not. */
i_id
=
p_data
->
p_buffer
[
3
];
/* ID of the stream. */
i_id
=
GetID
(
p_data
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
#if 1
for
(
i_dummy
=
0
;
i_dummy
<
INPUT_MAX_ES
;
i_dummy
++
)
{
if
(
p_input
->
p_es
[
i_dummy
].
i_id
!=
EMPTY_ID
&&
p_input
->
p_es
[
i_dummy
].
i_id
==
i_id
)
{
p_es
=
&
p_input
->
p_es
[
i_dummy
];
break
;
}
}
#else
for
(
i_dummy
=
0
;
i_dummy
<
INPUT_MAX_SELECTED_ES
;
i_dummy
++
)
{
if
(
p_input
->
pp_selected_es
[
i_dummy
]
!=
NULL
...
...
@@ -815,20 +846,19 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
break
;
}
}
#endif
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
if
(
p_es
==
NULL
)
{
#if 1
/* FIXME ! */
if
(
(
i_id
&
0xC0L
)
==
0xC0L
)
{
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
/* MPEG video and audio */
p_es
=
input_AddES
(
p_input
,
p_input
->
stream
.
pp_programs
[
0
],
i_id
,
0
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
p_es
=
input_AddES
(
p_input
,
p_input
->
stream
.
pp_programs
[
0
],
i_id
,
0
);
if
(
p_es
!=
NULL
&&
(
i_id
&
0xF0L
)
==
0xE0L
)
if
(
p_es
!=
NULL
)
{
if
(
(
i_id
&
0xF0
)
==
0xE0
)
{
/* MPEG video */
p_es
->
i_stream_id
=
i_id
;
...
...
@@ -838,12 +868,32 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
input_SelectES
(
p_input
,
p_es
);
#endif
}
else
if
(
p_es
!=
NULL
&&
(
i_id
&
0xE0
)
==
0xC0
)
else
if
(
(
i_id
&
0xE0
)
==
0xC0
)
{
/* MPEG audio */
p_es
->
i_stream_id
=
i_id
;
p_es
->
i_type
=
MPEG2_AUDIO_ES
;
#ifdef AUTO_SPAWN
input_SelectES
(
p_input
,
p_es
);
#endif
}
else
if
(
(
i_id
&
0xF0FF
)
==
0x80BD
)
{
/* AC3 audio */
p_es
->
i_stream_id
=
0xBD
;
p_es
->
i_type
=
AC3_AUDIO_ES
;
#ifdef AUTO_SPAWN
input_SelectES
(
p_input
,
p_es
);
#endif
}
else
if
(
(
i_id
&
0xF0FF
)
==
0x20BD
)
{
/* Subtitles video */
p_es
->
i_stream_id
=
0xBD
;
p_es
->
i_type
=
DVD_SPU_ES
;
#ifdef AUTO_SPAWN
input_SelectES
(
p_input
,
p_es
);
#endif
...
...
@@ -861,7 +911,7 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
#endif
}
if
(
p_es
!=
NULL
)
if
(
p_es
->
p_decoder_fifo
!=
NULL
&&
!
b_trash
)
{
#ifdef STATS
p_es
->
c_packets
++
;
...
...
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