author | harlekin <harlekin> | 2002-04-22 22:05:28 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-04-22 22:05:28 (UTC) |
commit | 1ce5e1128e3c062d45e6dcfbcda20f195b4d5b13 (patch) (unidiff) | |
tree | 81303ba33d6f6aa7e56b9ea6ff6d85a7a894ede0 /core/multimedia/opieplayer/libmad/libmadplugin.cpp | |
parent | f77f012023dbe7582a4b4297f61c6521ad8a3aa5 (diff) | |
download | opie-1ce5e1128e3c062d45e6dcfbcda20f195b4d5b13.zip opie-1ce5e1128e3c062d45e6dcfbcda20f195b4d5b13.tar.gz opie-1ce5e1128e3c062d45e6dcfbcda20f195b4d5b13.tar.bz2 |
more updates for shoutcast
Diffstat (limited to 'core/multimedia/opieplayer/libmad/libmadplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadplugin.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.cpp b/core/multimedia/opieplayer/libmad/libmadplugin.cpp index 0f952f4..8b692ef 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.cpp +++ b/core/multimedia/opieplayer/libmad/libmadplugin.cpp | |||
@@ -312,3 +312,3 @@ int LibMadPlugin::http_open(const QString& path ) { | |||
312 | char filename[PATH_MAX]; | 312 | char filename[PATH_MAX]; |
313 | char c; | 313 | //char c; |
314 | char *arg =strdup(path.latin1()); | 314 | char *arg =strdup(path.latin1()); |
@@ -374,3 +374,2 @@ int LibMadPlugin::http_open(const QString& path ) { | |||
374 | QString message = tr("Info: "); | 374 | QString message = tr("Info: "); |
375 | |||
376 | do { | 375 | do { |
@@ -382,3 +381,3 @@ int LibMadPlugin::http_open(const QString& path ) { | |||
382 | if (len == -1) { | 381 | if (len == -1) { |
383 | fprintf(stderr, "http_open: %s\n", strerror(errno)); | 382 | qDebug( "http_open: "+ QString(strerror(errno)) +"\n"); |
384 | return 0; | 383 | return 0; |
@@ -386,8 +385,6 @@ int LibMadPlugin::http_open(const QString& path ) { | |||
386 | 385 | ||
387 | if (strncmp(http_request, "Location:", 9) == 0) { | 386 | if (QString(http_request).left(9) == "Location:") { |
388 | /* redirect */ | 387 | /* redirect */ |
389 | std::close(tcp_sock); | 388 | std::close(tcp_sock); |
390 | |||
391 | http_request[strlen(http_request) - 1] = '\0'; | 389 | http_request[strlen(http_request) - 1] = '\0'; |
392 | |||
393 | return http_open(&http_request[10]); | 390 | return http_open(&http_request[10]); |
@@ -395,9 +392,9 @@ int LibMadPlugin::http_open(const QString& path ) { | |||
395 | 392 | ||
396 | if (strncmp(http_request, "ICY ", 4) == 0) { | 393 | if (QString(http_request).left(4) == "ICY ") { |
397 | /* This is icecast streaming */ | 394 | /* This is shoutcast/icecast streaming */ |
398 | if (strncmp(http_request + 4, "200 ", 4)) { | 395 | if (strncmp(http_request + 4, "200 ", 4)) { |
399 | fprintf(stderr, "http_open: %s\n", http_request); | 396 | qDebug("http_open: " + QString(http_request) + "\n"); |
400 | return 0; | 397 | return 0; |
401 | } | 398 | } |
402 | } else if (strncmp(http_request, "icy-", 4) == 0) { | 399 | } else if (QString(http_request).left(4) == "icy-") { |
403 | /* we can have: icy-noticeX, icy-name, icy-genre, icy-url, icy-pub, icy-metaint, icy-br */ | 400 | /* we can have: icy-noticeX, icy-name, icy-genre, icy-url, icy-pub, icy-metaint, icy-br */ |