1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-02 21:12:23 +00:00

Remove some leftovers from network removal

stream_vstream.c in particular was actually dependent on the network
code, and didn't compile anymore.

Cleanup the protocol list in mpv.rst, and add some missing ones
supported by libavformat to stream_lavf.c.
This commit is contained in:
wm4 2013-07-07 20:55:14 +02:00
parent c4f83ac6e9
commit 4caa3356b2
7 changed files with 4 additions and 213 deletions

View File

@ -27,8 +27,8 @@ SYNOPSIS
| **mpv** \pvr:// [options]
| **mpv** \dvb://[card\_number@]channel [options]
| **mpv** \mf://[filemask|\@listfile] [-mf options] [options]
| **mpv** [cdda|cddb]://track[-endtrack][:speed][/device] [options]
| **mpv** [file|mms[t]|http|httpproxy|rt[s]p|ftp|udp|unsv|icyx|noicyx|smb]:// [user:pass\@]URL[:port] [options]
| **mpv** cdda://track[-endtrack][:speed][/device] [options]
| **mpv** [file|mms[t]|http|httpproxy|rt[s]p|ftp|udp|smb]:// [user:pass\@]URL[:port] [options]
DESCRIPTION

View File

@ -1225,7 +1225,7 @@
same files from system wide configuration directories.
Loading of some configuration files is not affected by this option, such
as configuration files for cddb, DVB code and fontconfig.
as configuration files for DVB code and fontconfig.
*NOTE*: Files explicitly requested by command line options, like
``--include`` or ``--use-filedir-conf``, will still be loaded.

View File

@ -66,7 +66,6 @@ SOURCES-$(TV) += stream/stream_tv.c stream/tv.c \
SOURCES-$(TV_V4L2) += stream/tvi_v4l2.c stream/audio_in.c
SOURCES-$(VCD) += stream/stream_vcd.c
SOURCES-$(VSTREAM) += stream/stream_vstream.c
SOURCES-$(DUMMY_OSD) += sub/osd_dummy.c
SOURCES-$(LIBASS_OSD) += sub/osd_libass.c

27
configure vendored
View File

@ -318,7 +318,6 @@ Optional features:
--enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
--disable-inet6 disable IPv6 support [autodetect]
--disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
--disable-vstream disable TiVo vstream client support [autodetect]
--disable-pthreads disable Posix threads support [autodetect]
--disable-libass disable subtitle rendering with libass [autodetect]
--disable-libass-osd disable OSD rendering with libass [autodetect]
@ -478,7 +477,6 @@ _macosx_bundle=auto
_enca=auto
_inet6=auto
_gethostbyname2=auto
_vstream=auto
_pthreads=auto
_ass=auto
_libass_osd=auto
@ -680,8 +678,6 @@ for ac_option do
--disable-shm) _shm=no ;;
--enable-select) _select=yes ;;
--disable-select) _select=no ;;
--enable-vstream) _vstream=yes ;;
--disable-vstream) _vstream=no ;;
--enable-pthreads) _pthreads=yes ;;
--disable-pthreads) _pthreads=no ;;
--enable-libass) _ass=yes ;;
@ -2833,27 +2829,6 @@ fi
echores "$_pvr"
echocheck "vstream client"
if test "$_vstream" = auto ; then
_vstream=no
cat > $TMPC <<EOF
#include <vstream-client.h>
void vstream_error(const char *format, ... ) {}
int main(void) { vstream_start(); return 0; }
EOF
cc_check -lvstream-client && _vstream=yes
fi
if test "$_vstream" = yes ; then
def_vstream='#define CONFIG_VSTREAM 1'
inputmodules="vstream $inputmodules"
libs_mplayer="$libs_mplayer -lvstream-client"
else
noinputmodules="vstream $noinputmodules"
def_vstream='#undef CONFIG_VSTREAM'
fi
echores "$_vstream"
echocheck "encoding"
if test "$_encoding" = yes ; then
def_encoding="#define CONFIG_ENCODING 1"
@ -3054,7 +3029,6 @@ TV = $_tv
TV_V4L2 = $_tv_v4l2
VCD = $_vcd
VDPAU = $_vdpau
VSTREAM = $_vstream
X11 = $_x11
WAYLAND = $_wayland
XV = $_xv
@ -3226,7 +3200,6 @@ $def_smb
$def_libquvi4
$def_libquvi9
$def_libguess
$def_vstream
$def_lcms2

View File

@ -53,8 +53,4 @@ cd_track_t* cd_info_get_track(cd_info_t *cd_info, unsigned int track_nb);
void cd_info_debug(cd_info_t *cd_info);
int cdd_identify(const char *dev);
int cddb_resolve(const char *dev, char **xmcd_file);
cd_info_t* cddb_parse_xmcd(char *xmcd_file);
#endif /* MPLAYER_CDD_H */

