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
18aaaf30
Commit
18aaaf30
authored
Jan 24, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Hooks for fast forward and slow motion support.
parent
b788332a
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
169 additions
and
109 deletions
+169
-109
Makefile.in
Makefile.in
+1
-0
include/input_ext-dec.h
include/input_ext-dec.h
+5
-3
include/input_ext-intf.h
include/input_ext-intf.h
+17
-9
include/stream_control.h
include/stream_control.h
+3
-2
src/input/input.c
src/input/input.c
+1
-3
src/input/input.h
src/input/input.h
+10
-1
src/input/input_clock.c
src/input/input_clock.c
+71
-0
src/input/input_programs.c
src/input/input_programs.c
+6
-7
src/input/mpeg_system.c
src/input/mpeg_system.c
+42
-71
src/video_decoder/video_parser.h
src/video_decoder/video_parser.h
+1
-5
src/video_decoder/vpar_headers.h
src/video_decoder/vpar_headers.h
+2
-1
src/video_parser/video_parser.c
src/video_parser/video_parser.c
+3
-1
src/video_parser/vpar_synchro.c
src/video_parser/vpar_synchro.c
+7
-6
No files found.
Makefile.in
View file @
18aaaf30
...
...
@@ -192,6 +192,7 @@ INPUT = src/input/input_ps.o \
src/input/input_dec.o
\
src/input/input_programs.o
\
src/input/input_netlist.o
\
src/input/input_clock.o
\
src/input/input.o
AUDIO_OUTPUT
=
src/audio_output/audio_output.o
...
...
include/input_ext-dec.h
View file @
18aaaf30
...
...
@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-dec.h,v 1.
19 2001/01/22 18:04:10
massiot Exp $
* $Id: input_ext-dec.h,v 1.
20 2001/01/24 19:05:55
massiot Exp $
*
* Authors:
*
...
...
@@ -59,8 +59,10 @@ typedef struct pes_packet_s
boolean_t
b_discontinuity
;
/* This packet doesn't follow the
* previous one */
mtime_t
i_pts
;
/* the PTS for this packet (zero if unset) */
mtime_t
i_dts
;
/* the DTS for this packet (zero if unset) */
mtime_t
i_pts
;
/* PTS for this packet (zero if unset) */
mtime_t
i_dts
;
/* DTS for this packet (zero if unset) */
int
i_rate
;
/* current pace of reading
* (see stream_control.h) */
int
i_pes_size
;
/* size of the current PES packet */
...
...
include/input_ext-intf.h
View file @
18aaaf30
...
...
@@ -4,7 +4,7 @@
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.
9 2001/01/14 07:08:00 stef
Exp $
* $Id: input_ext-intf.h,v 1.
10 2001/01/24 19:05:55 massiot
Exp $
*
* Authors:
*
...
...
@@ -47,6 +47,9 @@ typedef struct es_descriptor_s
u16
i_id
;
/* stream ID for PS, PID for TS */
u8
i_stream_id
;
/* stream ID defined in the PES */
u8
i_type
;
/* stream type */
boolean_t
b_audio
;
/* is the stream an audio stream that
* will need to be discarded with
* fast forward and slow motion ? */
/* Demultiplexer information */
void
*
p_demux_data
;
...
...
@@ -85,7 +88,7 @@ typedef struct es_descriptor_s
/* These ones might violate the norm : */
#define DVD_SPU_ES 0x82
#define LPCM_AUDIO_ES 0x83
#define UNKNOWN_ES 0xFF
#define UNKNOWN_ES
0xFF
/*****************************************************************************
* pgrm_descriptor_t
...
...
@@ -105,9 +108,8 @@ typedef struct pgrm_descriptor_s
char
*
psz_srv_name
;
/* Synchronization information */
/* system_date = PTS_date + delta_cr + delta_absolute */
mtime_t
delta_cr
;
mtime_t
delta_absolute
;
mtime_t
cr_ref
,
sysdate_ref
;
mtime_t
last_cr
;
count_t
c_average_count
;
/* counter used to compute dynamic average values */
...
...
@@ -127,9 +129,8 @@ typedef struct pgrm_descriptor_s
/* Synchro states */
#define SYNCHRO_OK 0
#define SYNCHRO_NOT_STARTED 1
#define SYNCHRO_START 2
#define SYNCHRO_REINIT 3
#define SYNCHRO_START 1
#define SYNCHRO_REINIT 2
/*****************************************************************************
* stream_descriptor_t
...
...
@@ -147,8 +148,15 @@ typedef struct stream_descriptor_s
boolean_t
b_pace_control
;
/* can we read when we want ? */
boolean_t
b_seekable
;
/* can we do lseek() ? */
/* if (b_seekable) : */
off_t
i_size
;
/* total size of the file (in bytes) */
off_t
i_tell
;
/* actual location in the file (in bytes) */
off_t
i_size
;
/* total size of the file
* (in arbitrary units) */
off_t
i_tell
;
/* actual location in the file
* (in arbitrary units) */
off_t
i_seek
;
/* next requested location (changed
* by the interface thread */
/* New status and rate requested by the interface */
int
i_new_status
,
i_new_rate
;
/* Demultiplexer data */
void
*
p_demux_data
;
...
...
include/stream_control.h
View file @
18aaaf30
...
...
@@ -12,8 +12,6 @@ typedef struct stream_ctrl_s
int
i_status
;
/* if i_status == FORWARD_S or BACKWARD_S */
int
i_rate
;
s64
i_ref_sysdate
;
s64
i_ref_clock
;
boolean_t
b_mute
;
boolean_t
b_bw
;
/* black & white */
...
...
@@ -24,5 +22,8 @@ typedef struct stream_ctrl_s
#define PAUSE_S 1
#define FORWARD_S 2
#define BACKWARD_S 3
#define REWIND_S 4
/* Not supported for the moment */
#define NOT_STARTED_S 10
#define START_S 11
#define DEFAULT_RATE 1000
src/input/input.c
View file @
18aaaf30
...
...
@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.7
2 2001/01/20 20:59:44 stef
Exp $
* $Id: input.c,v 1.7
3 2001/01/24 19:05:55 massiot
Exp $
*
* Authors:
*
...
...
@@ -103,8 +103,6 @@ input_thread_t *input_CreateThread ( input_config_t * p_config, int *pi_status )
/* Initialize stream control properties. */
p_input
->
stream
.
control
.
i_status
=
PLAYING_S
;
p_input
->
stream
.
control
.
i_rate
=
DEFAULT_RATE
;
p_input
->
stream
.
control
.
i_ref_sysdate
=
0
;
p_input
->
stream
.
control
.
i_ref_clock
=
0
;
p_input
->
stream
.
control
.
b_mute
=
0
;
p_input
->
stream
.
control
.
b_bw
=
0
;
...
...
src/input/input.h
View file @
18aaaf30
...
...
@@ -2,7 +2,7 @@
* input.h: structures of the input not exported to other modules
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input.h,v 1.1
1 2001/01/18 17:40:06
massiot Exp $
* $Id: input.h,v 1.1
2 2001/01/24 19:05:55
massiot Exp $
*
* Authors:
*
...
...
@@ -100,6 +100,14 @@ vlc_thread_t input_RunDecoder( struct decoder_capabilities_s *, void * );
void
input_EndDecoder
(
struct
input_thread_s
*
,
struct
es_descriptor_s
*
);
void
input_DecodePES
(
struct
decoder_fifo_s
*
,
struct
pes_packet_s
*
);
/*****************************************************************************
* Prototypes from input_clock.c
*****************************************************************************/
mtime_t
input_ClockToSysdate
(
struct
input_thread_s
*
,
struct
pgrm_descriptor_s
*
,
mtime_t
);
void
input_ClockNewRef
(
struct
input_thread_s
*
,
struct
pgrm_descriptor_s
*
,
mtime_t
);
/*****************************************************************************
* Create a NULL packet for padding in case of a data loss
*****************************************************************************/
...
...
@@ -138,6 +146,7 @@ static __inline__ void input_NullPacket( input_thread_t * p_input,
return
;
}
p_pes
->
i_rate
=
p_input
->
stream
.
control
.
i_rate
;
p_pes
->
p_first
=
p_pad_data
;
p_pes
->
b_messed_up
=
p_pes
->
b_discontinuity
=
1
;
input_DecodePES
(
p_es
->
p_decoder_fifo
,
p_pes
);
...
...
src/input/input_clock.c
0 → 100644
View file @
18aaaf30
/*****************************************************************************
* input_clock.c: Clock/System date conversions, stream management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_clock.c,v 1.1 2001/01/24 19:05:55 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "intf_msg.h"
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
#include "input.h"
/*****************************************************************************
* input_ClockToSysdate: converts a movie clock to system date
*****************************************************************************/
mtime_t
input_ClockToSysdate
(
input_thread_t
*
p_input
,
pgrm_descriptor_t
*
p_pgrm
,
mtime_t
i_clock
)
{
mtime_t
i_sysdate
=
0
;
if
(
p_pgrm
->
i_synchro_state
==
SYNCHRO_OK
)
{
i_sysdate
=
(
i_clock
-
p_pgrm
->
cr_ref
)
*
p_input
->
stream
.
control
.
i_rate
*
300
/
27
/
DEFAULT_RATE
+
p_pgrm
->
sysdate_ref
;
}
return
(
i_sysdate
);
}
/*****************************************************************************
* input_ClockNewRef: writes a new clock reference
*****************************************************************************/
void
input_ClockNewRef
(
input_thread_t
*
p_input
,
pgrm_descriptor_t
*
p_pgrm
,
mtime_t
i_clock
)
{
p_pgrm
->
cr_ref
=
i_clock
;
p_pgrm
->
sysdate_ref
=
mdate
();
}
src/input/input_programs.c
View file @
18aaaf30
...
...
@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_programs.c,v 1.2
6 2001/01/18 05:13:22 sam
Exp $
* $Id: input_programs.c,v 1.2
7 2001/01/24 19:05:55 massiot
Exp $
*
* Authors:
*
...
...
@@ -148,11 +148,12 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input,
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
pp_es
=
NULL
;
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
delta_cr
=
0
;
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
delta_absolute
=
0
;
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
cr_ref
=
0
;
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
sysdate_ref
=
0
;
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
last_cr
=
0
;
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
c_average_count
=
0
;
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
i_synchro_state
=
SYNCHRO_
NOT_STARTED
;
=
SYNCHRO_
START
;
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
b_discontinuity
=
0
;
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
p_vout
...
...
@@ -277,12 +278,13 @@ es_descriptor_t * input_AddES( input_thread_t * p_input,
return
(
NULL
);
}
p_input
->
stream
.
pp_es
[
p_input
->
stream
.
i_es_number
-
1
]
=
p_es
;
p_es
->
i_id
=
i_es_id
;
/* Init its values */
p_es
->
i_id
=
i_es_id
;
p_es
->
b_discontinuity
=
0
;
p_es
->
p_pes
=
NULL
;
p_es
->
p_decoder_fifo
=
NULL
;
p_es
->
b_audio
=
0
;
if
(
i_data_len
)
{
...
...
@@ -412,9 +414,6 @@ void input_DumpStream( input_thread_t * p_input )
intf_Msg
(
"input info: Dumping program 0x%x, version %d (%s)"
,
P
->
i_number
,
P
->
i_version
,
P
->
b_is_ok
?
"complete"
:
"partial"
);
if
(
P
->
i_synchro_state
==
SYNCHRO_OK
)
intf_Msg
(
"input info: synchro absolute delta : %lld (jitter : %lld)"
,
P
->
delta_absolute
,
P
->
delta_cr
);
#undef P
for
(
j
=
0
;
j
<
p_input
->
stream
.
pp_programs
[
i
]
->
i_es_number
;
j
++
)
{
...
...
src/input/mpeg_system.c
View file @
18aaaf30
This diff is collapsed.
Click to expand it.
src/video_decoder/video_parser.h
View file @
18aaaf30
...
...
@@ -2,7 +2,7 @@
* video_parser.h : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_parser.h,v 1.
7 2001/01/21 01:36:2
5 massiot Exp $
* $Id: video_parser.h,v 1.
8 2001/01/24 19:05:5
5 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -114,10 +114,6 @@ typedef struct vpar_thread_s
video_synchro_t
synchro
;
/* Lookup tables */
#ifdef MPEG2_COMPLIANT
s16
pi_crop_buf
[
8192
];
s16
*
pi_crop
;
#endif
lookup_t
pl_mb_addr_inc
[
2048
];
/* for macroblock
address increment */
/* tables for macroblock types 0=P 1=B */
...
...
src/video_decoder/vpar_headers.h
View file @
18aaaf30
...
...
@@ -2,7 +2,7 @@
* vpar_headers.h : video parser : headers parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_headers.h,v 1.
4 2001/01/17 18:17:30
massiot Exp $
* $Id: vpar_headers.h,v 1.
5 2001/01/24 19:05:55
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -83,6 +83,7 @@ typedef struct sequence_s
picture_t
*
p_forward
;
/* current forward reference frame */
picture_t
*
p_backward
;
/* current backward reference frame */
mtime_t
next_pts
,
next_dts
;
int
i_current_rate
;
/* Copyright extension */
boolean_t
b_copyright_flag
;
/* Whether the following
...
...
src/video_parser/video_parser.c
View file @
18aaaf30
...
...
@@ -2,7 +2,7 @@
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_parser.c,v 1.
69 2001/01/18 05:13:23 sam
Exp $
* $Id: video_parser.c,v 1.
70 2001/01/24 19:05:55 massiot
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
...
...
@@ -528,5 +528,7 @@ static void BitstreamCallback ( bit_stream_t * p_bit_stream,
DECODER_FIFO_START
(
*
p_bit_stream
->
p_decoder_fifo
)
->
i_pts
;
p_vpar
->
sequence
.
next_dts
=
DECODER_FIFO_START
(
*
p_bit_stream
->
p_decoder_fifo
)
->
i_dts
;
p_vpar
->
sequence
.
i_current_rate
=
DECODER_FIFO_START
(
*
p_bit_stream
->
p_decoder_fifo
)
->
i_rate
;
}
}
src/video_parser/vpar_synchro.c
View file @
18aaaf30
...
...
@@ -2,7 +2,7 @@
* vpar_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_synchro.c,v 1.
79 2001/01/18 17:40:06
massiot Exp $
* $Id: vpar_synchro.c,v 1.
80 2001/01/24 19:05:55
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
...
...
@@ -41,8 +41,6 @@
* Please bear in mind that B's and IP's will be inverted when displaying
* (decoding order != presentation order). Thus, t1 < t0.
*
* FIXME: write a few words about stream structure changes.
*
* 2. Definitions
* ===========
* t[0..12] : Presentation timestamps of pictures 0..12.
...
...
@@ -230,7 +228,8 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
#endif
now
=
mdate
();
period
=
1000000
*
1001
/
p_vpar
->
sequence
.
i_frame_rate
;
period
=
1000000
*
1001
/
p_vpar
->
sequence
.
i_frame_rate
*
p_vpar
->
sequence
.
i_current_rate
/
DEFAULT_RATE
;
vlc_mutex_lock
(
&
p_vpar
->
p_vout
->
change_lock
);
tau_yuv
=
p_vpar
->
p_vout
->
render_time
;
...
...
@@ -265,7 +264,8 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
b_decode
=
(
pts
-
now
)
>
(
TAU_PRIME
(
I_CODING_TYPE
)
+
DELTA
);
}
if
(
!
b_decode
)
intf_WarnMsg
(
3
,
"vpar synchro warning: trashing I"
);
intf_WarnMsg
(
3
,
"vpar synchro warning: trashing I (%lld)"
,
pts
-
now
);
break
;
case
P_CODING_TYPE
:
...
...
@@ -422,7 +422,8 @@ mtime_t vpar_SynchroDate( vpar_thread_t * p_vpar )
void
vpar_SynchroNewPicture
(
vpar_thread_t
*
p_vpar
,
int
i_coding_type
,
int
i_repeat_field
)
{
mtime_t
period
=
1000000
*
1001
/
p_vpar
->
sequence
.
i_frame_rate
;
mtime_t
period
=
1000000
*
1001
/
p_vpar
->
sequence
.
i_frame_rate
*
p_vpar
->
sequence
.
i_current_rate
/
DEFAULT_RATE
;
switch
(
i_coding_type
)
{
...
...
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