[vlc-devel] [PATCH] Add Smooth Streaming stream_filter module
Ilkka Ollakka
ileoo at videolan.org
Mon Mar 19 09:06:33 CET 2012
On Fri, Mar 16, 2012 at 03:25:09PM +0100, Frédéric Yhuel wrote:
> Not clean yet, I provide it for reviewers to test my fMP4 patch, and for
> people interested in Smooth Streaming. Comments and patches welcome!
Hi,
Seems that VOD tries to download all the segments before it even starts
to play anything. And actually for me that VOD-link didn't start playing
even when it stopped loading segments.
> ***** VOD *****
> - http://demo.anevia.com:3130/html/player/smooth/vod/content1.ism/Manifest
> +
> + /* remove the last part of the url */
> + char *inv = inverse_string( uri );
> + char *tmp = strtok( inv, "/" );
> + tmp = strtok( NULL, "" );
> + p_sys->base_url = inverse_string( tmp );
strrchr and adding '\0' ?
> + msg_Dbg( s, "pos is %"PRIu64", boffset is %"PRIu64"", pos, p_sys->playback.boffset );
> + assert( pos >= p_sys->playback.boffset );
> + int len = pos - p_sys->playback.boffset;
> + int skipped = Read( s, NULL, len);
> + if( skipped == len )
> + goto success;
> + }
Couldn't you skip goto success just by placing that code before fail:
and using break?
> +
> +fail:
> + msg_Warn( s, "segment_Seek failed, maybe not enough dld chunks");
> + return VLC_EGENERIC;
> +
> +success:
> + segment = get_segment( s, p_sys->playback.index, false );
> + if( segment == NULL )
> + return VLC_EGENERIC;
> + msg_Dbg( s, "Seek successful! We are now at segment %"PRIu32" quality \
> +%"PRIu64", offset %"PRIu64" + %i", segment->sequence,
> +segment->bandwidth, segment->offset, segment->read_pos );
> + msg_Info( s, "(segment size is %"PRIu64")", segment->size );
> + return VLC_SUCCESS;
> +}
> +static char *inverse_string( const char *str )
> +{
> + size_t len = strlen( str );
> + char *ret = (char *)malloc( len+1 );
> + for( unsigned int i = 0; i < len; i++ )
> + ret[i] = str[len-i-1];
> + ret[len] = '\0';
> + return ret;
> +}
Don't think this function is actually needed
--
Ilkka Ollakka
They're only trying to make me LOOK paranoid!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120319/93352dbf/attachment.sig>
More information about the vlc-devel
mailing list