diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-05 02:24:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-05 02:31:56 +0200 |
commit | 434f248723d4d3e22545c3542ef9fc7c00b2379b (patch) | |
tree | 4c399c1fa89215676e14f57c84a3244af806c39e /libavformat/mmst.c | |
parent | 6114bffa91714c83a533ae7e5a597ee605d35c3d (diff) | |
parent | 2310ee4b1cca48609d06774b7c3c70a5f38f3473 (diff) | |
download | ffmpeg-434f248723d4d3e22545c3542ef9fc7c00b2379b.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master: (22 commits)
ac3enc: move extract_exponents inner loop to ac3dsp
avio: deprecate url_get_filename().
avio: deprecate url_max_packet_size().
avio: make url_get_file_handle() internal.
avio: make url_filesize() internal.
avio: make url_close() internal.
avio: make url_seek() internal.
avio: cosmetics, move AVSEEK_SIZE/FORCE declarations together
avio: make url_write() internal.
avio: make url_read_complete() internal.
avio: make url_read() internal.
avio: make url_open() internal.
avio: make url_connect internal.
avio: make url_alloc internal.
applehttp: Merge two for loops
applehttp: Restructure the demuxer to use a custom AVIOContext
applehttp: Move finished and target_duration to the variant struct
aacenc: reduce the number of loop index variables
avio: deprecate url_open_protocol
avio: deprecate url_poll and URLPollEntry
...
Conflicts:
libavformat/applehttp.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mmst.c')
-rw-r--r-- | libavformat/mmst.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/mmst.c b/libavformat/mmst.c index e3af4bfbc6..89dd5b3c3c 100644 --- a/libavformat/mmst.c +++ b/libavformat/mmst.c @@ -35,6 +35,7 @@ #include "libavutil/intreadwrite.h" #include "libavcodec/bytestream.h" #include "network.h" +#include "url.h" #define LOCAL_ADDRESS 0xc0a80081 // FIXME get and use correct local ip address. #define LOCAL_PORT 1037 // as above. @@ -138,7 +139,7 @@ static int send_command_packet(MMSTContext *mmst) memset(mms->write_out_ptr, 0, exact_length - len); // write it out. - write_result= url_write(mms->mms_hd, mms->out_buffer, exact_length); + write_result= ffurl_write(mms->mms_hd, mms->out_buffer, exact_length); if(write_result != exact_length) { av_log(NULL, AV_LOG_ERROR, "Failed to write data of length %d: %d (%s)\n", @@ -240,7 +241,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst) MMSSCPacketType packet_type= -1; MMSContext *mms = &mmst->mms; for(;;) { - read_result = url_read_complete(mms->mms_hd, mms->in_buffer, 8); + read_result = ffurl_read_complete(mms->mms_hd, mms->in_buffer, 8); if (read_result != 8) { if(read_result < 0) { av_log(NULL, AV_LOG_ERROR, @@ -260,7 +261,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst) int length_remaining, hr; mmst->incoming_flags= mms->in_buffer[3]; - read_result= url_read_complete(mms->mms_hd, mms->in_buffer+8, 4); + read_result= ffurl_read_complete(mms->mms_hd, mms->in_buffer+8, 4); if(read_result != 4) { av_log(NULL, AV_LOG_ERROR, "Reading command packet length failed: %d (%s)\n", @@ -280,7 +281,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst) length_remaining, sizeof(mms->in_buffer) - 12); return AVERROR_INVALIDDATA; } - read_result = url_read_complete(mms->mms_hd, mms->in_buffer + 12, + read_result = ffurl_read_complete(mms->mms_hd, mms->in_buffer + 12, length_remaining) ; if (read_result != length_remaining) { av_log(NULL, AV_LOG_ERROR, @@ -318,7 +319,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst) } mms->remaining_in_len = length_remaining; mms->read_in_ptr = mms->in_buffer; - read_result= url_read_complete(mms->mms_hd, mms->in_buffer, length_remaining); + read_result= ffurl_read_complete(mms->mms_hd, mms->in_buffer, length_remaining); if(read_result != length_remaining) { av_log(NULL, AV_LOG_ERROR, "Failed to read packet data of size %d: %d (%s)\n", @@ -463,7 +464,7 @@ static int mms_close(URLContext *h) MMSContext *mms = &mmst->mms; if(mms->mms_hd) { send_close_packet(mmst); - url_close(mms->mms_hd); + ffurl_close(mms->mms_hd); } /* free all separately allocated pointers in mms */ @@ -522,7 +523,7 @@ static int mms_open(URLContext *h, const char *uri, int flags) // establish tcp connection. ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, mmst->host, port, NULL); - err = url_open(&mms->mms_hd, tcpname, URL_RDWR); + err = ffurl_open(&mms->mms_hd, tcpname, URL_RDWR); if (err) goto fail; |