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
7d38f3f9
Commit
7d38f3f9
authored
Feb 22, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Added functions and hooks to display dates instead of off_t.
parent
99bbcdcb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
41 deletions
+86
-41
include/input_ext-intf.h
include/input_ext-intf.h
+4
-2
src/input/input_clock.c
src/input/input_clock.c
+1
-3
src/input/input_ext-intf.c
src/input/input_ext-intf.c
+80
-2
src/input/input_programs.c
src/input/input_programs.c
+1
-34
No files found.
include/input_ext-intf.h
View file @
7d38f3f9
...
...
@@ -4,7 +4,7 @@
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.2
5 2001/02/22 16:17:12
massiot Exp $
* $Id: input_ext-intf.h,v 1.2
6 2001/02/22 17:00:20
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -33,6 +33,8 @@
#define REQUESTED_LPCM 3
#define REQUESTED_NOAUDIO 255
#define OFFSETTOTIME_MAX_SIZE 10
/*****************************************************************************
* es_descriptor_t: elementary stream descriptor
*****************************************************************************
...
...
@@ -343,4 +345,4 @@ void input_SetStatus( struct input_thread_s *, int );
void
input_SetRate
(
struct
input_thread_s
*
,
int
);
void
input_Seek
(
struct
input_thread_s
*
,
off_t
);
void
input_DumpStream
(
struct
input_thread_s
*
);
char
*
input_OffsetToTime
(
struct
input_thread_s
*
,
char
*
psz_buffer
,
off_t
);
src/input/input_clock.c
View file @
7d38f3f9
...
...
@@ -2,7 +2,7 @@
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_clock.c,v 1.
6 2001/02/08 13:52:35
massiot Exp $
* $Id: input_clock.c,v 1.
7 2001/02/22 17:00:20
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -119,8 +119,6 @@ static mtime_t ClockCurrent( input_thread_t * p_input,
static
void
ClockNewRef
(
input_thread_t
*
p_input
,
pgrm_descriptor_t
*
p_pgrm
,
mtime_t
i_clock
,
mtime_t
i_sysdate
)
{
intf_WarnMsg
(
1
,
"Old ref: %lld/%lld, New ref: %lld/%lld"
,
p_pgrm
->
cr_ref
,
p_pgrm
->
sysdate_ref
,
i_clock
,
i_sysdate
);
p_pgrm
->
cr_ref
=
i_clock
;
p_pgrm
->
sysdate_ref
=
i_sysdate
;
}
...
...
src/input/input_ext-intf.c
View file @
7d38f3f9
...
...
@@ -137,13 +137,91 @@ void input_SetRate( input_thread_t * p_input, int i_mode )
*****************************************************************************/
void
input_Seek
(
input_thread_t
*
p_input
,
off_t
i_position
)
{
char
psz_time1
[
OFFSETTOTIME_MAX_SIZE
];
char
psz_time2
[
OFFSETTOTIME_MAX_SIZE
];
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
p_input
->
stream
.
p_selected_area
->
i_seek
=
i_position
;
intf_Msg
(
"input: seeking position %lld/%lld"
,
i_position
,
p_input
->
stream
.
p_selected_area
->
i_size
);
intf_Msg
(
"input: seeking position %lld/%lld (%s/%s)"
,
i_position
,
p_input
->
stream
.
p_selected_area
->
i_size
,
input_OffsetToTime
(
p_input
,
psz_time1
,
i_position
),
input_OffsetToTime
(
p_input
,
psz_time2
,
p_input
->
stream
.
p_selected_area
->
i_size
)
);
vlc_cond_signal
(
&
p_input
->
stream
.
stream_wait
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
/*****************************************************************************
* input_OffsetToTime : converts an off_t value to a time indicator, using
* mux_rate
*****************************************************************************
* BEWARE : this function assumes that you already own the lock on
* p_input->stream.stream_lock
*****************************************************************************/
char
*
input_OffsetToTime
(
input_thread_t
*
p_input
,
char
*
psz_buffer
,
off_t
i_offset
)
{
mtime_t
i_seconds
;
if
(
p_input
->
stream
.
i_mux_rate
)
{
i_seconds
=
i_offset
*
50
/
p_input
->
stream
.
i_mux_rate
;
snprintf
(
psz_buffer
,
OFFSETTOTIME_MAX_SIZE
,
"%d:%02d:%02d"
,
(
int
)
(
i_seconds
/
(
60
*
60
)),
(
int
)
(
i_seconds
/
60
%
60
),
(
int
)
(
i_seconds
%
60
)
);
return
(
psz_buffer
);
}
else
{
/* Divide by zero is not my friend. */
sprintf
(
psz_buffer
,
"NA"
);
return
(
psz_buffer
);
}
}
/*****************************************************************************
* input_DumpStream: dumps the contents of a stream descriptor
*****************************************************************************
* BEWARE : this function assumes that you already own the lock on
* p_input->stream.stream_lock
*****************************************************************************/
void
input_DumpStream
(
input_thread_t
*
p_input
)
{
int
i
,
j
;
char
psz_time1
[
OFFSETTOTIME_MAX_SIZE
];
char
psz_time2
[
OFFSETTOTIME_MAX_SIZE
];
#define S p_input->stream
intf_Msg
(
"input info: Dumping stream ID 0x%x"
,
S
.
i_stream_id
);
if
(
S
.
b_seekable
)
intf_Msg
(
"input info: seekable stream, position: %lld/%lld (%s/%s)"
,
S
.
p_selected_area
->
i_tell
,
S
.
p_selected_area
->
i_size
,
input_OffsetToTime
(
p_input
,
psz_time1
,
S
.
p_selected_area
->
i_tell
),
input_OffsetToTime
(
p_input
,
psz_time2
,
S
.
p_selected_area
->
i_size
)
);
else
intf_Msg
(
"input info: %s"
,
S
.
b_pace_control
?
"pace controlled"
:
"pace un-controlled"
);
#undef S
for
(
i
=
0
;
i
<
p_input
->
stream
.
i_pgrm_number
;
i
++
)
{
#define P p_input->stream.pp_programs[i]
intf_Msg
(
"input info: Dumping program 0x%x, version %d (%s)"
,
P
->
i_number
,
P
->
i_version
,
P
->
b_is_ok
?
"complete"
:
"partial"
);
#undef P
for
(
j
=
0
;
j
<
p_input
->
stream
.
pp_programs
[
i
]
->
i_es_number
;
j
++
)
{
#define ES p_input->stream.pp_programs[i]->pp_es[j]
intf_Msg
(
"input info: ES 0x%x, stream 0x%x, type 0x%x, %s"
,
ES
->
i_id
,
ES
->
i_stream_id
,
ES
->
i_type
,
ES
->
p_decoder_fifo
!=
NULL
?
"selected"
:
"not selected"
);
#undef ES
}
}
}
src/input/input_programs.c
View file @
7d38f3f9
...
...
@@ -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.3
5 2001/02/22 16:17:12
massiot Exp $
* $Id: input_programs.c,v 1.3
6 2001/02/22 17:00:20
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -473,39 +473,6 @@ void input_DelES( input_thread_t * p_input, es_descriptor_t * p_es )
}
/*****************************************************************************
* input_DumpStream: dumps the contents of a stream descriptor
*****************************************************************************/
void
input_DumpStream
(
input_thread_t
*
p_input
)
{
int
i
,
j
;
#define S p_input->stream
intf_Msg
(
"input info: Dumping stream ID 0x%x"
,
S
.
i_stream_id
);
if
(
S
.
b_seekable
)
intf_Msg
(
"input info: seekable stream, position: %lld/%lld"
,
S
.
p_selected_area
->
i_tell
,
S
.
p_selected_area
->
i_size
);
else
intf_Msg
(
"input info: %s"
,
S
.
b_pace_control
?
"pace controlled"
:
"pace un-controlled"
);
#undef S
for
(
i
=
0
;
i
<
p_input
->
stream
.
i_pgrm_number
;
i
++
)
{
#define P p_input->stream.pp_programs[i]
intf_Msg
(
"input info: Dumping program 0x%x, version %d (%s)"
,
P
->
i_number
,
P
->
i_version
,
P
->
b_is_ok
?
"complete"
:
"partial"
);
#undef P
for
(
j
=
0
;
j
<
p_input
->
stream
.
pp_programs
[
i
]
->
i_es_number
;
j
++
)
{
#define ES p_input->stream.pp_programs[i]->pp_es[j]
intf_Msg
(
"input info: ES 0x%x, stream 0x%x, type 0x%x, %s"
,
ES
->
i_id
,
ES
->
i_stream_id
,
ES
->
i_type
,
ES
->
p_decoder_fifo
!=
NULL
?
"selected"
:
"not selected"
);
#undef ES
}
}
}
/*****************************************************************************
* InitDecConfig: initializes a decoder_config_t
*****************************************************************************/
...
...
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