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
997c6c34
Commit
997c6c34
authored
Oct 02, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Re-added sub-delay option
* Re-implemented sub-fps for SubRIP. * Use 50ms increments for hotkeys
parent
c9275380
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
11 deletions
+36
-11
modules/control/hotkeys.c
modules/control/hotkeys.c
+2
-2
modules/demux/subtitle.c
modules/demux/subtitle.c
+18
-6
src/input/input.c
src/input/input.c
+16
-3
No files found.
modules/control/hotkeys.c
View file @
997c6c34
...
...
@@ -293,7 +293,7 @@ static void Run( intf_thread_t *p_intf )
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"spu-delay"
);
i_delay
-=
10000
;
/* 1
0 ms */
i_delay
-=
50000
;
/* 5
0 ms */
var_SetTime
(
p_input
,
"spu-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
...
...
@@ -304,7 +304,7 @@ static void Run( intf_thread_t *p_intf )
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"spu-delay"
);
i_delay
+=
10000
;
/* 1
0 ms */
i_delay
+=
50000
;
/* 5
0 ms */
var_SetTime
(
p_input
,
"spu-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
...
...
modules/demux/subtitle.c
View file @
997c6c34
...
...
@@ -66,6 +66,9 @@ vlc_module_begin();
add_float
(
"sub-fps"
,
0
.
0
,
NULL
,
N_
(
"Frames per second"
),
SUB_FPS_LONGTEXT
,
VLC_TRUE
);
add_integer
(
"sub-delay"
,
0
,
NULL
,
N_
(
"Subtitles delay"
),
SUB_DELAY_LONGTEXT
,
VLC_TRUE
);
add_string
(
"sub-type"
,
"auto"
,
NULL
,
"Subtitles fileformat"
,
SUB_TYPE_LONGTEXT
,
VLC_TRUE
);
change_string_list
(
ppsz_sub_type
,
0
,
0
);
...
...
@@ -116,12 +119,12 @@ struct demux_sys_t
int64_t
i_next_demux_date
;
int64_t
i_microsecperframe
;
mtime_t
i_original_mspf
;
char
*
psz_header
;
int
i_subtitle
;
int
i_subtitles
;
subtitle_t
*
subtitle
;
mtime_t
i_original_mspf
;
int64_t
i_length
;
};
...
...
@@ -182,7 +185,6 @@ static int Open ( vlc_object_t *p_this )
p_sys
->
i_subtitle
=
0
;
p_sys
->
i_subtitles
=
0
;
p_sys
->
subtitle
=
NULL
;
p_sys
->
i_original_mspf
=
0
;
/* Get the FPS */
...
...
@@ -193,6 +195,16 @@ static int Open ( vlc_object_t *p_this )
p_sys
->
i_microsecperframe
=
(
mtime_t
)(
(
float
)
1000000
/
f_fps
);
}
f_fps
=
var_CreateGetFloat
(
p_demux
,
"sub-original-fps"
);
if
(
f_fps
>=
1
.
0
)
{
p_sys
->
i_original_mspf
=
(
mtime_t
)(
(
float
)
1000000
/
f_fps
);
}
else
{
p_sys
->
i_original_mspf
=
0
;
}
/* Get or probe the type */
p_sys
->
i_type
=
SUB_TYPE_UNKNOWN
;
psz_type
=
var_CreateGetString
(
p_demux
,
"sub-type"
);
...
...
@@ -769,11 +781,11 @@ static int ParseSubRip( demux_t *p_demux, subtitle_t *p_subtitle )
p_sys
->
i_original_mspf
!=
0
)
{
p_subtitle
->
i_start
=
(
mtime_t
)
i_start
*
p_sys
->
i_
original_mspf
/
p_sys
->
i_
microsecperframe
;
p_sys
->
i_
microsecperframe
/
p_sys
->
i_
original_mspf
;
p_subtitle
->
i_stop
=
(
mtime_t
)
i_stop
*
p_sys
->
i_
original_mspf
/
p_sys
->
i_
microsecperframe
;
p_sys
->
i_
microsecperframe
/
p_sys
->
i_
original_mspf
;
}
return
0
;
}
...
...
src/input/input.c
View file @
997c6c34
...
...
@@ -514,7 +514,7 @@ static int Init( input_thread_t * p_input )
vlc_value_t
val
;
double
f_fps
;
vlc_meta_t
*
p_meta
,
*
p_meta_user
;
int
i
;
int
i
,
i_delay
;
/* Initialize optional stream output. (before access/demuxer) */
psz
=
var_GetString
(
p_input
,
"sout"
);
...
...
@@ -628,14 +628,27 @@ static int Init( input_thread_t * p_input )
f_fps
>
1
.
0
)
{
vlc_value_t
fps
;
float
f_requested_fps
;
var_Create
(
p_input
,
"sub-original-fps"
,
VLC_VAR_FLOAT
);
var_SetFloat
(
p_input
,
"sub-original-fps"
,
f_fps
);
if
(
var_Get
(
p_input
,
"sub-fps"
,
&
fps
)
)
f_requested_fps
=
var_CreateGetFloat
(
p_input
,
"sub-fps"
);
if
(
f_requested_fps
!=
f_fps
)
{
var_Create
(
p_input
,
"sub-fps"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
);
var_SetFloat
(
p_input
,
"sub-fps"
,
f_fps
);
var_SetFloat
(
p_input
,
"sub-fps"
,
f_
requested_
fps
);
}
}
i_delay
=
var_CreateGetInteger
(
p_input
,
"sub-delay"
);
if
(
i_delay
!=
0
)
{
var_SetTime
(
p_input
,
"spu-delay"
,
(
mtime_t
)
i_delay
*
100000
);
}
/* Look for and add subtitle files */
psz_subtitle
=
var_GetString
(
p_input
,
"sub-file"
);
if
(
*
psz_subtitle
)
...
...
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