[vlc-devel] [PATCH 1/3] hls: Support encryption
Hugo Beauzée-Luyssen
beauze.h at gmail.com
Mon Jan 23 16:57:24 CET 2012
On Mon, Jan 23, 2012 at 4:15 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> On Fri, Jan 20, 2012 at 04:04:15PM +0100, Hugo Beauzée-Luyssen wrote :
>> --- a/modules/stream_filter/Modules.am
>> +++ b/modules/stream_filter/Modules.am
>> @@ -2,12 +2,19 @@ SUBDIRS = dash
>>
>> SOURCES_decomp = decomp.c
>> SOURCES_stream_filter_record = record.c
>> -SOURCES_stream_filter_httplive = httplive.c
>>
>> libvlc_LTLIBRARIES += \
>> libstream_filter_record_plugin.la \
>> - libstream_filter_httplive_plugin.la \
>> $(NULL)
>> +
>> +if HAVE_GCRYPT
>> +libstream_filter_httplive_plugin_la_SOURCES = httplive.c
>> +libstream_filter_httplive_plugin_la_CFLAGS = $(AM_CFLAGS) $(GCRYPT_CFLAGS)
>> +libstream_filter_httplive_plugin_la_LIBADD = $(AM_LIBADD) $(GCRYPT_LIBS)
>> +libstream_filter_httplive_plugin_la_DEPENDENCIES =
>> +libvlc_LTLIBRARIES += libstream_filter_httplive_plugin.la
>> +endif
>> +
>> if !HAVE_WIN32
>> if !HAVE_WINCE
>> libvlc_LTLIBRARIES += libdecomp_plugin.la
>
> OK.
>
>> + char *psz_current_key_path; /* URL path of the encrypted key */
> No tabs, please.
>
>> + /* Url is put between quotes, remove them */
>> + if (*value == '"')
>> + {
>> + /* We need to strip the "" from the attribute value */
>> + unsigned int i;
>> + uri = value + 1;
>> + for ( i=0; i < strlen(uri); i++ )
> declare i in the for
>
>> + {
>> + if (uri[i] == '"')
>> + {
>> + uri[i] = 0;
>> + break;
>> + }
>> + }
>
> Isn't this strchr on uri ?
>
>> - if (hls->version != 1)
>> + if (hls->version < 0 || hls->version > 3)
> =< 0, I think
>
>> +static int hls_DecodeSegmentData(stream_t *s, hls_stream_t *hls, segment_t *segment)
>
>> +
>> +
>> +
>> +
>> +
>
> That many ? :)
>
>> - if (p == NULL) return VLC_EGENERIC;
>> + if ( p == NULL )
>> + return VLC_EGENERIC;
>
> Unrelated, I think... and weird.
>
>> + vlc_mutex_lock(&segment->lock);
>> +
>> assert(p->url.psz_path);
>> assert(segment->url.psz_path);
>>
>> - vlc_mutex_lock(&segment->lock);
>> -
>
> Unrelated, but OK.
>
>> + vlc_mutex_unlock(&segment->lock);
> idem.
>
>> -static int Download(stream_t *s, hls_stream_t *hls, segment_t *segment, int *cur_stream)
>> +static int hls_DownloadSegmentData(stream_t *s, hls_stream_t *hls, segment_t *segment, int *cur_stream)
>
> Unrelated to this patch
>
>
> Best regards,
>
As I was saying in another (completely related) thread, here it is,
fixed and split.
Regards,
--
Hugo Beauzée-Luyssen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hls-Support-encryption.patch
Type: application/octet-stream
Size: 15660 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120123/025c0768/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-hls-Renaming-Download-to-hls_DownloadSegmentData.patch
Type: application/octet-stream
Size: 1853 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120123/025c0768/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-hls-Fixing-some-locks.patch
Type: application/octet-stream
Size: 1947 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120123/025c0768/attachment-0002.obj>
More information about the vlc-devel
mailing list