]> git.sesse.net Git - vlc/commitdiff
videoportals.c: Add support for google video (this sometimes fails ... the gvp vile...
authorAntoine Cellerier <dionoea@videolan.org>
Fri, 11 May 2007 23:33:58 +0000 (23:33 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Fri, 11 May 2007 23:33:58 +0000 (23:33 +0000)
modules/demux/playlist/videoportals.c

index 0d18d5dd788e9b8564a81ca97ae76fbf78037af5..ab1ab4a00e9ab61e4ec03bc8f3a74425c99677f6 100644 (file)
@@ -117,6 +117,20 @@ int E_(Import_VideoPortal)( vlc_object_t *p_this )
             }
         }
     }
+    /* Google video */
+    else if( ( psz_cur = strstr( psz_path, "video.google.com" ) )
+             && strstr( psz_cur, "videoplay" ) )
+    {
+        char *docid = strstr( psz_cur, "docid=" );
+        if( docid )
+        {
+            docid += strlen( "docid=" );
+            /* This doesn't always work ... */
+            asprintf( &psz_url,
+                      "http://video.google.com/videogvp?docid=%s",
+                      docid );
+        }
+    }
 
     if( !psz_url )
     {