Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
cb2ce817
Commit
cb2ce817
authored
Dec 03, 2003
by
Rocky Bernstein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more uses of msecstotimestr. Remove OFFSETTOTIME_MAX_SIZE -
Use MSTRTIME_MAX_SIZE instead.
parent
2ded9ac0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
31 deletions
+22
-31
include/input_ext-intf.h
include/input_ext-intf.h
+2
-4
modules/gui/gtk/display.c
modules/gui/gtk/display.c
+3
-3
modules/gui/wxwindows/timer.cpp
modules/gui/wxwindows/timer.cpp
+3
-7
src/input/input_ext-intf.c
src/input/input_ext-intf.c
+7
-11
src/misc/mtime.c
src/misc/mtime.c
+7
-6
No files found.
include/input_ext-intf.h
View file @
cb2ce817
...
...
@@ -3,8 +3,8 @@
* This header provides structures to read the stream descriptors and
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.10
1 2003/11/29 18:36:13 massiot
Exp $
* Copyright (C) 1999, 2000
, 2003
VideoLAN
* $Id: input_ext-intf.h,v 1.10
2 2003/12/03 13:27:51 rocky
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -38,8 +38,6 @@
#define REQUESTED_DTS 4
#define REQUESTED_NOAUDIO 255
#define OFFSETTOTIME_MAX_SIZE 10
/*****************************************************************************
* es_descriptor_t: elementary stream descriptor
*****************************************************************************
...
...
modules/gui/gtk/display.c
View file @
cb2ce817
/*****************************************************************************
* display.c: Gtk+ tools for main interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: display.c,v 1.1
1 2003/08/03 23:11:21 gbazin
Exp $
* Copyright (C) 1999, 2000
, 2003
VideoLAN
* $Id: display.c,v 1.1
2 2003/12/03 13:27:51 rocky
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -63,7 +63,7 @@ void E_(GtkDisplayDate)( GtkAdjustment *p_adj )
if
(
p_intf
->
p_sys
->
p_input
)
{
#define p_area p_intf->p_sys->p_input->stream.p_selected_area
char
psz_time
[
OFFSETTO
TIME_MAX_SIZE
];
char
psz_time
[
MSTR
TIME_MAX_SIZE
];
gtk_frame_set_label
(
GTK_FRAME
(
p_intf
->
p_sys
->
p_slider_frame
),
input_OffsetToTime
(
p_intf
->
p_sys
->
p_input
,
psz_time
,
...
...
modules/gui/wxwindows/timer.cpp
View file @
cb2ce817
...
...
@@ -2,7 +2,7 @@
* timer.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2003 VideoLAN
* $Id: timer.cpp,v 1.3
5 2003/11/23 22:29:27 ipkiss
Exp $
* $Id: timer.cpp,v 1.3
6 2003/12/03 13:27:51 rocky
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -184,7 +184,7 @@ void Timer::Notify()
if
(
p_intf
->
p_sys
->
b_slider_free
)
{
vlc_value_t
pos
;
char
psz_time
[
OFFSETTO
TIME_MAX_SIZE
];
char
psz_time
[
MSTR
TIME_MAX_SIZE
];
vlc_value_t
time
;
mtime_t
i_seconds
;
...
...
@@ -201,11 +201,7 @@ void Timer::Notify()
var_Get
(
p_intf
->
p_sys
->
p_input
,
"time"
,
&
time
);
i_seconds
=
time
.
i_time
/
1000000
;
snprintf
(
psz_time
,
OFFSETTOTIME_MAX_SIZE
,
"%d:%02d:%02d"
,
(
int
)
(
i_seconds
/
(
60
*
60
)),
(
int
)
(
i_seconds
/
60
%
60
),
(
int
)
(
i_seconds
%
60
)
);
secstotimestr
(
psz_time
,
i_seconds
);
p_main_interface
->
slider_box
->
SetLabel
(
wxU
(
psz_time
)
);
}
...
...
src/input/input_ext-intf.c
View file @
cb2ce817
/*****************************************************************************
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_ext-intf.c,v 1.5
2 2003/11/24 00:39:02 fenrir
Exp $
* Copyright (C) 1998-2001
,2003
VideoLAN
* $Id: input_ext-intf.c,v 1.5
3 2003/12/03 13:27:51 rocky
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -197,8 +197,8 @@ void __input_Seek( vlc_object_t * p_this, off_t i_position, int i_whence )
{
input_thread_t
*
p_input
;
char
psz_time1
[
OFFSETTO
TIME_MAX_SIZE
];
char
psz_time2
[
OFFSETTO
TIME_MAX_SIZE
];
char
psz_time1
[
MSTR
TIME_MAX_SIZE
];
char
psz_time2
[
MSTR
TIME_MAX_SIZE
];
p_input
=
vlc_object_find
(
p_this
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
...
...
@@ -308,11 +308,7 @@ char * input_OffsetToTime( input_thread_t * p_input, char * psz_buffer,
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
);
return
secstotimestr
(
psz_buffer
,
i_seconds
);
}
else
{
...
...
@@ -330,8 +326,8 @@ char * input_OffsetToTime( input_thread_t * p_input, char * psz_buffer,
*****************************************************************************/
void
input_DumpStream
(
input_thread_t
*
p_input
)
{
char
psz_time1
[
OFFSETTO
TIME_MAX_SIZE
];
char
psz_time2
[
OFFSETTO
TIME_MAX_SIZE
];
char
psz_time1
[
MSTR
TIME_MAX_SIZE
];
char
psz_time2
[
MSTR
TIME_MAX_SIZE
];
unsigned
int
i
,
j
;
#define S p_input->stream
...
...
src/misc/mtime.c
View file @
cb2ce817
/*****************************************************************************
* mtime.c: high re
z
olution time management functions
* mtime.c: high re
s
olution time management functions
* Functions are prototyped in mtime.h.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: mtime.c,v 1.3
7 2003/12/02 01:54:30
rocky Exp $
* Copyright (C) 1998-2001
, 2003
VideoLAN
* $Id: mtime.c,v 1.3
8 2003/12/03 13:27:51
rocky Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
...
...
@@ -103,11 +103,12 @@ char *mstrtime( char *psz_buffer, mtime_t date )
* \param psz_buffer should be a buffer at least MSTRTIME_MAX_SIZE characters
* \return psz_buffer is returned so this can be used as printf parameter.
*/
char
*
secstotimestr
(
char
*
psz_buffer
,
int
sec
s
)
char
*
secstotimestr
(
char
*
psz_buffer
,
int
i_second
s
)
{
snprintf
(
psz_buffer
,
MSTRTIME_MAX_SIZE
,
"%d:%2.2d:%2.2d"
,
(
int
)
(
secs
/
3600
),
(
int
)((
secs
%
3600
)
/
60
),
(
int
)(
secs
%
60
)
);
(
int
)
(
i_seconds
/
(
60
*
60
)),
(
int
)
((
i_seconds
/
60
)
%
60
),
(
int
)
(
i_seconds
%
60
)
);
return
(
psz_buffer
);
}
...
...
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