Mercurial > mplayer.hg
view stream/network.h @ 30857:77ce62f13d42
Use the high-level QuickTime decoding APIs (DecompressSequenceFrameS and
friends) instead of the unsupported, internal ones (ImageCodecBeginBand
etc.). This is a prerequisite for, among others, Apple ProRes 4:2:2 support,
and simplifies the file by quite a bit.
Tested on Linux with all existing QuickTime codecs I could get to work in the
first place; qt261, qtavui, qtsvq3 have no change. qtcvid appears to not give
bit-exact the same output as before, but it looks just the same in playback
to me. qt3ivx stops crashing on exit (so works better than before). With some
extra patches and a codecs.conf entry, ProRes 4:2:2 also works, including on
Linux.
Since codec initialization is now actually done on decoder init instead of on
first frame, fallback should also work a bit better (although usually, qtvideo
is last in the chain). Also made the decoder complain explicitly if the
demuxer data is not there (ie., the user tried to run without -demuxer mov).
This patch is a cleaned up version of what Andrew Wason (rectalogic A
rectalogic D com) posted to mplayer-dev-eng in June.
author | sesse |
---|---|
date | Mon, 15 Mar 2010 12:05:56 +0000 |
parents | 11eebd7c8879 |
children | 496c8a6d045b |
line wrap: on
line source
/* * Network layer for MPlayer * * Copyright (C) 2001 Bertrand Baudet <bertrand_baudet@yahoo.com> * * This file is part of MPlayer. * * MPlayer is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * MPlayer 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 General Public License for more details. * * You should have received a copy of the GNU General Public License along * with MPlayer; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef MPLAYER_NETWORK_H #define MPLAYER_NETWORK_H #include <fcntl.h> #include <sys/time.h> #include <sys/types.h> #include "config.h" #if !HAVE_WINSOCK2_H #include <netdb.h> #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #endif #include "stream.h" #include "url.h" #include "http.h" #if !HAVE_CLOSESOCKET #define closesocket close #endif #if !HAVE_SOCKLEN_T typedef int socklen_t; #endif #define BUFFER_SIZE 2048 typedef struct { const char *mime_type; int demuxer_type; } mime_struct_t; streaming_ctrl_t *streaming_ctrl_new(void); int streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size); int nop_streaming_read( int fd, char *buffer, int size, streaming_ctrl_t *stream_ctrl ); int nop_streaming_seek( int fd, off_t pos, streaming_ctrl_t *stream_ctrl ); void streaming_ctrl_free( streaming_ctrl_t *streaming_ctrl ); int http_send_request(URL_t *url, off_t pos); HTTP_header_t *http_read_response(int fd); int http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry); URL_t* check4proxies(URL_t *url); void fixup_network_stream_cache(stream_t *stream); int http_seek(stream_t *stream, off_t pos); #endif /* MPLAYER_NETWORK_H */