History

Revert "avserver: fix build after the next bump."

This temporarily (until 0.8 is released) reverts commit 8e1340abc316e038bb89e5a3b46e92ff58c98a88. That commit breaks shared builds because of symbol hiding. Reverting it will enable shared builds for 0.8

Anton Khirnov committed 14 years ago

Commit 97e3f941 parent d2a00411 file · +10 −12Browse files

Showing the changes to avserver.c (1 of 1 file). Show all

Unified · Split

avserver.c+10−12
@@ -26,16 +26,13 @@ · 25 unmodified lines
2626 #include <string.h>
2727 #include <stdlib.h>
2828 #include "libavformat/avformat.h"
29−// FIXME those are internal headers, avserver _really_ shouldn't use them
3029 #include "libavformat/ffm.h"
3130 #include "libavformat/network.h"
3231 #include "libavformat/os_support.h"
3332 #include "libavformat/rtpdec.h"
3433 #include "libavformat/rtsp.h"
34+// XXX for ffio_open_dyn_packet_buffer, to be removed
3535 #include "libavformat/avio_internal.h"
36−#include "libavformat/internal.h"
37−#include "libavformat/url.h"
38−
3936 #include "libavutil/avstring.h"
4037 #include "libavutil/lfg.h"
4138 #include "libavutil/dict.h"
@@ -870,7 +867,7 @@ static void close_connection(HTTPContext *c) · 828 unmodified lines
870867 }
871868 h = c->rtp_handles[i];
872869 if (h)
873− ffurl_close(h);
870+ url_close(h);
874871 }
875872
876873 ctx = &c->fmt_ctx;
@@ -2251,6 +2248,7 @@ static int http_prepare_data(HTTPContext *c) · 1374 unmodified lines
22512248 * Default value from Libav
22522249 * Try to set it use configuration option
22532250 */
2251+ c->fmt_ctx.preload = (int)(0.5*AV_TIME_BASE);
22542252 c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE);
22552253
22562254 if (avformat_write_header(&c->fmt_ctx, NULL) < 0) {
@@ -2369,7 +2367,7 @@ static int http_prepare_data(HTTPContext *c) · 112 unmodified lines
23692367 if (c->rtp_protocol == RTSP_LOWER_TRANSPORT_TCP)
23702368 max_packet_size = RTSP_TCP_MAX_PACKET_SIZE;
23712369 else
2372− max_packet_size = c->rtp_handles[c->packet_stream_index]->max_packet_size;
2370+ max_packet_size = url_get_max_packet_size(c->rtp_handles[c->packet_stream_index]);
23732371 ret = ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size);
23742372 } else {
23752373 ret = avio_open_dyn_buf(&ctx->pb);
@@ -2522,8 +2520,8 @@ static int http_send_data(HTTPContext *c) · 146 unmodified lines
25222520 } else {
25232521 /* send RTP packet directly in UDP */
25242522 c->buffer_ptr += 4;
2525− ffurl_write(c->rtp_handles[c->packet_stream_index],
2526− c->buffer_ptr, len);
2523+ url_write(c->rtp_handles[c->packet_stream_index],
2524+ c->buffer_ptr, len);
25272525 c->buffer_ptr += len;
25282526 /* here we continue as we can send several packets per 10 ms slot */
25292527 }
@@ -3406,10 +3404,10 @@ static int rtp_new_av_stream(HTTPContext *c, · 876 unmodified lines
34063404 "rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port));
34073405 }
34083406
3409− if (ffurl_open(&h, ctx->filename, AVIO_FLAG_WRITE, NULL, NULL) < 0)
3407+ if (url_open(&h, ctx->filename, AVIO_FLAG_WRITE) < 0)
34103408 goto fail;
34113409 c->rtp_handles[stream_index] = h;
3412− max_packet_size = h->max_packet_size;
3410+ max_packet_size = url_get_max_packet_size(h);
34133411 break;
34143412 case RTSP_LOWER_TRANSPORT_TCP:
34153413 /* RTP/TCP case */
@@ -3432,7 +3430,7 @@ static int rtp_new_av_stream(HTTPContext *c, · 16 unmodified lines
34323430 if (avformat_write_header(ctx, NULL) < 0) {
34333431 fail:
34343432 if (h)
3435− ffurl_close(h);
3433+ url_close(h);
34363434 av_free(ctx);
34373435 return -1;
34383436 }
@@ -3469,7 +3467,7 @@ static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int cop · 30 unmodified lines
34693467 }
34703468 fst->priv_data = av_mallocz(sizeof(FeedData));
34713469 fst->index = stream->nb_streams;
3472− avpriv_set_pts_info(fst, 33, 1, 90000);
3470+ av_set_pts_info(fst, 33, 1, 90000);
34733471 fst->sample_aspect_ratio = codec->sample_aspect_ratio;
34743472 stream->streams[stream->nb_streams++] = fst;
34753473 return fst;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t