00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "avformat.h"
00022 #include "rtpdec_formats.h"
00023
00024 static int g726_16_parse_sdp_line(AVFormatContext *s, int st_index,
00025 PayloadContext *data, const char *line)
00026 {
00027 AVStream *stream = s->streams[st_index];
00028 AVCodecContext *codec = stream->codec;
00029
00030 codec->bit_rate = 16000;
00031
00032 return 0;
00033 }
00034
00035 static int g726_24_parse_sdp_line(AVFormatContext *s, int st_index,
00036 PayloadContext *data, const char *line)
00037 {
00038 AVStream *stream = s->streams[st_index];
00039 AVCodecContext *codec = stream->codec;
00040
00041 codec->bit_rate = 24000;
00042
00043 return 0;
00044 }
00045
00046 static int g726_32_parse_sdp_line(AVFormatContext *s, int st_index,
00047 PayloadContext *data, const char *line)
00048 {
00049 AVStream *stream = s->streams[st_index];
00050 AVCodecContext *codec = stream->codec;
00051
00052 codec->bit_rate = 32000;
00053
00054 return 0;
00055 }
00056
00057 static int g726_40_parse_sdp_line(AVFormatContext *s, int st_index,
00058 PayloadContext *data, const char *line)
00059 {
00060 AVStream *stream = s->streams[st_index];
00061 AVCodecContext *codec = stream->codec;
00062
00063 codec->bit_rate = 40000;
00064
00065 return 0;
00066 }
00067
00068 RTPDynamicProtocolHandler ff_g726_16_dynamic_handler = {
00069 .enc_name = "G726-16",
00070 .codec_type = AVMEDIA_TYPE_AUDIO,
00071 .codec_id = CODEC_ID_ADPCM_G726,
00072 .parse_sdp_a_line = g726_16_parse_sdp_line,
00073 };
00074
00075 RTPDynamicProtocolHandler ff_g726_24_dynamic_handler = {
00076 .enc_name = "G726-24",
00077 .codec_type = AVMEDIA_TYPE_AUDIO,
00078 .codec_id = CODEC_ID_ADPCM_G726,
00079 .parse_sdp_a_line = g726_24_parse_sdp_line,
00080 };
00081
00082 RTPDynamicProtocolHandler ff_g726_32_dynamic_handler = {
00083 .enc_name = "G726-32",
00084 .codec_type = AVMEDIA_TYPE_AUDIO,
00085 .codec_id = CODEC_ID_ADPCM_G726,
00086 .parse_sdp_a_line = g726_32_parse_sdp_line,
00087 };
00088
00089 RTPDynamicProtocolHandler ff_g726_40_dynamic_handler = {
00090 .enc_name = "G726-40",
00091 .codec_type = AVMEDIA_TYPE_AUDIO,
00092 .codec_id = CODEC_ID_ADPCM_G726,
00093 .parse_sdp_a_line = g726_40_parse_sdp_line,
00094 };