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
8fec59e1
Commit
8fec59e1
authored
Dec 03, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reversed my previous patch (too buggy).
parent
a0ae0628
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
49 deletions
+97
-49
plugins/mpeg/input_ps.c
plugins/mpeg/input_ps.c
+73
-2
src/input/mpeg_system.c
src/input/mpeg_system.c
+24
-47
No files found.
plugins/mpeg/input_ps.c
View file @
8fec59e1
...
@@ -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.4
0 2001/12/03 11:49:04
massiot Exp $
* $Id: input_ps.c,v 1.4
1 2001/12/03 17:55:45
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>
...
@@ -291,7 +291,78 @@ static void PSInit( input_thread_t * p_input )
...
@@ -291,7 +291,78 @@ static void PSInit( input_thread_t * p_input )
/* (The PSM decoder will care about spawning the decoders) */
/* (The PSM decoder will care about spawning the decoders) */
p_input
->
stream
.
pp_programs
[
0
]
->
b_is_ok
=
1
;
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
)
if
(
p_main
->
b_stats
)
{
{
input_DumpStream
(
p_input
);
input_DumpStream
(
p_input
);
...
...
src/input/mpeg_system.c
View file @
8fec59e1
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: mpeg_system.c,v 1.6
6 2001/12/03 11:49:04
massiot Exp $
* $Id: mpeg_system.c,v 1.6
7 2001/12/03 17:55:45
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
...
@@ -708,10 +708,8 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
...
@@ -708,10 +708,8 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
i_type
=
MPEG2_VIDEO_ES
;
p_es
->
i_type
=
MPEG2_VIDEO_ES
;
p_es
->
i_cat
=
VIDEO_ES
;
p_es
->
i_cat
=
VIDEO_ES
;
#ifdef AUTO_SPAWN
#ifdef AUTO_SPAWN
if
(
p_main
->
b_video
)
if
(
!
p_input
->
stream
.
b_seekable
)
{
input_SelectES
(
p_input
,
p_es
);
input_SelectES
(
p_input
,
p_es
);
}
#endif
#endif
}
}
else
if
(
(
i_id
&
0xE0
)
==
0xC0
)
else
if
(
(
i_id
&
0xE0
)
==
0xC0
)
...
@@ -721,18 +719,16 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
...
@@ -721,18 +719,16 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
b_audio
=
1
;
p_es
->
b_audio
=
1
;
p_es
->
i_cat
=
AUDIO_ES
;
p_es
->
i_cat
=
AUDIO_ES
;
#ifdef AUTO_SPAWN
#ifdef AUTO_SPAWN
if
(
p_main
->
b_audio
)
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
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
case
0
:
==
(
p_es
->
i_id
&
0x1F
)
)
main_PutIntVariable
(
INPUT_CHANNEL_VAR
,
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
REQUESTED_MPEG
);
{
case
REQUESTED_MPEG
:
case
0
:
input_SelectES
(
p_input
,
p_es
);
main_PutIntVariable
(
INPUT_CHANNEL_VAR
,
REQUESTED_MPEG
);
case
REQUESTED_MPEG
:
input_SelectES
(
p_input
,
p_es
);
}
}
}
#endif
#endif
}
}
...
@@ -743,18 +739,16 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
...
@@ -743,18 +739,16 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
b_audio
=
1
;
p_es
->
b_audio
=
1
;
p_es
->
i_cat
=
AUDIO_ES
;
p_es
->
i_cat
=
AUDIO_ES
;
#ifdef AUTO_SPAWN
#ifdef AUTO_SPAWN
if
(
p_main
->
b_audio
)
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
(
main_GetIntVariable
(
INPUT_CHANNEL_VAR
,
0
)
case
0
:
==
((
p_es
->
i_id
&
0xF00
)
>>
8
)
)
main_PutIntVariable
(
INPUT_CHANNEL_VAR
,
switch
(
main_GetIntVariable
(
INPUT_AUDIO_VAR
,
0
)
)
REQUESTED_AC3
);
{
case
REQUESTED_AC3
:
case
0
:
input_SelectES
(
p_input
,
p_es
);
main_PutIntVariable
(
INPUT_CHANNEL_VAR
,
REQUESTED_AC3
);
case
REQUESTED_AC3
:
input_SelectES
(
p_input
,
p_es
);
}
}
}
#endif
#endif
}
}
...
@@ -764,13 +758,11 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
...
@@ -764,13 +758,11 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
i_type
=
DVD_SPU_ES
;
p_es
->
i_type
=
DVD_SPU_ES
;
p_es
->
i_cat
=
SPU_ES
;
p_es
->
i_cat
=
SPU_ES
;
#ifdef AUTO_SPAWN
#ifdef AUTO_SPAWN
if
(
p_main
->
b_video
)
if
(
main_GetIntVariable
(
INPUT_SUBTITLE_VAR
,
-
1
)
==
((
p_es
->
i_id
&
0x1F00
)
>>
8
)
)
{
{
if
(
main_GetIntVariable
(
INPUT_SUBTITLE_VAR
,
-
1
)
if
(
!
p_input
->
stream
.
b_seekable
)
==
((
p_es
->
i_id
&
0x1F00
)
>>
8
)
)
{
input_SelectES
(
p_input
,
p_es
);
input_SelectES
(
p_input
,
p_es
);
}
}
}
#endif
#endif
}
}
...
@@ -781,21 +773,6 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
...
@@ -781,21 +773,6 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es
->
b_audio
=
1
;
p_es
->
b_audio
=
1
;
p_es
->
i_cat
=
AUDIO_ES
;
p_es
->
i_cat
=
AUDIO_ES
;
/* FIXME : write the decoder */
/* 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
else
{
{
...
@@ -803,7 +780,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
...
@@ -803,7 +780,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
}
}
}
}
/*
Inform the interface that
the stream has changed */
/*
Tell the interface
the stream has changed */
p_input
->
stream
.
b_changed
=
1
;
p_input
->
stream
.
b_changed
=
1
;
}
}
}
/* stream.b_is_ok */
}
/* stream.b_is_ok */
...
...
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