Merge remote-tracking branch 'qatar/master'

* qatar/master:
  nutdec: const correctness for get_v_trace/get_s_trace function arguments
  truemotion2: Request samples for old TM2 headers
  rtpdec: Remove a useless ff_ prefix from a static symbol
  rtpdec: Support depacketizing speex
  rtpenc: Add support for packetizing speex

Conflicts:
	libavformat/rtpdec.c
	libavformat/sdp.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-09-27 14:23:23 +02:00
commit e760424ddd
9 changed files with 17 additions and 52 deletions

View File

@ -214,7 +214,7 @@ static inline int tm2_read_header(TM2Context *ctx, const uint8_t *buf)
buf += 4;
if(magic == 0x00000100) { /* old header */
/* av_log (ctx->avctx, AV_LOG_ERROR, "TM2 old header: not implemented (yet)\n"); */
av_log_missing_feature(ctx->avctx, "TM2 old header", 1);
return 40;
} else if(magic == 0x00000101) { /* new header */
return 40;

View File

@ -300,7 +300,6 @@ OBJS-$(CONFIG_RTPDEC) += rdt.o \
rtpdec_qcelp.o \
rtpdec_qdm2.o \
rtpdec_qt.o \
rtpdec_speex.o \
rtpdec_svq3.o \
rtpdec_vp8.o \
rtpdec_xiph.o

View File

@ -77,8 +77,8 @@ static uint64_t get_fourcc(AVIOContext *bc)
}
#ifdef TRACE
static inline uint64_t get_v_trace(AVIOContext *bc, char *file,
char *func, int line)
static inline uint64_t get_v_trace(AVIOContext *bc, const char *file,
const char *func, int line)
{
uint64_t v = ffio_read_varlen(bc);
@ -87,8 +87,8 @@ static inline uint64_t get_v_trace(AVIOContext *bc, char *file,
return v;
}
static inline int64_t get_s_trace(AVIOContext *bc, char *file,
char *func, int line)
static inline int64_t get_s_trace(AVIOContext *bc, const char *file,
const char *func, int line)
{
int64_t v = get_s(bc);

View File

@ -43,12 +43,18 @@
'ffio_open_dyn_packet_buf')
*/
static RTPDynamicProtocolHandler ff_realmedia_mp3_dynamic_handler = {
static RTPDynamicProtocolHandler realmedia_mp3_dynamic_handler = {
.enc_name = "X-MP3-draft-00",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_MP3ADU,
};
static RTPDynamicProtocolHandler speex_dynamic_handler = {
.enc_name = "speex",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_SPEEX,
};
/* statistics functions */
static RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler= NULL;
@ -77,8 +83,8 @@ void av_register_rtp_dynamic_payload_handlers(void)
ff_register_dynamic_payload_handler(&ff_mp4a_latm_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_vp8_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_qcelp_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_realmedia_mp3_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_speex_dynamic_handler);
ff_register_dynamic_payload_handler(&realmedia_mp3_dynamic_handler);
ff_register_dynamic_payload_handler(&speex_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfv_handler);
ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfa_handler);

View File

@ -58,7 +58,6 @@ extern RTPDynamicProtocolHandler ff_qt_rtp_aud_handler;
extern RTPDynamicProtocolHandler ff_qt_rtp_vid_handler;
extern RTPDynamicProtocolHandler ff_quicktime_rtp_aud_handler;
extern RTPDynamicProtocolHandler ff_quicktime_rtp_vid_handler;
extern RTPDynamicProtocolHandler ff_speex_dynamic_handler;
extern RTPDynamicProtocolHandler ff_svq3_dynamic_handler;
extern RTPDynamicProtocolHandler ff_theora_dynamic_handler;
extern RTPDynamicProtocolHandler ff_vorbis_dynamic_handler;

View File

@ -1,39 +0,0 @@
/*
* RTP SPEEX Depacketizer, RFC 5574
* Copyright (c) 2012 Dmitry Samonenko
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
#include "rtpdec_formats.h"
#include "libavutil/avstring.h"
static int speex_parse_sdp_line(AVFormatContext *s, int st_index,
PayloadContext *data, const char *line)
{
av_log(s, AV_LOG_WARNING, "fmtp line parsing is not implemented yet\n");
return 0;
}
RTPDynamicProtocolHandler ff_speex_dynamic_handler = {
.enc_name = "speex",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_SPEEX,
.parse_sdp_a_line = speex_parse_sdp_line,
};

View File

@ -75,8 +75,8 @@ static int is_supported(enum AVCodecID id)
case AV_CODEC_ID_ADPCM_G722:
case AV_CODEC_ID_ADPCM_G726:
case AV_CODEC_ID_ILBC:
case AV_CODEC_ID_SPEEX:
case AV_CODEC_ID_MJPEG:
case AV_CODEC_ID_SPEEX:
return 1;
default:
return 0;

View File

@ -575,7 +575,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
case AV_CODEC_ID_SPEEX:
av_strlcatf(buff, size, "a=rtpmap:%d speex/%d\r\n",
payload_type, c->sample_rate);
break;
default:
/* Nothing special to do here... */
break;

View File

@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 54
#define LIBAVFORMAT_VERSION_MINOR 29
#define LIBAVFORMAT_VERSION_MICRO 101
#define LIBAVFORMAT_VERSION_MICRO 103
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \