[vlc-devel] [Patches] Dash: mostly cosmetics

Hugo Beauzée-Luyssen beauze.h at gmail.com
Mon Nov 28 15:16:42 CET 2011


On Mon, Nov 28, 2011 at 3:12 PM, Hugo Beauzée-Luyssen
<beauze.h at gmail.com> wrote:
> Hi,
>
> On Fri, Nov 25, 2011 at 7:03 PM, Tobias Güntner <fatbull at web.de> wrote:
>> Am 25.11.2011 16:30, schrieb Hugo Beauzée-Luyssen:
>>>
>>> I'll let you decide about "Removing EOFException"
>>
>> Even if you keep the EOFException, it might be a good idea to get rid of all
>> exception specifications. If something unexpected is thrown/propagated,
>> std::unexpected() will be called, which will terminate the program by
>> default. For example, getNextChunk() is declared as throw(EOFException), but
>> the std::vector<ISegment*> in there could throw std::bad_alloc. Of course
>> you have to actually catch those exceptions somewhere. ;)
>>
>
> I agree, but my plan was to remove all the exception, and therefore
> the exceptions specifications.
> Some of the exceptions are not caught, which reduces their use IMHO.
>
>>> +    if ( this->mpdManager == NULL || this->currentPeriod == NULL )
>>> +        return NULL;
>>
>> IMHO you should check this in the constructor and throw
>> std::invalid_argument instead.
>>
>
> Actually the mpdManager can't be NULL. I guess I'll add some checks to
> handle invalid profiles (the IMPDManager is instantiated according to
> the profile, in MPDManagerFactory.cpp)
> If there is no period, I don't think there's a point in getting a
> chunk... I'll check that too.
>
>>> +    delete this->adaptationLogic;
>>> +    delete this->mpdManager;
>>
>> This calls for some kind of auto_ptr. ;) The copy constructor and operator=
>> of DASHManager should be disabled as well (i.e., make them private).
>>
>
> I was planning on fixing this as a second pass, using -Weffc++
> Regarding the auto_ptr, why not, but I'm not that bothered by 2 deletes :p
>
>> Regards,
>> Tobias
>>

A new set of patches.
Names should be self explanatory.

Regards,

-- 
Hugo Beauzée-Luyssen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-dash-Chunk-Avoiding-copies-cosmetics.patch
Type: application/octet-stream
Size: 2598 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111128/caeced1f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-dash-Avoid-some-copies.patch
Type: application/octet-stream
Size: 2335 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111128/caeced1f/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-dash-Ignore-representations-without-valid-segments.patch
Type: application/octet-stream
Size: 1141 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111128/caeced1f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-dash-Segments-Avoid-copies-cosmetic.patch
Type: application/octet-stream
Size: 2604 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111128/caeced1f/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-dash-Fixing-a-crash-with-invalid-XML-documents.patch
Type: application/octet-stream
Size: 997 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111128/caeced1f/attachment-0004.obj>


More information about the vlc-devel mailing list