[vlc-devel] [PATCH 2/2] Add Smooth Streaming module

Jean-Baptiste Kempf jb at videolan.org
Thu Sep 6 19:54:54 CEST 2012


On Thu, Sep 06, 2012 at 11:38:55AM +0200, Frédéric Yhuel wrote :
> +    bool disable_audio = var_InheritBool( s, "smooth-disable-audio" );

Why another variable?

> +static int   Read( stream_t *, void *, unsigned );
> +static int   Peek( stream_t *, const uint8_t **, unsigned );
> +static int   Control( stream_t *, int , va_list );
> +
> +static bool isSmoothStreaming( stream_t *s )
> +{
> +    const uint8_t *peek;
> +    char *peeked = malloc( 512 );

Malloc it later, when you need it.

> +#if 0
> +static void print_chunk( stream_t *s, chunk_t *ck )
use ifndef NDEBUG

> +/* Not being able to distinguish between a time seek and a byte seek is
> + * annoying. However, if FAKE_STREAM_SIZE is small enough, say 1000,
> + * then we can reasonably assume that pos > 1000 means that the demux
> + * wants to *byte* seek. This is important because if we treat a time seek
> + * as a byte seek, then the demux would get bytes of the current chunk, during
> + * the next call to Peek() or Read(), instead of a new initialization chunk,
> + * followed by the new downloaded chunks, as it is normally the case for a time
> + * seek. And that would result in a bug */

What?

> +typedef struct quality_level_s
> +{

> +    char            *CodecPrivateData; /* hex encoded string */
> +    unsigned        id;

switch those 2.

Best regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list