HLSSegment.hpp 1.84 KB
Newer Older
1 2 3
/*
 * HLSSegment.hpp
 *****************************************************************************
4
 * Copyright (C) 2015 VideoLAN and VLC authors
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/
#ifndef HLSSEGMENT_HPP
#define HLSSEGMENT_HPP

23 24
#include "../../adaptive/playlist/Segment.h"
#include "../../adaptive/encryption/CommonEncryption.hpp"
25 26 27 28 29

namespace hls
{
    namespace playlist
    {
30
        using namespace adaptive;
31
        using namespace adaptive::playlist;
32
        using namespace adaptive::encryption;
33 34 35

        class HLSSegment : public Segment
        {
36 37
            friend class M3U8Parser;

38 39 40
            public:
                HLSSegment( ICanonicalUrl *parent, uint64_t sequence );
                virtual ~HLSSegment();
Steve Lhomme's avatar
Steve Lhomme committed
41
                vlc_tick_t getUTCTime() const;
42 43 44
                virtual int compare(ISegment *) const; /* reimpl */

            protected:
Steve Lhomme's avatar
Steve Lhomme committed
45
                vlc_tick_t utcTime;
46 47
                virtual bool prepareChunk(SharedResources *, SegmentChunk *,
                                          BaseRepresentation *); /* reimpl */
48 49 50 51 52 53
        };
    }
}


#endif // HLSSEGMENT_HPP