StreamFormat.hpp 1.86 KB
Newer Older
1 2 3
/*
 * StreamFormat.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 STREAMFORMAT_HPP
#define STREAMFORMAT_HPP

23 24
#include <string>

25
namespace adaptive
26 27 28 29 30 31
{

    class StreamFormat
    {
        public:
            static const unsigned UNSUPPORTED = 0;
32 33 34 35 36 37
            static const unsigned MPEG2TS     = 1;
            static const unsigned MP4         = 2;
            static const unsigned WEBVTT      = 3;
            static const unsigned TTML        = 4;
            static const unsigned PACKEDAAC   = 5;
            static const unsigned UNKNOWN     = 0xFF; /* will probe */
38

39
            StreamFormat( unsigned = UNSUPPORTED );
40
            explicit StreamFormat( const std::string &mime );
41 42
            ~StreamFormat();
            operator unsigned() const;
43
            std::string str() const;
44
            bool operator==(const StreamFormat &) const;
45
            bool operator!=(const StreamFormat &) const;
46 47 48 49 50 51 52 53

        private:
            unsigned formatid;
    };

}

#endif // STREAMFORMAT_HPP