[MPlayer-dev-eng] [PATCH] HTTP streaming over YouTube.com
Jonas Jermann
jjermann at gmx.net
Mon Aug 14 19:45:05 CEST 2006
Hi
On Mon, Aug 14, 2006 at 04:21:59PM +0200, Reimar Döffinger wrote:
> Hello,
> On Thu, Aug 10, 2006 at 11:07:40PM +0200, Benjamin Zores wrote:
> > YouTube provides videos under the following form :
> > http://www.youtube.com/watch?v=video_id
> >
> > which are HTML page that need to be parse to retrieve the hidden URL of the video.
>
> I really think this kind of code belongs in a web browser, not a movie
> player.
> But regardless of that, stream/http.c really has already so much stuff
> in it, and last but not least I don't think this belongs in the stream
> layer at all, but if anything should be a playlist parser, or is that
> not possible for some reason?
>
>
> > @@ -829,6 +832,7 @@
> > // Redirect
> > case 301: // Permanently
> > case 302: // Temporarily
> > + case 303: // See Other
> > // TODO: RFC 2616, recommand to detect infinite redirection loops
> > next_url = http_get_field( http_hdr, "Location" );
> > if( next_url!=NULL ) {
>
> This probably might be a good idea to apply separately though?
>
>
> > + /* check for a valid YouTube.com URL */
> > + if (!strstr(stream->url,URL_YOU_TUBE_WATCH))
> > + return STREAM_UNSUPORTED;
>
> And really, such a hack for one single web page? IMHO we should start
> that, after all there are billions of web pages, in a few years MPlayer
> would contain more URLs that code :-P
What about adding this (and similar unapplied) patch(es) somehwere on the
mplayer website or in a seperate repository, such that interested users
can apply and use it (them)?
Best Regards
Jonas Jermann
More information about the MPlayer-dev-eng
mailing list