View File

@ -313,7 +313,7 @@ const stream_info_t stream_info_ffmpeg = {
"",
open_f,
{ "lavf", "ffmpeg", "rtmp", "rtsp", "http", "https", "mms", "mmst", "mmsh",
"mmshttp", "udp", "ftp", NULL },
"mmshttp", "udp", "ftp", "rtp", "httpproxy", NULL },
NULL,
1 // Urls are an option string
};

View File

@ -1,177 +0,0 @@
/*
* Copyright (C) Joey Parrish
*
* 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.
*/
/*
* If you have a tivo with the vstream server installed, (and most tivo
* hackers do,) then you can connect to it and stream ty files using
* this module. The url syntax is tivo://host/fsid or tivo://host/list
* to list the available recordings and their fsid's.
* This module depends on libvstream-client, which is available from
* http://armory.nicewarrior.org/projects/vstream-client .
*
*/
#include "config.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <errno.h>
#include "core/mp_msg.h"
#include "stream.h"
#include "core/m_option.h"
#include "core/m_struct.h"
#include "tcp.h"
#include <vstream-client.h>
void vstream_error(const char *format, ...) {
char buf[1024];
va_list va;
va_start(va, format);
vsnprintf(buf, 1024, format, va);
va_end(va);
mp_msg(MSGT_STREAM, MSGL_ERR, "%s", buf);
}
static struct stream_priv_s {
char* host;
char* fsid;
} stream_priv_dflts = {
NULL,
NULL
};
#define ST_OFF(f) M_ST_OFF(struct stream_priv_s,f)
/// URL definition
static const m_option_t stream_opts_fields[] = {
{"hostname", ST_OFF(host), CONF_TYPE_STRING, 0, 0 ,0, NULL},
{"filename", ST_OFF(fsid), CONF_TYPE_STRING, 0, 0 ,0, NULL},
{ NULL, NULL, 0, 0, 0, 0, NULL }
};
static const struct m_struct_st stream_opts = {
"vstream",
sizeof(struct stream_priv_s),
&stream_priv_dflts,
stream_opts_fields
};
static int fill_buffer(stream_t *s, char* buffer, int max_len){
struct stream_priv_s* p = (struct stream_priv_s*)s->priv;
int len = vstream_load_chunk(p->fsid, buffer, max_len, s->pos);
if (len <= 0) return 0;
return len;
}
static int seek(stream_t *s,int64_t newpos) {
s->pos = newpos;
return 1;
}
static int control(struct stream *s, int cmd, void *arg) {
return STREAM_UNSUPPORTED;
}
static void close_s(struct stream *s) {
}
static int open_s(stream_t *stream, int mode, void* opts, int* file_format) {
int f;
struct stream_priv_s* p = (struct stream_priv_s*)opts;
if(mode != STREAM_READ)
return STREAM_UNSUPPORTED;
if(!p->host) {
mp_msg(MSGT_OPEN, MSGL_ERR, "We need a host name (ex: tivo://hostname/fsid)\n");
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
if(!p->fsid || strlen(p->fsid) == 0) {
mp_msg(MSGT_OPEN, MSGL_ERR, "We need an fsid (ex: tivo://hostname/fsid)\n");
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
f = connect2Server(p->host, VSERVER_PORT, 1);
if(f < 0) {
mp_msg(MSGT_OPEN, MSGL_ERR, "Connection to %s failed\n", p->host);
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
stream->fd = f;
vstream_set_socket_fd(f);
if (!strcmp(p->fsid, "list")) {
vstream_list_streams(0);
return STREAM_ERROR;
} else if (!strcmp(p->fsid, "llist")) {
vstream_list_streams(1);
return STREAM_ERROR;
}
if (vstream_start()) {
mp_msg(MSGT_OPEN, MSGL_ERR, "Cryptic internal error #1\n");
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
if (vstream_startstream(p->fsid)) {
mp_msg(MSGT_OPEN, MSGL_ERR, "Cryptic internal error #2\n");
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
stream->start_pos = 0;
stream->end_pos = vstream_streamsize();
mp_msg(MSGT_OPEN, MSGL_DBG2, "Tivo stream size is %lld\n",
(long long)stream->end_pos);
stream->priv = p;
stream->fill_buffer = fill_buffer;
stream->control = control;
stream->seek = seek;
stream->close = close_s;
stream->type = STREAMTYPE_VSTREAM;
return STREAM_OK;
}
const stream_info_t stream_info_vstream = {
"vstream client",
"vstream",
"Joey",
"",
open_s,
{ "tivo", NULL },
&stream_opts,
1 // Url is an option string
};