Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b92c7ee6
Commit
b92c7ee6
authored
Jun 28, 2012
by
Damien Fetis
Committed by
Luca Barbato
Jun 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flv: add support for G.711
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
433492ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
flv.h
libavformat/flv.h
+2
-0
flvdec.c
libavformat/flvdec.c
+8
-0
flvenc.c
libavformat/flvenc.c
+8
-0
No files found.
libavformat/flv.h
View file @
b92c7ee6
...
...
@@ -82,6 +82,8 @@ enum {
FLV_CODECID_NELLYMOSER_16KHZ_MONO
=
4
<<
FLV_AUDIO_CODECID_OFFSET
,
FLV_CODECID_NELLYMOSER_8KHZ_MONO
=
5
<<
FLV_AUDIO_CODECID_OFFSET
,
FLV_CODECID_NELLYMOSER
=
6
<<
FLV_AUDIO_CODECID_OFFSET
,
FLV_CODECID_PCM_ALAW
=
7
<<
FLV_AUDIO_CODECID_OFFSET
,
FLV_CODECID_PCM_MULAW
=
8
<<
FLV_AUDIO_CODECID_OFFSET
,
FLV_CODECID_AAC
=
10
<<
FLV_AUDIO_CODECID_OFFSET
,
FLV_CODECID_SPEEX
=
11
<<
FLV_AUDIO_CODECID_OFFSET
,
};
...
...
libavformat/flvdec.c
View file @
b92c7ee6
...
...
@@ -108,6 +108,14 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, AVCodecCo
case
FLV_CODECID_NELLYMOSER
:
acodec
->
codec_id
=
CODEC_ID_NELLYMOSER
;
break
;
case
FLV_CODECID_PCM_MULAW
:
acodec
->
sample_rate
=
8000
;
acodec
->
codec_id
=
CODEC_ID_PCM_MULAW
;
break
;
case
FLV_CODECID_PCM_ALAW
:
acodec
->
sample_rate
=
8000
;
acodec
->
codec_id
=
CODEC_ID_PCM_ALAW
;
break
;
default:
av_log
(
s
,
AV_LOG_INFO
,
"Unsupported audio codec (%x)
\n
"
,
flv_codecid
>>
FLV_AUDIO_CODECID_OFFSET
);
acodec
->
codec_tag
=
flv_codecid
>>
FLV_AUDIO_CODECID_OFFSET
;
...
...
libavformat/flvenc.c
View file @
b92c7ee6
...
...
@@ -48,6 +48,8 @@ static const AVCodecTag flv_audio_codec_ids[] = {
{
CODEC_ID_ADPCM_SWF
,
FLV_CODECID_ADPCM
>>
FLV_AUDIO_CODECID_OFFSET
},
{
CODEC_ID_AAC
,
FLV_CODECID_AAC
>>
FLV_AUDIO_CODECID_OFFSET
},
{
CODEC_ID_NELLYMOSER
,
FLV_CODECID_NELLYMOSER
>>
FLV_AUDIO_CODECID_OFFSET
},
{
CODEC_ID_PCM_MULAW
,
FLV_CODECID_PCM_MULAW
>>
FLV_AUDIO_CODECID_OFFSET
},
{
CODEC_ID_PCM_ALAW
,
FLV_CODECID_PCM_ALAW
>>
FLV_AUDIO_CODECID_OFFSET
},
{
CODEC_ID_SPEEX
,
FLV_CODECID_SPEEX
>>
FLV_AUDIO_CODECID_OFFSET
},
{
CODEC_ID_NONE
,
0
}
};
...
...
@@ -136,6 +138,12 @@ static int get_audio_flags(AVFormatContext *s, AVCodecContext *enc)
else
flags
|=
FLV_CODECID_NELLYMOSER
|
FLV_SAMPLESSIZE_16BIT
;
break
;
case
CODEC_ID_PCM_MULAW
:
flags
=
FLV_CODECID_PCM_MULAW
|
FLV_SAMPLERATE_SPECIAL
|
FLV_SAMPLESSIZE_16BIT
;
break
;
case
CODEC_ID_PCM_ALAW
:
flags
=
FLV_CODECID_PCM_ALAW
|
FLV_SAMPLERATE_SPECIAL
|
FLV_SAMPLESSIZE_16BIT
;
break
;
case
0
:
flags
|=
enc
->
codec_tag
<<
4
;
break
;
...
...
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