From: Jan Stary <hans@stare.cz>
To: sox-devel@lists.sourceforge.net
Subject: Re: playing remote files
Date: Tue, 26 Feb 2013 21:51:21 +0100 [thread overview]
Message-ID: <20130226205121.GA18890@www.stare.cz> (raw)
In-Reply-To: <CAGzDe_ZHtROxXqm_dpeGAMTUq6t9FeOwAgF7-Ocgwj1yhyn7Sg@mail.gmail.com>
On Feb 26 10:14:58, chris@cnpbagwell.com wrote:
> On Sat, Feb 23, 2013 at 9:29 AM, Jan Stary <hans@stare.cz> wrote:
>
> > Currently. sox uses wget(1) to access remote files and streams.
> > What is the developers' opinion about what do do with it
> > (if anything)?
> >
> > The obvious candidates are wget(1), ftp(1), curl(1) and libcurl(3).
> > What would be the pros and cons of each?
> >
> >
> > http://sourceforge.net/tracker/?func=detail&aid=1713308&group_id=10706&atid=360706
> >
> > (I am not sure if there are other entries in the tracker
> > related to this.)
> >
> > Jan
> >
> >
> Using libcurl is probably not going to go far for a while.
Do you silently imply that libcurl _would_ be the best solution?
What about curl(1)?
> Was it you that mentioned macport's has a patch to support BSD-like ftp
> in place of wget?
Yes (I maintain the macport and the OpenBSD port of SoX).
> Can you post patch to this list by chance?
This is how both the OpenBSD port and the macports
patches SoX 14.4.1:
--- src/formats.c.orig Sat Mar 24 06:29:07 2012
+++ src/formats.c Sat Mar 24 06:29:53 2012
@@ -348,7 +348,7 @@ static int sox_checkformat(sox_format_t * ft)
return SOX_SUCCESS;
}
-static sox_bool is_url(char const * text) /* detects only wget-supported URLs */
+static sox_bool is_url(char const * text)
{
return !(
strncasecmp(text, "http:" , (size_t)5) &&
@@ -385,7 +385,7 @@ static FILE * xfopen(char const * identifier, char con
else if (is_url(identifier)) {
FILE * f = NULL;
#ifdef HAVE_POPEN
- char const * const command_format = "wget --no-check-certificate -q -O- \"%s\"";
+ char const * const command_format = "ftp -a -V -o - \"%s\"";
char * command = lsx_malloc(strlen(command_format) + strlen(identifier));
sprintf(command, command_format, identifier);
f = popen(command, POPEN_MODE);
The point is that these system have a ftp(1) in their basic
install that can do "ftp -o", and wget is a needless dependency.
> I see no down side to optionally supporting ftp in SoX; in addition to wget.
Would ./configure be the proper place to make the decision?
What about curl(1)?
Jan
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
next prev parent reply other threads:[~2013-02-26 20:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-23 15:29 playing remote files Jan Stary
2013-02-26 16:14 ` Chris Bagwell
2013-02-26 19:22 ` Eric Wong
2013-02-26 20:52 ` Jan Stary
2013-02-26 20:51 ` Jan Stary [this message]
2013-02-26 23:18 ` Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130226205121.GA18890@www.stare.cz \
--to=sox-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).