• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

libavformat/rtpdec_g726.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2011 Miroslav Slugeň <Thunder.m@seznam.cz>
00003  *
00004  * This file is part of FFmpeg.
00005  *
00006  * FFmpeg is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * FFmpeg is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with FFmpeg; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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 };

Generated on Fri Feb 22 2013 07:24:32 for FFmpeg by  doxygen 1.7.1