diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-21 23:11:27 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-21 23:11:27 +0100 |
commit | b5a69e79c579e6e15e2019ffd34ef0e09aeab586 (patch) | |
tree | bc6b0aa0776ca51a9b8a4800a7f464866221821f /ffserver.c | |
parent | 9e53f62be1a171eaf9620958c225d42cf5142a30 (diff) | |
parent | ad7beb2cac1563e87171a4d044a6d526527d81d9 (diff) | |
download | ffmpeg-b5a69e79c579e6e15e2019ffd34ef0e09aeab586.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
rtpdec: Use our own SSRC in the SDES field when sending RRs
Finalize changelog for 0.8 Release
Prepare for 0.8 Release
threads: change the default for threads back to 1
threads: update slice_count and slice_offset from user context
aviocat: Remove useless includes
doc/APIChanges: fill in missing dates and hashes
Revert "avserver: fix build after the next bump."
mpegaudiodec: switch error detection check to AV_EF_BUFFER
lavf: rename fer option and document resulting (f_)err_detect options
lavc: rename err_filter option to err_detect and document it
mpegvideo: fix invalid memory access for small video dimensions
movenc: Reorder entries in the MOVIentry struct, for tigheter packing
rtsp: Remove extern declarations for variables that don't exist
aviocat: Flush the output before closing
Conflicts:
Changelog
RELEASE
libavcodec/mpegaudiodec.c
libavcodec/pthread.c
libavformat/options.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/ffserver.c b/ffserver.c index 79463c0e64..c225a94e3b 100644 --- a/ffserver.c +++ b/ffserver.c @@ -30,16 +30,13 @@ #include <string.h> #include <stdlib.h> #include "libavformat/avformat.h" -// FIXME those are internal headers, avserver _really_ shouldn't use them #include "libavformat/ffm.h" #include "libavformat/network.h" #include "libavformat/os_support.h" #include "libavformat/rtpdec.h" #include "libavformat/rtsp.h" +// XXX for ffio_open_dyn_packet_buffer, to be removed #include "libavformat/avio_internal.h" -#include "libavformat/internal.h" -#include "libavformat/url.h" - #include "libavutil/avstring.h" #include "libavutil/lfg.h" #include "libavutil/dict.h" @@ -877,7 +874,7 @@ static void close_connection(HTTPContext *c) } h = c->rtp_handles[i]; if (h) - ffurl_close(h); + url_close(h); } ctx = &c->fmt_ctx; @@ -2258,6 +2255,7 @@ static int http_prepare_data(HTTPContext *c) * Default value from FFmpeg * Try to set it use configuration option */ + c->fmt_ctx.preload = (int)(0.5*AV_TIME_BASE); c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE); if (avformat_write_header(&c->fmt_ctx, NULL) < 0) { @@ -2376,7 +2374,7 @@ static int http_prepare_data(HTTPContext *c) if (c->rtp_protocol == RTSP_LOWER_TRANSPORT_TCP) max_packet_size = RTSP_TCP_MAX_PACKET_SIZE; else - max_packet_size = c->rtp_handles[c->packet_stream_index]->max_packet_size; + max_packet_size = url_get_max_packet_size(c->rtp_handles[c->packet_stream_index]); ret = ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size); } else { ret = avio_open_dyn_buf(&ctx->pb); @@ -2529,8 +2527,8 @@ static int http_send_data(HTTPContext *c) } else { /* send RTP packet directly in UDP */ c->buffer_ptr += 4; - ffurl_write(c->rtp_handles[c->packet_stream_index], - c->buffer_ptr, len); + url_write(c->rtp_handles[c->packet_stream_index], + c->buffer_ptr, len); c->buffer_ptr += len; /* here we continue as we can send several packets per 10 ms slot */ } @@ -3413,10 +3411,10 @@ static int rtp_new_av_stream(HTTPContext *c, "rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port)); } - if (ffurl_open(&h, ctx->filename, AVIO_FLAG_WRITE, NULL, NULL) < 0) + if (url_open(&h, ctx->filename, AVIO_FLAG_WRITE) < 0) goto fail; c->rtp_handles[stream_index] = h; - max_packet_size = h->max_packet_size; + max_packet_size = url_get_max_packet_size(h); break; case RTSP_LOWER_TRANSPORT_TCP: /* RTP/TCP case */ @@ -3439,7 +3437,7 @@ static int rtp_new_av_stream(HTTPContext *c, if (avformat_write_header(ctx, NULL) < 0) { fail: if (h) - ffurl_close(h); + url_close(h); av_free(ctx); return -1; } @@ -3476,7 +3474,7 @@ static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int cop } fst->priv_data = av_mallocz(sizeof(FeedData)); fst->index = stream->nb_streams; - avpriv_set_pts_info(fst, 33, 1, 90000); + av_set_pts_info(fst, 33, 1, 90000); fst->sample_aspect_ratio = codec->sample_aspect_ratio; stream->streams[stream->nb_streams++] = fst; return fst; |