Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
04403ec2
Commit
04403ec2
authored
Nov 30, 2011
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpenc: Add support for G726 audio
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
fa6dce4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
rtpenc.c
libavformat/rtpenc.c
+5
-0
sdp.c
libavformat/sdp.c
+8
-0
No files found.
libavformat/rtpenc.c
View file @
04403ec2
...
@@ -72,6 +72,7 @@ static int is_supported(enum CodecID id)
...
@@ -72,6 +72,7 @@ static int is_supported(enum CodecID id)
case
CODEC_ID_THEORA
:
case
CODEC_ID_THEORA
:
case
CODEC_ID_VP8
:
case
CODEC_ID_VP8
:
case
CODEC_ID_ADPCM_G722
:
case
CODEC_ID_ADPCM_G722
:
case
CODEC_ID_ADPCM_G726
:
return
1
;
return
1
;
default:
default:
return
0
;
return
0
;
...
@@ -411,6 +412,10 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
...
@@ -411,6 +412,10 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
* clock. */
* clock. */
rtp_send_samples
(
s1
,
pkt
->
data
,
size
,
8
*
st
->
codec
->
channels
);
rtp_send_samples
(
s1
,
pkt
->
data
,
size
,
8
*
st
->
codec
->
channels
);
break
;
break
;
case
CODEC_ID_ADPCM_G726
:
rtp_send_samples
(
s1
,
pkt
->
data
,
size
,
st
->
codec
->
bits_per_coded_sample
*
st
->
codec
->
channels
);
break
;
case
CODEC_ID_MP2
:
case
CODEC_ID_MP2
:
case
CODEC_ID_MP3
:
case
CODEC_ID_MP3
:
rtp_send_mpegaudio
(
s1
,
pkt
->
data
,
size
);
rtp_send_mpegaudio
(
s1
,
pkt
->
data
,
size
);
...
...
libavformat/sdp.c
View file @
04403ec2
...
@@ -517,6 +517,14 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
...
@@ -517,6 +517,14 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
payload_type
,
payload_type
,
8000
,
c
->
channels
);
8000
,
c
->
channels
);
break
;
break
;
case
CODEC_ID_ADPCM_G726
:
{
if
(
payload_type
>=
RTP_PT_PRIVATE
)
av_strlcatf
(
buff
,
size
,
"a=rtpmap:%d G726-%d/%d
\r\n
"
,
payload_type
,
c
->
bits_per_coded_sample
*
8
,
c
->
sample_rate
);
break
;
}
default:
default:
/* Nothing special to do here... */
/* Nothing special to do here... */
break
;
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