[totem-pl-parser] Revert "Parse links to video websites"
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] Revert "Parse links to video websites"
- Date: Fri, 10 Dec 2010 20:31:12 +0000 (UTC)
commit 7b69a00ecab4c517f5dc3083fe70a2a73f527b4c
Author: Bastien Nocera <hadess hadess net>
Date: Fri Dec 10 20:30:26 2010 +0000
Revert "Parse links to video websites"
This reverts commit cd7fc1f7ad4a397bb37e7be735e81d4997ae3aa8.
Licensing issue not yet resolved upstream.
configure.in | 25 -------
plparse/Makefile.am | 2 -
plparse/plparser-mini.symbols | 1 -
plparse/plparser.symbols | 1 -
plparse/tests/parser.c | 20 -----
plparse/totem-pl-parser-mini.h | 2 -
plparse/totem-pl-parser-videosite.c | 136 -----------------------------------
plparse/totem-pl-parser-videosite.h | 49 -------------
plparse/totem-pl-parser.c | 42 -----------
9 files changed, 0 insertions(+), 278 deletions(-)
---
diff --git a/configure.in b/configure.in
index cf6044e..2cc69a6 100644
--- a/configure.in
+++ b/configure.in
@@ -100,25 +100,6 @@ else
**************************************************************"
fi
-enable_quvi=auto
-AC_ARG_ENABLE(enable-quvi,
- AS_HELP_STRING([--enable-quvi],
- [Enable libquvi support (default is auto).]),
- [enable_quvi=no],
- [enable_quvi=yes])
-if test "x$enable_quvi" != "xno" ; then
- PKG_CHECK_MODULES(QUVI,
- libquvi,
- [have_quvi=yes], [have_quvi=no])
- if test "x$enable_quvi" = "xyes" -a "x$have_quvi" = "xno" ; then
- AC_MSG_ERROR([Quvi support requested but not available.])
- fi
- if test "x$have_quvi" = "xyes" ; then
- pkg_modules="$pkg_modules libquvi"
- AC_DEFINE(HAVE_QUVI, 1, [libquvi available in the system])
- fi
-fi
-
dnl Check for packages for building libtotem-plparser.la
PKG_CHECK_MODULES(TOTEM_PLPARSER, [$pkg_modules])
AC_SUBST(TOTEM_PLPARSER_CFLAGS)
@@ -170,12 +151,6 @@ docs/reference/version.xml
AC_OUTPUT
-if test "x$have_quvi" = "xyes"; then
- AC_MSG_NOTICE([** Quvi video link parsing enabled])
-else
- AC_MSG_NOTICE([ Quvi video link parsing disabled])
-fi
-
echo "
$gmime_message
"
diff --git a/plparse/Makefile.am b/plparse/Makefile.am
index 8ef1233..ac4a18c 100644
--- a/plparse/Makefile.am
+++ b/plparse/Makefile.am
@@ -33,7 +33,6 @@ plparser_sources = \
totem-pl-parser-podcast.c \
totem-pl-parser-qt.c \
totem-pl-parser-smil.c \
- totem-pl-parser-videosite.c \
totem-pl-parser-wm.c \
totem-pl-parser-xspf.c
@@ -53,7 +52,6 @@ dist_libtotem_plparser_la_SOURCES = \
totem-pl-parser-private.h \
totem-pl-parser-qt.h \
totem-pl-parser-smil.h \
- totem-pl-parser-videosite.h \
totem-pl-parser-wm.h \
totem-pl-parser-xspf.h \
totem-pl-playlist.c \
diff --git a/plparse/plparser-mini.symbols b/plparse/plparser-mini.symbols
index 5a117a2..40de6c7 100644
--- a/plparse/plparser-mini.symbols
+++ b/plparse/plparser-mini.symbols
@@ -1,3 +1,2 @@
totem_pl_parser_can_parse_from_data
totem_pl_parser_can_parse_from_filename
-totem_pl_parser_can_parse_from_uri
diff --git a/plparse/plparser.symbols b/plparse/plparser.symbols
index bb51a43..ec58c94 100644
--- a/plparse/plparser.symbols
+++ b/plparse/plparser.symbols
@@ -10,7 +10,6 @@ totem_pl_parser_add_ignored_mimetype
totem_pl_parser_add_ignored_scheme
totem_pl_parser_can_parse_from_data
totem_pl_parser_can_parse_from_filename
-totem_pl_parser_can_parse_from_uri
totem_pl_parser_error_get_type
totem_pl_parser_error_quark
totem_pl_parser_get_type
diff --git a/plparse/tests/parser.c b/plparse/tests/parser.c
index d584200..a73c033 100644
--- a/plparse/tests/parser.c
+++ b/plparse/tests/parser.c
@@ -134,8 +134,6 @@ test_duration (void)
g_assert_cmpint (totem_pl_parser_parse_duration ("01:00:01.01", verbose), ==, 3601);
g_assert_cmpint (totem_pl_parser_parse_duration ("01:00.01", verbose), ==, 60);
g_assert_cmpint (totem_pl_parser_parse_duration ("24.59", verbose), ==, 1499);
- g_assert_cmpint (totem_pl_parser_parse_duration ("02m25s", verbose), ==, 145);
- g_assert_cmpint (totem_pl_parser_parse_duration ("2m25s", verbose), ==, 145);
}
static void
@@ -212,23 +210,6 @@ test_data_get_data (const char *uri, guint *len)
}
static void
-test_videosite (void)
-{
-#ifdef HAVE_QUVI
- guint i;
- const char *uris[] = {
- "http://www.youtube.com/watch?v=oMLCrzy9TEs",
- "http://www.youtu.be/oMLCrzy9TEs"
- };
-
- for (i = 0; i < G_N_ELEMENTS(uris); i++) {
- g_test_message ("Testing data parsing \"%s\"...", uris[i]);
- g_assert (totem_pl_parser_can_parse_from_uri (uris[i], TRUE));
- }
-#endif
-}
-
-static void
test_parsability (void)
{
guint i;
@@ -934,7 +915,6 @@ main (int argc, char *argv[])
g_test_add_func ("/parser/relative", test_relative);
g_test_add_func ("/parser/resolution", test_resolution);
g_test_add_func ("/parser/parsability", test_parsability);
- g_test_add_func ("/parser/videosite", test_videosite);
g_test_add_func ("/parser/parsing/hadess", test_parsing_hadess);
g_test_add_func ("/parser/parsing/nonexistent_files", test_parsing_nonexistent_files);
g_test_add_func ("/parser/parsing/broken_asx", test_parsing_broken_asx);
diff --git a/plparse/totem-pl-parser-mini.h b/plparse/totem-pl-parser-mini.h
index 9a19429..c1ec9e4 100644
--- a/plparse/totem-pl-parser-mini.h
+++ b/plparse/totem-pl-parser-mini.h
@@ -32,8 +32,6 @@ gboolean totem_pl_parser_can_parse_from_data (const char *data,
gboolean debug);
gboolean totem_pl_parser_can_parse_from_filename (const char *filename,
gboolean debug);
-gboolean totem_pl_parser_can_parse_from_uri (const char *uri,
- gboolean debug);
G_END_DECLS
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index c05475a..c8f577c 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -154,10 +154,6 @@
#include "totem-pl-parser-misc.h"
#include "totem-pl-parser-private.h"
-#ifdef HAVE_QUVI
-#include "totem-pl-parser-videosite.h"
-#endif
-
#define READ_CHUNK_SIZE 8192
#define RECURSE_LEVEL_MAX 4
@@ -1792,20 +1788,6 @@ totem_pl_parser_parse_internal (TotemPlParser *parser,
if (!parse_data->recurse && parse_data->recurse_level > 0)
return TOTEM_PL_PARSER_RESULT_UNHANDLED;
-#if HAVE_QUVI
- /* Should we try to parse it with quvi? */
- if (g_file_has_uri_scheme (file, "http")) {
- char *url;
- url = g_file_get_uri (file);
- if (url != NULL && totem_pl_parser_is_videosite (url, parser->priv->debug) != FALSE) {
- ret = totem_pl_parser_add_videosite (parser, file, base_file, parse_data, NULL);
- if (ret == TOTEM_PL_PARSER_RESULT_SUCCESS)
- return ret;
- }
- g_free (url);
- }
-#endif /* HAVE_QUVI */
-
/* In force mode we want to get the data */
if (parse_data->force != FALSE) {
mimetype = my_g_file_info_get_mime_type_with_data (file, &data, parser);
@@ -2271,11 +2253,6 @@ totem_pl_parser_parse_duration (const char *duration, gboolean debug)
D(g_print ("Used broken float format (00.00)\n"));
return minutes * 60 + seconds;
}
- /* YouTube format */
- if (sscanf (duration, "%dm%ds", &minutes, &seconds) == 2) {
- D(g_print ("Used YouTube format\n"));
- return minutes * 60 + seconds;
- }
/* PLS files format */
if (sscanf (duration, "%d", &seconds) == 1) {
D(g_print ("Used PLS format\n"));
@@ -2465,25 +2442,6 @@ totem_pl_parser_can_parse_from_filename (const char *filename, gboolean debug)
return retval;
}
-/**
- * totem_pl_parser_can_parse_from_uri:
- * @uri: the remote URI to check for parsability
- * @debug: %TRUE if debug statements should be printed
- *
- * Checks if the remote URI can be parsed. Note that this does
- * not actually try to open the remote URI, or deduce its content-type
- * from its filename, as this would bring too many false positives.
- *
- * Return value: %TRUE if @uri could be parsed
- *
- * Since: 2.30.3
- **/
-gboolean
-totem_pl_parser_can_parse_from_uri (const char *uri, gboolean debug)
-{
- return totem_pl_parser_is_videosite (uri, debug);
-}
-
#ifndef TOTEM_PL_PARSER_MINI
GType
totem_pl_parser_metadata_get_type (void)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]