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
785049d7
Commit
785049d7
authored
Feb 08, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Implemented basic stream navigation function, and bound Jump forward
and jump Backward in the SDL intf. Enjoy !
parent
66f7daf3
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
178 additions
and
80 deletions
+178
-80
include/input.h
include/input.h
+8
-6
include/input_ext-dec.h
include/input_ext-dec.h
+3
-2
include/input_ext-intf.h
include/input_ext-intf.h
+4
-3
include/modules.h
include/modules.h
+1
-1
include/stream_control.h
include/stream_control.h
+25
-0
plugins/mpeg/input_ps.c
plugins/mpeg/input_ps.c
+19
-4
plugins/sdl/intf_sdl.c
plugins/sdl/intf_sdl.c
+16
-1
src/input/input.c
src/input/input.c
+22
-8
src/input/input_clock.c
src/input/input_clock.c
+9
-47
src/input/input_dec.c
src/input/input_dec.c
+47
-2
src/input/input_ext-dec.c
src/input/input_ext-dec.c
+1
-1
src/input/input_ext-intf.c
src/input/input_ext-intf.c
+16
-1
src/input/input_programs.c
src/input/input_programs.c
+2
-2
src/input/mpeg_system.c
src/input/mpeg_system.c
+5
-2
No files found.
include/input.h
View file @
785049d7
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
* input.h: structures of the input not exported to other modules
* input.h: structures of the input not exported to other modules
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input.h,v 1.2
6 2001/02/08 04:43:27 sam
Exp $
* $Id: input.h,v 1.2
7 2001/02/08 13:52:34 massiot
Exp $
*
*
* Authors:
* Authors:
Christophe Massiot <massiot@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
* packets. Have a nice day and merry Xmas. */
* packets. Have a nice day and merry Xmas. */
#define PADDING_PACKET_SIZE 188
/* Size of the NULL packet inserted in case
#define PADDING_PACKET_SIZE 188
/* Size of the NULL packet inserted in case
* of data loss (this should be < 188). */
* of data loss (this should be < 188). */
#define PADDING_PACKET_NUMBER 10
/* Number of padding packets top insert to
* escape a decoder. */
/*****************************************************************************
/*****************************************************************************
* Prototypes from input_ext-dec.c
* Prototypes from input_ext-dec.c
...
@@ -69,14 +71,14 @@ int input_SelectES ( struct input_thread_s *, struct es_descriptor_s * );
...
@@ -69,14 +71,14 @@ int input_SelectES ( struct input_thread_s *, struct es_descriptor_s * );
vlc_thread_t
input_RunDecoder
(
struct
decoder_capabilities_s
*
,
void
*
);
vlc_thread_t
input_RunDecoder
(
struct
decoder_capabilities_s
*
,
void
*
);
void
input_EndDecoder
(
struct
input_thread_s
*
,
struct
es_descriptor_s
*
);
void
input_EndDecoder
(
struct
input_thread_s
*
,
struct
es_descriptor_s
*
);
void
input_DecodePES
(
struct
decoder_fifo_s
*
,
struct
pes_packet_s
*
);
void
input_DecodePES
(
struct
decoder_fifo_s
*
,
struct
pes_packet_s
*
);
void
input_EscapeDiscontinuity
(
struct
input_thread_s
*
,
struct
pgrm_descriptor_s
*
);
void
input_EscapeAudioDiscontinuity
(
struct
input_thread_s
*
,
struct
pgrm_descriptor_s
*
);
/*****************************************************************************
/*****************************************************************************
* Prototypes from input_clock.c
* Prototypes from input_clock.c
*****************************************************************************/
*****************************************************************************/
void
input_ClockNewRef
(
struct
input_thread_s
*
,
struct
pgrm_descriptor_s
*
,
mtime_t
,
mtime_t
);
void
input_EscapeDiscontinuity
(
struct
input_thread_s
*
,
struct
pgrm_descriptor_s
*
);
void
input_ClockInit
(
struct
pgrm_descriptor_s
*
);
void
input_ClockInit
(
struct
pgrm_descriptor_s
*
);
void
input_ClockManageRef
(
struct
input_thread_s
*
,
void
input_ClockManageRef
(
struct
input_thread_s
*
,
struct
pgrm_descriptor_s
*
,
mtime_t
);
struct
pgrm_descriptor_s
*
,
mtime_t
);
...
...
include/input_ext-dec.h
View file @
785049d7
...
@@ -2,9 +2,10 @@
...
@@ -2,9 +2,10 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-dec.h,v 1.2
0 2001/01/24 19:05:55
massiot Exp $
* $Id: input_ext-dec.h,v 1.2
1 2001/02/08 13:52:34
massiot Exp $
*
*
* Authors:
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
...
include/input_ext-intf.h
View file @
785049d7
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
* control the pace of reading.
* control the pace of reading.
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.1
6 2001/02/08 13:08:02
massiot Exp $
* $Id: input_ext-intf.h,v 1.1
7 2001/02/08 13:52:34
massiot Exp $
*
*
* Authors:
* Authors:
Christophe Massiot <massiot@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -241,7 +241,7 @@ typedef struct input_thread_s
...
@@ -241,7 +241,7 @@ typedef struct input_thread_s
int
(
*
pf_rewind
)(
struct
input_thread_s
*
);
int
(
*
pf_rewind
)(
struct
input_thread_s
*
);
/* NULL if we don't support going *
/* NULL if we don't support going *
* backwards (it's gonna be fun) */
* backwards (it's gonna be fun) */
int
(
*
pf_seek
)(
struct
input_thread_s
*
,
off_t
);
void
(
*
pf_seek
)(
struct
input_thread_s
*
,
off_t
);
i_p_config_t
i_p_config
;
/* plugin configuration */
i_p_config_t
i_p_config
;
/* plugin configuration */
char
*
p_source
;
char
*
p_source
;
...
@@ -305,3 +305,4 @@ void input_DestroyThread( struct input_thread_s *, int *pi_status );
...
@@ -305,3 +305,4 @@ void input_DestroyThread( struct input_thread_s *, int *pi_status );
void
input_Play
(
struct
input_thread_s
*
);
void
input_Play
(
struct
input_thread_s
*
);
void
input_Pause
(
struct
input_thread_s
*
);
void
input_Pause
(
struct
input_thread_s
*
);
void
input_Forward
(
struct
input_thread_s
*
,
int
);
void
input_Forward
(
struct
input_thread_s
*
,
int
);
void
input_Seek
(
struct
input_thread_s
*
,
off_t
);
include/modules.h
View file @
785049d7
...
@@ -85,7 +85,7 @@ typedef struct function_list_s
...
@@ -85,7 +85,7 @@ typedef struct function_list_s
void
(
*
pf_delete_pes
)
(
void
*
,
struct
pes_packet_s
*
);
void
(
*
pf_delete_pes
)
(
void
*
,
struct
pes_packet_s
*
);
int
(
*
pf_rewind
)
(
struct
input_thread_s
*
);
int
(
*
pf_rewind
)
(
struct
input_thread_s
*
);
int
(
*
pf_seek
)
(
struct
input_thread_s
*
,
off_t
);
void
(
*
pf_seek
)
(
struct
input_thread_s
*
,
off_t
);
}
input
;
}
input
;
/* Audio output plugin */
/* Audio output plugin */
...
...
include/stream_control.h
View file @
785049d7
/*****************************************************************************
* stream_control.h: structures of the input exported verywhere
* This header provides a structure so that everybody knows the state
* of the reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: stream_control.h,v 1.5 2001/02/08 13:52:34 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
* 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.
*****************************************************************************/
/* Structures exported to interface, input and decoders */
/* Structures exported to interface, input and decoders */
/*****************************************************************************
/*****************************************************************************
...
...
plugins/mpeg/input_ps.c
View file @
785049d7
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
* input_ps.c: PS demux and packet management
* input_ps.c: PS demux and packet management
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ps.c,v 1.
2 2001/02/08 07:24:25 sam
Exp $
* $Id: input_ps.c,v 1.
3 2001/02/08 13:52:35 massiot
Exp $
*
*
* Authors:
* Authors:
Christophe Massiot <massiot@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -61,7 +61,8 @@ static int PSRead ( struct input_thread_s *,
...
@@ -61,7 +61,8 @@ static int PSRead ( struct input_thread_s *,
data_packet_t
*
p_packets
[
INPUT_READ_ONCE
]
);
data_packet_t
*
p_packets
[
INPUT_READ_ONCE
]
);
static
void
PSInit
(
struct
input_thread_s
*
);
static
void
PSInit
(
struct
input_thread_s
*
);
static
void
PSEnd
(
struct
input_thread_s
*
);
static
void
PSEnd
(
struct
input_thread_s
*
);
static
struct
pes_packet_s
*
NewPES
(
void
*
p_garbage
);
static
void
PSSeek
(
struct
input_thread_s
*
,
off_t
);
static
struct
pes_packet_s
*
NewPES
(
void
*
);
static
struct
data_packet_s
*
NewPacket
(
void
*
,
size_t
);
static
struct
data_packet_s
*
NewPacket
(
void
*
,
size_t
);
static
void
DeletePacket
(
void
*
,
struct
data_packet_s
*
);
static
void
DeletePacket
(
void
*
,
struct
data_packet_s
*
);
static
void
DeletePES
(
void
*
,
struct
pes_packet_s
*
);
static
void
DeletePES
(
void
*
,
struct
pes_packet_s
*
);
...
@@ -85,7 +86,7 @@ void input_getfunctions( function_list_t * p_function_list )
...
@@ -85,7 +86,7 @@ void input_getfunctions( function_list_t * p_function_list )
input
.
pf_delete_packet
=
DeletePacket
;
input
.
pf_delete_packet
=
DeletePacket
;
input
.
pf_delete_pes
=
DeletePES
;
input
.
pf_delete_pes
=
DeletePES
;
input
.
pf_rewind
=
NULL
;
input
.
pf_rewind
=
NULL
;
input
.
pf_seek
=
NULL
;
input
.
pf_seek
=
PSSeek
;
#undef input
#undef input
}
}
...
@@ -428,6 +429,20 @@ static int PSRead( input_thread_t * p_input,
...
@@ -428,6 +429,20 @@ static int PSRead( input_thread_t * p_input,
return
(
0
);
return
(
0
);
}
}
/*****************************************************************************
* PSSeek: changes the stream position indicator
*****************************************************************************/
static
void
PSSeek
(
input_thread_t
*
p_input
,
off_t
i_position
)
{
thread_ps_data_t
*
p_method
;
p_method
=
(
thread_ps_data_t
*
)
p_input
->
p_plugin_data
;
/* A little bourrin but should work for a while --Meuuh */
fseek
(
p_method
->
stream
,
i_position
,
SEEK_SET
);
p_input
->
stream
.
i_tell
=
i_position
;
}
/*
/*
* Packet management utilities
* Packet management utilities
...
...
plugins/sdl/intf_sdl.c
View file @
785049d7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* intf_sdl.c: SDL interface plugin
* intf_sdl.c: SDL interface plugin
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_sdl.c,v 1.3
1 2001/02/08 13:08:02
massiot Exp $
* $Id: intf_sdl.c,v 1.3
2 2001/02/08 13:52:35
massiot Exp $
*
*
* Authors:
* Authors:
*
*
...
@@ -174,6 +174,21 @@ void intf_SDLManage( intf_thread_t *p_intf )
...
@@ -174,6 +174,21 @@ void intf_SDLManage( intf_thread_t *p_intf )
}
}
break
;
break
;
case
SDLK_j
:
/* Jump forwards */
input_Seek
(
p_intf
->
p_input
,
p_intf
->
p_input
->
stream
.
i_tell
+
p_intf
->
p_input
->
stream
.
i_size
/
20
);
/* gabuzomeu */
break
;
case
SDLK_b
:
/* Jump backwards */
input_Seek
(
p_intf
->
p_input
,
p_intf
->
p_input
->
stream
.
i_tell
-
p_intf
->
p_input
->
stream
.
i_size
/
20
);
break
;
default:
default:
if
(
intf_ProcessKey
(
p_intf
,
(
char
)
i_key
)
)
if
(
intf_ProcessKey
(
p_intf
,
(
char
)
i_key
)
)
{
{
...
...
src/input/input.c
View file @
785049d7
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
* decoders.
* decoders.
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.7
7 2001/02/08 13:08:02
massiot Exp $
* $Id: input.c,v 1.7
8 2001/02/08 13:52:35
massiot Exp $
*
*
* Authors:
* Authors:
Christophe Massiot <massiot@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -197,14 +197,28 @@ static void RunThread( input_thread_t *p_input )
...
@@ -197,14 +197,28 @@ static void RunThread( input_thread_t *p_input )
p_input
->
c_loops
++
;
p_input
->
c_loops
++
;
#endif
#endif
vlc_mutex_lock
(
&
p_input
->
stream
.
control
.
control_lock
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
if
(
p_input
->
stream
.
control
.
i_status
==
BACKWARD_S
if
(
p_input
->
stream
.
i_seek
)
&&
p_input
->
pf_rewind
!=
NULL
)
{
if
(
p_input
->
stream
.
b_seekable
&&
p_input
->
pf_seek
!=
NULL
)
{
p_input
->
pf_seek
(
p_input
,
p_input
->
stream
.
i_seek
);
for
(
i
=
0
;
i
<
p_input
->
stream
.
i_pgrm_number
;
i
++
)
{
{
p_input
->
pf_rewind
(
p_input
);
pgrm_descriptor_t
*
p_pgrm
/* FIXME: probably don't do it every loop, but when ? */
=
p_input
->
stream
.
pp_programs
[
i
];
/* Escape all decoders for the stream discontinuity they
* will encounter. */
input_EscapeDiscontinuity
(
p_input
,
p_pgrm
);
/* Reinitialize synchro. */
p_pgrm
->
i_synchro_state
=
SYNCHRO_REINIT
;
}
}
vlc_mutex_unlock
(
&
p_input
->
stream
.
control
.
control_lock
);
}
p_input
->
stream
.
i_seek
=
0
;
}
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
i_error
=
p_input
->
pf_read
(
p_input
,
pp_packets
);
i_error
=
p_input
->
pf_read
(
p_input
,
pp_packets
);
...
...
src/input/input_clock.c
View file @
785049d7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* input_clock.c: Clock/System date convertions, stream management
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_clock.c,v 1.
5 2001/02/08 13:08:03
massiot Exp $
* $Id: input_clock.c,v 1.
6 2001/02/08 13:52:35
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -114,9 +114,9 @@ static mtime_t ClockCurrent( input_thread_t * p_input,
...
@@ -114,9 +114,9 @@ static mtime_t ClockCurrent( input_thread_t * p_input,
}
}
/*****************************************************************************
/*****************************************************************************
*
input_
ClockNewRef: writes a new clock reference
* ClockNewRef: writes a new clock reference
*****************************************************************************/
*****************************************************************************/
void
input_
ClockNewRef
(
input_thread_t
*
p_input
,
pgrm_descriptor_t
*
p_pgrm
,
static
void
ClockNewRef
(
input_thread_t
*
p_input
,
pgrm_descriptor_t
*
p_pgrm
,
mtime_t
i_clock
,
mtime_t
i_sysdate
)
mtime_t
i_clock
,
mtime_t
i_sysdate
)
{
{
intf_WarnMsg
(
1
,
"Old ref: %lld/%lld, New ref: %lld/%lld"
,
p_pgrm
->
cr_ref
,
intf_WarnMsg
(
1
,
"Old ref: %lld/%lld, New ref: %lld/%lld"
,
p_pgrm
->
cr_ref
,
...
@@ -125,44 +125,6 @@ void input_ClockNewRef( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm,
...
@@ -125,44 +125,6 @@ void input_ClockNewRef( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm,
p_pgrm
->
sysdate_ref
=
i_sysdate
;
p_pgrm
->
sysdate_ref
=
i_sysdate
;
}
}
/*****************************************************************************
* EscapeDiscontinuity: send a NULL packet to the decoders
*****************************************************************************/
static
void
EscapeDiscontinuity
(
input_thread_t
*
p_input
,
pgrm_descriptor_t
*
p_pgrm
)
{
int
i_es
;
for
(
i_es
=
0
;
i_es
<
p_pgrm
->
i_es_number
;
i_es
++
)
{
es_descriptor_t
*
p_es
=
p_pgrm
->
pp_es
[
i_es
];
if
(
p_es
->
p_decoder_fifo
!=
NULL
)
{
input_NullPacket
(
p_input
,
p_es
);
}
}
}
/*****************************************************************************
* EscapeAudioDiscontinuity: send a NULL packet to the audio decoders
*****************************************************************************/
static
void
EscapeAudioDiscontinuity
(
input_thread_t
*
p_input
,
pgrm_descriptor_t
*
p_pgrm
)
{
int
i_es
;
for
(
i_es
=
0
;
i_es
<
p_pgrm
->
i_es_number
;
i_es
++
)
{
es_descriptor_t
*
p_es
=
p_pgrm
->
pp_es
[
i_es
];
if
(
p_es
->
p_decoder_fifo
!=
NULL
&&
p_es
->
b_audio
)
{
input_NullPacket
(
p_input
,
p_es
);
}
}
}
/*****************************************************************************
/*****************************************************************************
* input_ClockInit: reinitializes the clock reference after a stream
* input_ClockInit: reinitializes the clock reference after a stream
* discontinuity
* discontinuity
...
@@ -185,7 +147,7 @@ void input_ClockManageRef( input_thread_t * p_input,
...
@@ -185,7 +147,7 @@ void input_ClockManageRef( input_thread_t * p_input,
if
(
p_pgrm
->
i_synchro_state
!=
SYNCHRO_OK
)
if
(
p_pgrm
->
i_synchro_state
!=
SYNCHRO_OK
)
{
{
/* Feed synchro with a new reference point. */
/* Feed synchro with a new reference point. */
input_
ClockNewRef
(
p_input
,
p_pgrm
,
i_clock
,
mdate
()
);
ClockNewRef
(
p_input
,
p_pgrm
,
i_clock
,
mdate
()
);
p_pgrm
->
i_synchro_state
=
SYNCHRO_OK
;
p_pgrm
->
i_synchro_state
=
SYNCHRO_OK
;
}
}
else
else
...
@@ -200,7 +162,7 @@ void input_ClockManageRef( input_thread_t * p_input,
...
@@ -200,7 +162,7 @@ void input_ClockManageRef( input_thread_t * p_input,
intf_WarnMsg
(
3
,
"Clock gap, unexpected stream discontinuity"
);
intf_WarnMsg
(
3
,
"Clock gap, unexpected stream discontinuity"
);
input_ClockInit
(
p_pgrm
);
input_ClockInit
(
p_pgrm
);
p_pgrm
->
i_synchro_state
=
SYNCHRO_START
;
p_pgrm
->
i_synchro_state
=
SYNCHRO_START
;
EscapeDiscontinuity
(
p_input
,
p_pgrm
);
input_
EscapeDiscontinuity
(
p_input
,
p_pgrm
);
}
}
p_pgrm
->
last_cr
=
i_clock
;
p_pgrm
->
last_cr
=
i_clock
;
...
@@ -221,11 +183,11 @@ void input_ClockManageRef( input_thread_t * p_input,
...
@@ -221,11 +183,11 @@ void input_ClockManageRef( input_thread_t * p_input,
{
{
vlc_cond_wait
(
&
p_input
->
stream
.
stream_wait
,
vlc_cond_wait
(
&
p_input
->
stream
.
stream_wait
,
&
p_input
->
stream
.
stream_lock
);
&
p_input
->
stream
.
stream_lock
);
input_
ClockNewRef
(
p_input
,
p_pgrm
,
i_clock
,
mdate
()
);
ClockNewRef
(
p_input
,
p_pgrm
,
i_clock
,
mdate
()
);
}
}
else
else
{
{
input_
ClockNewRef
(
p_input
,
p_pgrm
,
i_clock
,
ClockNewRef
(
p_input
,
p_pgrm
,
i_clock
,
ClockToSysdate
(
p_input
,
p_pgrm
,
i_clock
)
);
ClockToSysdate
(
p_input
,
p_pgrm
,
i_clock
)
);
}
}
...
@@ -240,7 +202,7 @@ void input_ClockManageRef( input_thread_t * p_input,
...
@@ -240,7 +202,7 @@ void input_ClockManageRef( input_thread_t * p_input,
/* Feed the audio decoders with a NULL packet to avoid
/* Feed the audio decoders with a NULL packet to avoid
* discontinuities. */
* discontinuities. */
EscapeAudioDiscontinuity
(
p_input
,
p_pgrm
);
input_
EscapeAudioDiscontinuity
(
p_input
,
p_pgrm
);
}
}
else
else
{
{
...
...
src/input/input_dec.c
View file @
785049d7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders
* input_dec.c: Functions for the management of decoders
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_dec.c,v 1.
7 2001/01/15 06:18:23 sam
Exp $
* $Id: input_dec.c,v 1.
8 2001/02/08 13:52:35 massiot
Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -59,7 +59,7 @@ void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
...
@@ -59,7 +59,7 @@ void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
/* Make sure the thread leaves the NextDataPacket() function by
/* Make sure the thread leaves the NextDataPacket() function by
* sending it a few null packets. */
* sending it a few null packets. */
for
(
i_dummy
=
0
;
i_dummy
<
10
;
i_dummy
++
)
for
(
i_dummy
=
0
;
i_dummy
<
PADDING_PACKET_NUMBER
;
i_dummy
++
)
{
{
input_NullPacket
(
p_input
,
p_es
);
input_NullPacket
(
p_input
,
p_es
);
}
}
...
@@ -115,3 +115,48 @@ void input_DecodePES( decoder_fifo_t * p_decoder_fifo, pes_packet_t * p_pes )
...
@@ -115,3 +115,48 @@ void input_DecodePES( decoder_fifo_t * p_decoder_fifo, pes_packet_t * p_pes )
}
}
vlc_mutex_unlock
(
&
p_decoder_fifo
->
data_lock
);
vlc_mutex_unlock
(
&
p_decoder_fifo
->
data_lock
);
}
}
/*****************************************************************************
* input_EscapeDiscontinuity: send a NULL packet to the decoders
*****************************************************************************/
void
input_EscapeDiscontinuity
(
input_thread_t
*
p_input
,
pgrm_descriptor_t
*
p_pgrm
)
{
int
i_es
,
i
;
for
(
i_es
=
0
;
i_es
<
p_pgrm
->
i_es_number
;
i_es
++
)
{
es_descriptor_t
*
p_es
=
p_pgrm
->
pp_es
[
i_es
];
if
(
p_es
->
p_decoder_fifo
!=
NULL
)
{
for
(
i
=
0
;
i
<
PADDING_PACKET_NUMBER
;
i
++
)
{
input_NullPacket
(
p_input
,
p_es
);
}
}
}
}
/*****************************************************************************
* input_EscapeAudioDiscontinuity: send a NULL packet to the audio decoders
*****************************************************************************/
void
input_EscapeAudioDiscontinuity
(
input_thread_t
*
p_input
,
pgrm_descriptor_t
*
p_pgrm
)
{
int
i_es
,
i
;
for
(
i_es
=
0
;
i_es
<
p_pgrm
->
i_es_number
;
i_es
++
)
{
es_descriptor_t
*
p_es
=
p_pgrm
->
pp_es
[
i_es
];
if
(
p_es
->
p_decoder_fifo
!=
NULL
&&
p_es
->
b_audio
)
{
for
(
i
=
0
;
i
<
PADDING_PACKET_NUMBER
;
i
++
)
{
input_NullPacket
(
p_input
,
p_es
);
}
}
}
}
src/input/input_ext-dec.c
View file @
785049d7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
*
*
* Authors:
* Authors:
Christophe Massiot <massiot@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
...
src/input/input_ext-intf.c
View file @
785049d7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
*
*
* Authors:
* Authors:
Christophe Massiot <massiot@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -84,8 +84,23 @@ void input_Forward( input_thread_t * p_input, int i_rate )
...
@@ -84,8 +84,23 @@ void input_Forward( input_thread_t * p_input, int i_rate )
*****************************************************************************/
*****************************************************************************/
void
input_Pause
(
input_thread_t
*
p_input
)
void
input_Pause
(
input_thread_t
*
p_input
)
{
{
intf_Msg
(
"input: paused"
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
p_input
->
stream
.
i_new_status
=
PAUSE_S
;
p_input
->
stream
.
i_new_status
=
PAUSE_S
;
vlc_cond_signal
(
&
p_input
->
stream
.
stream_wait
);
vlc_cond_signal
(
&
p_input
->
stream
.
stream_wait
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
}
/*****************************************************************************
* input_Seek: changes the stream postion
*****************************************************************************/
void
input_Seek
(
input_thread_t
*
p_input
,
off_t
i_position
)
{
intf_Msg
(
"input: seeking position %d/%d"
,
i_position
,
p_input
->
stream
.
i_size
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
p_input
->
stream
.
i_seek
=
i_position
;
vlc_cond_signal
(
&
p_input
->
stream
.
stream_wait
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
src/input/input_programs.c
View file @
785049d7
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_programs.c,v 1.
29 2001/02/08 04:43:28 sam
Exp $
* $Id: input_programs.c,v 1.
30 2001/02/08 13:52:35 massiot
Exp $
*
*
* Authors:
* Authors:
Christophe Massiot <massiot@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
...
src/input/mpeg_system.c
View file @
785049d7
...
@@ -2,9 +2,12 @@
...
@@ -2,9 +2,12 @@
* mpeg_system.c: TS, PS and PES management
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: mpeg_system.c,v 1.3
2 2001/02/08 04:43:28 sam
Exp $
* $Id: mpeg_system.c,v 1.3
3 2001/02/08 13:52:35 massiot
Exp $
*
*
* Authors:
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
* Benot Steiner <benny@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
...
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