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
0ea07e07
Commit
0ea07e07
authored
Feb 14, 2014
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transcode: take fps also as rational syntas, so 30000/1001 works
parent
15b81909
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
modules/stream_out/transcode/transcode.c
modules/stream_out/transcode/transcode.c
+3
-4
modules/stream_out/transcode/transcode.h
modules/stream_out/transcode/transcode.h
+1
-1
modules/stream_out/transcode/video.c
modules/stream_out/transcode/video.c
+3
-3
No files found.
modules/stream_out/transcode/transcode.c
View file @
0ea07e07
...
...
@@ -168,7 +168,7 @@ vlc_module_begin ()
VB_LONGTEXT
,
false
)
add_float
(
SOUT_CFG_PREFIX
"scale"
,
0
,
SCALE_TEXT
,
SCALE_LONGTEXT
,
false
)
add_
float
(
SOUT_CFG_PREFIX
"fps"
,
0
,
FPS_TEXT
,
add_
string
(
SOUT_CFG_PREFIX
"fps"
,
NULL
,
FPS_TEXT
,
FPS_LONGTEXT
,
false
)
add_bool
(
SOUT_CFG_PREFIX
"hurry-up"
,
false
,
HURRYUP_TEXT
,
HURRYUP_LONGTEXT
,
false
)
...
...
@@ -349,7 +349,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
f_scale
=
var_GetFloat
(
p_stream
,
SOUT_CFG_PREFIX
"scale"
);
p_sys
->
f_fps
=
var_GetFloat
(
p_stream
,
SOUT_CFG_PREFIX
"fps"
);
p_sys
->
b_master_sync
=
var_InheritURational
(
p_stream
,
&
p_sys
->
fps_num
,
&
p_sys
->
fps_den
,
SOUT_CFG_PREFIX
"fps"
);
p_sys
->
b_hurry_up
=
var_GetBool
(
p_stream
,
SOUT_CFG_PREFIX
"hurry-up"
);
...
...
@@ -467,8 +467,7 @@ static int Open( vlc_object_t *p_this )
}
/* Audio settings */
p_sys
->
b_master_sync
=
var_GetBool
(
p_stream
,
SOUT_CFG_PREFIX
"audio-sync"
);
if
(
p_sys
->
f_fps
>
0
)
p_sys
->
b_master_sync
=
true
;
p_sys
->
b_master_sync
=
__MAX
(
p_sys
->
b_master_sync
==
VLC_SUCCESS
,
var_GetBool
(
p_stream
,
SOUT_CFG_PREFIX
"audio-sync"
)
);
p_stream
->
pf_add
=
Add
;
p_stream
->
pf_del
=
Del
;
...
...
modules/stream_out/transcode/transcode.h
View file @
0ea07e07
...
...
@@ -43,7 +43,6 @@ struct sout_stream_sys_t
config_chain_t
*
p_video_cfg
;
int
i_vbitrate
;
double
f_scale
;
double
f_fps
;
unsigned
int
i_width
,
i_maxwidth
;
unsigned
int
i_height
,
i_maxheight
;
bool
b_deinterlace
;
...
...
@@ -52,6 +51,7 @@ struct sout_stream_sys_t
int
i_threads
;
bool
b_high_priority
;
bool
b_hurry_up
;
unsigned
int
fps_num
,
fps_den
;
char
*
psz_vf2
;
...
...
modules/stream_out/transcode/video.c
View file @
0ea07e07
...
...
@@ -992,10 +992,10 @@ bool transcode_video_add( sout_stream_t *p_stream, es_format_t *p_fmt,
* all the characteristics of the decoded stream yet */
id
->
b_transcode
=
true
;
if
(
p_sys
->
f
_fps
>
0
)
if
(
p_sys
->
f
ps_num
)
{
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate
=
(
p_sys
->
f
_fps
*
ENC_FRAMERATE_BASE
);
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate_base
=
ENC_FRAMERATE_BASE
;
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate
=
(
p_sys
->
f
ps_num
);
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate_base
=
(
p_sys
->
fps_den
?
p_sys
->
fps_den
:
1
)
;
}
return
true
;
...
...
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