diff options
author | wm4 <wm4@nowhere> | 2013-07-07 19:40:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-07 19:42:38 +0200 |
commit | 854303ad49d188d96af8151b290162916c81c993 (patch) | |
tree | d47fc0ccd34adf47df7612c8b213d09b3816eae5 /stream/stream_cdda.c | |
parent | feaa721916303c36dcd676c11ac74ecdec2db006 (diff) | |
download | mpv-854303ad49d188d96af8151b290162916c81c993.tar.bz2 mpv-854303ad49d188d96af8151b290162916c81c993.tar.xz |
Remove internal network support
This commit removes the "old" networking code in favor of libavformat's
code.
The code was still used for mp_http, udp, ftp, cddb. http has been
mapped to libavformat's http support since approximately 6 months ago.
udp and ftp have support in ffmpeg (though ftp was added only last
month). cddb support is removed with this commit - it's probably not
important and rarely used if at all, so we don't care about it.
Diffstat (limited to 'stream/stream_cdda.c')
-rw-r--r-- | stream/stream_cdda.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index c19c71d64f..4e45e51a07 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -340,11 +340,10 @@ static int open_cdda(stream_t *st, int m, void *opts, int *file_format) int offset = p->toc_offset; cdrom_drive_t *cdd = NULL; cdda_priv *priv; - cd_info_t *cd_info, *cddb_info = NULL; + cd_info_t *cd_info; unsigned int audiolen = 0; int last_track; int i; - char *xmcd_file = NULL; if (m != STREAM_READ) { m_struct_free(&stream_opts, opts); @@ -358,18 +357,6 @@ static int open_cdda(stream_t *st, int m, void *opts, int *file_format) p->device = talloc_strdup(NULL, DEFAULT_CDROM_DEVICE); } -#ifdef CONFIG_CDDB - // cdd_identify returns -1 if it cannot read the TOC, - // in which case there is no point in calling cddb_resolve - if (cdd_identify(p->device) >= 0 && strncmp(st->url, "cddb", 4) == 0) { - i = cddb_resolve(p->device, &xmcd_file); - if (i == 0) { - cddb_info = cddb_parse_xmcd(xmcd_file); - free(xmcd_file); - } - } -#endif - #if defined(__NetBSD__) cdd = cdda_identify_scsi(p->device, p->device, 0, NULL); #else @@ -379,7 +366,6 @@ static int open_cdda(stream_t *st, int m, void *opts, int *file_format) if (!cdd) { mp_tmsg(MSGT_OPEN, MSGL_ERR, "Can't open CDDA device.\n"); m_struct_free(&stream_opts, opts); - free(cddb_info); return STREAM_ERROR; } @@ -392,7 +378,6 @@ static int open_cdda(stream_t *st, int m, void *opts, int *file_format) mp_tmsg(MSGT_OPEN, MSGL_ERR, "Can't open disc.\n"); cdda_close(cdd); m_struct_free(&stream_opts, opts); - free(cddb_info); return STREAM_ERROR; } @@ -455,7 +440,6 @@ static int open_cdda(stream_t *st, int m, void *opts, int *file_format) free(priv); cd_info_free(cd_info); m_struct_free(&stream_opts, opts); - free(cddb_info); return STREAM_ERROR; } @@ -484,14 +468,6 @@ static int open_cdda(stream_t *st, int m, void *opts, int *file_format) paranoia_seek(priv->cdp, priv->start_sector, SEEK_SET); priv->sector = priv->start_sector; -#ifdef CONFIG_CDDB - if (cddb_info) { - cd_info_free(cd_info); - priv->cd_info = cddb_info; - cd_info_debug(cddb_info); - } -#endif - st->priv = priv; st->start_pos = priv->start_sector * CDIO_CD_FRAMESIZE_RAW; st->end_pos = (priv->end_sector + 1) * CDIO_CD_FRAMESIZE_RAW; @@ -518,11 +494,7 @@ const stream_info_t stream_info_cdda = { "Albeu", "", open_cdda, - {"cdda", -#ifdef CONFIG_CDDB - "cddb", -#endif - NULL }, + {"cdda", NULL }, &stream_opts, .opts_url = 1, }; |