Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
6817842b
Commit
6817842b
authored
May 11, 2007
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
videoportals.c: Add support for Daily Motion URLs (the webpage's url).
parent
7e0be9b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
modules/demux/playlist/videoportals.c
modules/demux/playlist/videoportals.c
+29
-0
No files found.
modules/demux/playlist/videoportals.c
View file @
6817842b
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
*****************************************************************************/
*****************************************************************************/
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc_demux.h>
#include <vlc_demux.h>
#include <vlc_url.h>
#include <errno.h>
/* ENOMEM */
#include <errno.h>
/* ENOMEM */
#include "playlist.h"
#include "playlist.h"
...
@@ -52,6 +53,9 @@ int E_(Import_VideoPortal)( vlc_object_t *p_this )
...
@@ -52,6 +53,9 @@ int E_(Import_VideoPortal)( vlc_object_t *p_this )
char
*
psz_cur
;
char
*
psz_cur
;
char
*
psz_url
=
NULL
;
char
*
psz_url
=
NULL
;
byte_t
*
p_peek
;
int
i_peek
;
/* YouTube */
/* YouTube */
if
(
(
psz_cur
=
strstr
(
psz_path
,
"youtube.com"
)
)
)
if
(
(
psz_cur
=
strstr
(
psz_path
,
"youtube.com"
)
)
)
{
{
...
@@ -88,6 +92,31 @@ int E_(Import_VideoPortal)( vlc_object_t *p_this )
...
@@ -88,6 +92,31 @@ int E_(Import_VideoPortal)( vlc_object_t *p_this )
}
}
}
}
}
}
/* Daily motion */
else
if
(
(
psz_cur
=
strstr
(
psz_path
,
"dailymotion.com"
)
)
)
{
i_peek
=
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
strlen
(
"<!DOCTYPE"
)
);
if
(
!
strncmp
(
(
char
*
)
p_peek
,
"<!DOCTYPE"
,
strlen
(
"!<DOCTYPE"
)
)
)
{
/* This looks like a (daily motion) webpage */
char
*
psz_line
;
while
(
(
psz_line
=
stream_ReadLine
(
p_demux
->
s
)
)
)
{
if
(
(
psz_cur
=
strstr
(
psz_line
,
"param name=
\"
flashvars
\"
value=
\"
url="
)
)
)
{
char
*
psz_tmp
;
psz_cur
+=
strlen
(
"param name=
\"
flashvars
\"
value=
\"
url="
);
psz_tmp
=
strchr
(
psz_cur
,
'&'
);
*
psz_tmp
=
0
;
psz_url
=
strdup
(
psz_cur
);
decode_URI
(
psz_url
);
*
psz_tmp
=
'&'
;
break
;
}
}
}
}
if
(
!
psz_url
)
if
(
!
psz_url
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment