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
315defaa
Commit
315defaa
authored
Dec 18, 2007
by
Jean-Paul Saman
Committed by
Jean-Paul Saman
Mar 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync with 0.8.6d and trunk.
parent
b3515f9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+16
-10
No files found.
modules/stream_out/transcode.c
View file @
315defaa
...
@@ -373,8 +373,8 @@ struct sout_stream_sys_t
...
@@ -373,8 +373,8 @@ struct sout_stream_sys_t
vlc_fourcc_t
i_acodec
;
/* codec audio (0 if not transcode) */
vlc_fourcc_t
i_acodec
;
/* codec audio (0 if not transcode) */
char
*
psz_aenc
;
char
*
psz_aenc
;
sout_cfg_t
*
p_audio_cfg
;
sout_cfg_t
*
p_audio_cfg
;
int
i_sample_rate
;
uint32_t
i_sample_rate
;
u
nsigned
int
i_channels
;
u
int32_t
i_channels
;
int
i_abitrate
;
int
i_abitrate
;
char
*
psz_afilters
[
TRANSCODE_FILTERS
];
char
*
psz_afilters
[
TRANSCODE_FILTERS
];
sout_cfg_t
*
p_afilters_cfg
[
TRANSCODE_FILTERS
];
sout_cfg_t
*
p_afilters_cfg
[
TRANSCODE_FILTERS
];
...
@@ -936,7 +936,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
...
@@ -936,7 +936,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
if
(
p_fmt
->
psz_language
)
if
(
p_fmt
->
psz_language
)
id
->
p_encoder
->
fmt_out
.
psz_language
=
strdup
(
p_fmt
->
psz_language
);
id
->
p_encoder
->
fmt_out
.
psz_language
=
strdup
(
p_fmt
->
psz_language
);
if
(
p_fmt
->
i_cat
==
AUDIO_ES
&&
(
p_sys
->
i_acodec
||
p_sys
->
psz_aenc
)
)
if
(
(
p_fmt
->
i_cat
==
AUDIO_ES
)
&&
(
p_sys
->
i_acodec
||
p_sys
->
psz_aenc
)
)
{
{
msg_Dbg
(
p_stream
,
msg_Dbg
(
p_stream
,
"creating audio transcoding from fcc=`%4.4s' to fcc=`%4.4s'"
,
"creating audio transcoding from fcc=`%4.4s' to fcc=`%4.4s'"
,
...
@@ -945,7 +945,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
...
@@ -945,7 +945,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
/* Complete destination format */
/* Complete destination format */
id
->
p_encoder
->
fmt_out
.
i_codec
=
p_sys
->
i_acodec
;
id
->
p_encoder
->
fmt_out
.
i_codec
=
p_sys
->
i_acodec
;
id
->
p_encoder
->
fmt_out
.
audio
.
i_rate
=
(
p_sys
->
i_sample_rate
>
0
)
?
id
->
p_encoder
->
fmt_out
.
audio
.
i_rate
=
(
p_sys
->
i_sample_rate
>
0
)
?
p_sys
->
i_sample_rate
:
(
int
)
p_fmt
->
audio
.
i_rate
;
p_sys
->
i_sample_rate
:
p_fmt
->
audio
.
i_rate
;
id
->
p_encoder
->
fmt_out
.
i_bitrate
=
p_sys
->
i_abitrate
;
id
->
p_encoder
->
fmt_out
.
i_bitrate
=
p_sys
->
i_abitrate
;
id
->
p_encoder
->
fmt_out
.
audio
.
i_bitspersample
=
id
->
p_encoder
->
fmt_out
.
audio
.
i_bitspersample
=
p_fmt
->
audio
.
i_bitspersample
;
p_fmt
->
audio
.
i_bitspersample
;
...
@@ -1311,13 +1311,17 @@ static int transcode_audio_new( sout_stream_t *p_stream,
...
@@ -1311,13 +1311,17 @@ static int transcode_audio_new( sout_stream_t *p_stream,
msg_Err
(
p_stream
,
"cannot find decoder"
);
msg_Err
(
p_stream
,
"cannot find decoder"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
id
->
p_decoder
->
fmt_out
.
audio
.
i_bitspersample
=
id
->
p_decoder
->
fmt_out
.
audio
.
i_bitspersample
=
audio_BitsPerSample
(
id
->
p_decoder
->
fmt_out
.
i_codec
);
audio_BitsPerSample
(
id
->
p_decoder
->
fmt_out
.
i_codec
);
fmt_last
=
id
->
p_decoder
->
fmt_out
;
fmt_last
=
id
->
p_decoder
->
fmt_out
;
/* FIX decoders so we don't have to do this */
fmt_last
.
audio
.
i_rate
=
id
->
p_decoder
->
fmt_in
.
audio
.
i_rate
;
/*
/* Fix AAC SBR changing number of channels and sampling rate */
if
(
!
(
id
->
p_decoder
->
fmt_in
.
i_codec
==
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
)
&&
(
fmt_last
.
audio
.
i_rate
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
)
&&
(
fmt_last
.
audio
.
i_channels
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
))
)
fmt_last
.
audio
.
i_rate
=
id
->
p_decoder
->
fmt_in
.
audio
.
i_rate
;
/*
* Open encoder
* Open encoder
*/
*/
...
@@ -1356,8 +1360,10 @@ static int transcode_audio_new( sout_stream_t *p_stream,
...
@@ -1356,8 +1360,10 @@ static int transcode_audio_new( sout_stream_t *p_stream,
audio_BitsPerSample
(
id
->
p_encoder
->
fmt_in
.
i_codec
);
audio_BitsPerSample
(
id
->
p_encoder
->
fmt_in
.
i_codec
);
/* Load conversion filters */
/* Load conversion filters */
if
(
(
fmt_last
.
audio
.
i_channels
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
)
||
/* Fix AAC SBR changing number of channels and sampling rate */
(
fmt_last
.
audio
.
i_rate
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
)
)
if
(
(
id
->
p_decoder
->
fmt_in
.
i_codec
==
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
)
)
&&
(
fmt_last
.
audio
.
i_rate
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
)
&&
(
fmt_last
.
audio
.
i_channels
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
)
)
{
{
/* We'll have to go through fl32 first */
/* We'll have to go through fl32 first */
es_format_t
fmt_out
=
id
->
p_encoder
->
fmt_in
;
es_format_t
fmt_out
=
id
->
p_encoder
->
fmt_in
;
...
...
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