Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
f9a96b8e
Commit
f9a96b8e
authored
Dec 03, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed numerous bugs in ES selection.
parent
d95b9235
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
96 deletions
+51
-96
plugins/mpeg/input_ps.c
plugins/mpeg/input_ps.c
+2
-73
src/input/mpeg_system.c
src/input/mpeg_system.c
+49
-23
No files found.
plugins/mpeg/input_ps.c
View file @
f9a96b8e
...
...
@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_ps.c,v 1.
39 2001/11/28 15:08:05
massiot Exp $
* $Id: input_ps.c,v 1.
40 2001/12/03 11:49:04
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
...
...
@@ -291,78 +291,7 @@ static void PSInit( input_thread_t * p_input )
/* (The PSM decoder will care about spawning the decoders) */
p_input
->
stream
.
pp_programs
[
0
]
->
b_is_ok
=
1
;
}
#ifdef AUTO_SPAWN
else
{
/* (We have to do it ourselves) */
int
i_es
;
/* FIXME: we should do multiple passes in case an audio type
* is not present */
for
(
i_es
=
0
;
i_es
<
p_input
->
stream
.
pp_programs
[
0
]
->
i_es_number
;
i_es
++
)
{
#define p_es p_input->stream.pp_programs[0]->pp_es[i_es]
switch
(
p_es
->
i_type
)
{
case
MPEG1_VIDEO_ES
:
case
MPEG2_VIDEO_ES
:
input_SelectES
(
p_input
,
p_es
);
break
;
case
MPEG1_AUDIO_ES
:
case
MPEG2_AUDIO_ES
:
if
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
==
(
p_es
->
i_id
&
0x1F
)
)
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
{
case
0
:
main_PutIntVariable
(
INPUT_AUDIO_VAR
,
REQUESTED_MPEG
);
case
REQUESTED_MPEG
:
input_SelectES
(
p_input
,
p_es
);
}
break
;
case
AC3_AUDIO_ES
:
if
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
==
((
p_es
->
i_id
&
0xF00
)
>>
8
)
)
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
{
case
0
:
main_PutIntVariable
(
INPUT_AUDIO_VAR
,
REQUESTED_AC3
);
case
REQUESTED_AC3
:
input_SelectES
(
p_input
,
p_es
);
}
break
;
case
DVD_SPU_ES
:
if
(
main_GetIntVariable
(
INPUT_SUBTITLE_VAR
,
-
1
)
==
((
p_es
->
i_id
&
0x1F00
)
>>
8
)
)
{
input_SelectES
(
p_input
,
p_es
);
}
break
;
case
LPCM_AUDIO_ES
:
if
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
==
((
p_es
->
i_id
&
0x1F00
)
>>
8
)
)
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
{
case
0
:
main_PutIntVariable
(
INPUT_AUDIO_VAR
,
REQUESTED_LPCM
);
case
REQUESTED_LPCM
:
input_SelectES
(
p_input
,
p_es
);
}
break
;
}
}
}
#endif
if
(
p_main
->
b_stats
)
{
input_DumpStream
(
p_input
);
...
...
src/input/mpeg_system.c
View file @
f9a96b8e
...
...
@@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: mpeg_system.c,v 1.6
5 2001/11/28 15:08:06
massiot Exp $
* $Id: mpeg_system.c,v 1.6
6 2001/12/03 11:49:04
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
...
...
@@ -708,8 +708,10 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
i_type
=
MPEG2_VIDEO_ES
;
p_es
->
i_cat
=
VIDEO_ES
;
#ifdef AUTO_SPAWN
if
(
!
p_input
->
stream
.
b_seekable
)
if
(
p_main
->
b_video
)
{
input_SelectES
(
p_input
,
p_es
);
}
#endif
}
else
if
(
(
i_id
&
0xE0
)
==
0xC0
)
...
...
@@ -719,16 +721,18 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
b_audio
=
1
;
p_es
->
i_cat
=
AUDIO_ES
;
#ifdef AUTO_SPAWN
if
(
!
p_input
->
stream
.
b_seekable
)
if
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
==
(
p_es
->
i_id
&
0x1F
)
)
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
if
(
p_main
->
b_audio
)
{
case
0
:
main_PutIntVariable
(
INPUT_CHANNEL_VAR
,
REQUESTED_MPEG
);
case
REQUESTED_MPEG
:
input_SelectES
(
p_input
,
p_es
);
if
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
==
(
p_es
->
i_id
&
0x1F
)
)
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
{
case
0
:
main_PutIntVariable
(
INPUT_CHANNEL_VAR
,
REQUESTED_MPEG
);
case
REQUESTED_MPEG
:
input_SelectES
(
p_input
,
p_es
);
}
}
#endif
}
...
...
@@ -739,16 +743,18 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
b_audio
=
1
;
p_es
->
i_cat
=
AUDIO_ES
;
#ifdef AUTO_SPAWN
if
(
!
p_input
->
stream
.
b_seekable
)
if
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
==
((
p_es
->
i_id
&
0xF00
)
>>
8
)
)
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
if
(
p_main
->
b_audio
)
{
case
0
:
main_PutIntVariable
(
INPUT_CHANNEL_VAR
,
REQUESTED_AC3
);
case
REQUESTED_AC3
:
input_SelectES
(
p_input
,
p_es
);
if
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
==
((
p_es
->
i_id
&
0xF00
)
>>
8
)
)
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
{
case
0
:
main_PutIntVariable
(
INPUT_CHANNEL_VAR
,
REQUESTED_AC3
);
case
REQUESTED_AC3
:
input_SelectES
(
p_input
,
p_es
);
}
}
#endif
}
...
...
@@ -758,11 +764,13 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
i_type
=
DVD_SPU_ES
;
p_es
->
i_cat
=
SPU_ES
;
#ifdef AUTO_SPAWN
if
(
main_GetIntVariable
(
INPUT_SUBTITLE_VAR
,
-
1
)
==
((
p_es
->
i_id
&
0x1F00
)
>>
8
)
)
if
(
p_main
->
b_video
)
{
if
(
!
p_input
->
stream
.
b_seekable
)
if
(
main_GetIntVariable
(
INPUT_SUBTITLE_VAR
,
-
1
)
==
((
p_es
->
i_id
&
0x1F00
)
>>
8
)
)
{
input_SelectES
(
p_input
,
p_es
);
}
}
#endif
}
...
...
@@ -773,12 +781,30 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
b_audio
=
1
;
p_es
->
i_cat
=
AUDIO_ES
;
/* FIXME : write the decoder */
#ifdef AUTO_SPAWN
if
(
p_main
->
b_audio
)
{
if
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
==
((
p_es
->
i_id
&
0x1F00
)
>>
8
)
)
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
{
case
0
:
main_PutIntVariable
(
INPUT_CHANNEL_VAR
,
REQUESTED_LPCM
);
case
REQUESTED_LPCM
:
input_SelectES
(
p_input
,
p_es
);
}
}
#endif
}
else
{
p_es
->
i_type
=
UNKNOWN_ES
;
}
}
/* Inform the interface that the stream has changed */
p_input
->
stream
.
b_changed
=
1
;
}
}
/* stream.b_is_ok */
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
...
...
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