/*
- * FFplay : Simple Media Player based on the FFmpeg libraries
+ * FFplay : Simple Media Player based on the Libav libraries
* Copyright (c) 2003 Fabrice Bellard
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav 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,
+ * Libav 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
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/avstring.h"
#include "libavutil/colorspace.h"
#include "libavutil/pixdesc.h"
-#include "libavcore/imgutils.h"
-#include "libavcore/parseutils.h"
-#include "libavcore/samplefmt.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/parseutils.h"
+#include "libavutil/samplefmt.h"
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
is->subtitle_stream = -1;
global_video_state = is;
- url_set_interrupt_cb(decode_interrupt_cb);
+ avio_set_interrupt_cb(decode_interrupt_cb);
memset(ap, 0, sizeof(*ap));
st_index[AVMEDIA_TYPE_VIDEO]),
NULL, 0);
if (show_status) {
- dump_format(ic, 0, is->filename, 0);
+ av_dump_format(ic, 0, is->filename, 0);
}
/* open the streams */
}
ret = av_read_frame(ic, pkt);
if (ret < 0) {
- if (ret == AVERROR_EOF || url_feof(ic->pb))
+ if (ret == AVERROR_EOF || (ic->pb && ic->pb->eof_reached))
eof=1;
- if (url_ferror(ic->pb))
+ if (ic->pb && ic->pb->error)
break;
SDL_Delay(100); /* wait for user event */
continue;
av_close_input_file(is->ic);
is->ic = NULL; /* safety */
}
- url_set_interrupt_cb(NULL);
+ avio_set_interrupt_cb(NULL);
if (ret != 0) {
SDL_Event event;
}else if(cur_stream->audio_stream >= 0 && cur_stream->audio_pkt.pos>=0){
pos= cur_stream->audio_pkt.pos;
}else
- pos = url_ftell(cur_stream->ic->pb);
+ pos = avio_tell(cur_stream->ic->pb);
if (cur_stream->ic->bit_rate)
incr *= cur_stream->ic->bit_rate / 8.0;
else
}
if (cur_stream) {
if(seek_by_bytes || cur_stream->ic->duration<=0){
- uint64_t size= url_fsize(cur_stream->ic->pb);
+ uint64_t size= avio_size(cur_stream->ic->pb);
stream_seek(cur_stream, size*x/cur_stream->width, 0, 1);
}else{
int64_t ts;