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

Frédéric Yhuel yhuelf at gmail.com
Fri Sep 7 10:59:41 CEST 2012


On Thu, Sep 6, 2012 at 7:54 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> 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.
>

Ok thanks a lot for the review, I'll submit another patch taking
account of your comments, and with WMA2 support.

-- 
Frédéric



More information about the vlc-devel mailing list