aboutsummaryrefslogtreecommitdiffstats
path: root/libdash/source/mpd/SegmentURL.h
blob: 7dfdb56ba2f5799d2e52e478b284c0e3a764fa15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * SegmentURL.h
 *****************************************************************************
 * Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
 *
 * Email: libdash-dev@vicky.bitmovin.net
 *
 * This source code and its use and distribution, is subject to the terms
 * and conditions of the applicable license agreement.
 *****************************************************************************/

#ifndef SEGMENTURL_H_
#define SEGMENTURL_H_

#include "config.h"

#include "ISegmentURL.h"
#include "../helpers/Path.h"
#include "Segment.h"
#include "AbstractMPDElement.h"

namespace dash
{
    namespace mpd
    {
        class SegmentURL : public ISegmentURL, public AbstractMPDElement
        {
            public:
                SegmentURL         ();
                virtual ~SegmentURL();

                const std::string&  GetMediaURI     ()  const;
                const std::string&  GetMediaRange   ()  const;
                const std::string&  GetIndexURI     ()  const;
                const std::string&  GetIndexRange   ()  const;
                uint64_t					GetActualRate	();

                ISegment*           ToMediaSegment  (const std::vector<IBaseUrl *>& baseurls) const;
                ISegment*           ToIndexSegment  (const std::vector<IBaseUrl *>& baseurls) const;

                void    SetMediaURI     (const std::string& mediaURI);
                void    SetMediaRange   (const std::string& mediaRange);
                void    SetIndexURI     (const std::string& indexURI);
                void    SetIndexRange   (const std::string& indexRange);
                void	SetBitrate	(const std::string& bitrate);
            private:
                std::string mediaURI;
                std::string mediaRange;
                std::string indexURI;
                std::string indexRange;
                int			bitrate;
        };
    }
}

#endif /* SEGMENTURL_H_ */