StructuresCX.hpp 6.04 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*****************************************************************************
* StructuresCX.hpp: LibVLC++ structures
*****************************************************************************
* Copyright  2014 the VideoLAN team
*
* Authors: Hugo Beauze-Luyssen <hugo@beauzee.fr>
*
* 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.
*****************************************************************************/

#pragma once

25
#include <vlcpp/vlc.hpp>
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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
#include "Helpers.h"

namespace libVLCX
{
    public ref class ModuleDescription sealed
    {
    public:
        Platform::String^ name();
        Platform::String^ shortname();
        Platform::String^ longname();
        Platform::String^ help();

    internal:
        explicit ModuleDescription(const VLC::ModuleDescription& desc);

    private:
        Platform::String^ m_name;
        Platform::String^ m_shortname;
        Platform::String^ m_longname;
        Platform::String^ m_help;
    };


    public enum class TrackType
    {
        Unknown = -1,
        Audio,
        Video,
        Subtitle
    };

    public ref class MediaTrack sealed
    {
    public:
        uint32_t codec();
        uint32_t originalFourCC();
        int32_t id();
        TrackType type();
        int32_t profile();
        int32_t level();
        uint32_t bitrate();
        Platform::String^ language();
        Platform::String^ description();
        // Audio specific
        uint32_t channels();
        uint32_t rate();
        // Video specific
        uint32_t height();
        uint32_t width();
        uint32_t sarNum();
        uint32_t sarDen();
        uint32_t fpsNum();
        uint32_t fpsDen();
        // Subtitles specific
        Platform::String^ encoding();

    internal:
        explicit MediaTrack(const VLC::MediaTrack& track);

    private:
        uint32_t m_codec;
        uint32_t m_originalFourcc;
        uint32_t m_id;
        TrackType m_type;
        int32_t m_profile;
        int32_t m_level;
        uint32_t m_bitrate;
        Platform::String^ m_language;
        Platform::String^ m_description;
        // Audio
        uint32_t m_channels;
        uint32_t m_rate;
        // Video
        uint32_t m_height;
        uint32_t m_width;
        uint32_t m_sarNum;
        uint32_t m_sarDen;
        uint32_t m_fpsNum;
        uint32_t m_fpsDen;
        // Subtitles
        Platform::String^ m_encoding;
    };


    public ref class AudioOutputDescription sealed
    {
    public:
        Platform::String^ name();
        Platform::String^ description();

    internal:
        AudioOutputDescription(const VLC::AudioOutputDescription& desc);

    private:
        Platform::String^ m_name;
        Platform::String^ m_description;
    };

    public ref class AudioOutputDeviceDescription sealed
    {
    public:
        /**< Device identifier string */
        Platform::String^ device();
        /**< User-friendly device description */
        Platform::String^ description();

    internal:
        explicit AudioOutputDeviceDescription(const VLC::AudioOutputDeviceDescription& desc);

    private:
        Platform::String^ m_device;
        Platform::String^ m_description;
    };

    public ref class TrackDescription sealed
    {
    public:
        int id();
        Platform::String^ name();

    internal:
        explicit TrackDescription(const VLC::TrackDescription& desc);

    private:
        int m_id;
        Platform::String^ m_name;
    };
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191




    public ref class TitleDescription sealed
    {
        public:
            int64_t duration();
            int id();
            Platform::String^ name();
            bool isMenu();

        internal:
            explicit TitleDescription(const VLC::TitleDescription& desc);

        private:
            int m_id;
            Platform::String^ m_name;
            int64_t m_duration;
            bool m_menu;
    };

    public ref class ChapterDescription sealed
    {
        public:
            int id();
            int64_t startTime();
            int64_t duration();
            Platform::String^ name();

        internal:
            explicit ChapterDescription(const VLC::ChapterDescription& desc);

        private:
            int m_id;
            Platform::String^ m_name;
            int64_t m_duration;
            int64_t m_startTime;
    };
192

193 194 195 196 197 198
    public enum class SlaveType
    {
        Subtitle = VLC::MediaSlave::Type::Subtitle,
        Audio = VLC::MediaSlave::Type::Audio,
    };

199 200 201 202 203 204 205 206 207 208
    public ref class MediaSlave sealed
    {
    private:
        VLC::MediaSlave m_obj;
        Platform::String ^m_uri;

    internal:
        explicit MediaSlave(const VLC::MediaSlave& slave);

    public:
209 210 211
        SlaveType type();
        unsigned priority();
        Platform::String^ uri();
212
    };
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235

    public enum class MediaDiscovererCategory
    {
        Devices = VLC::MediaDiscoverer::Category::Devices,
        Lan = VLC::MediaDiscoverer::Category::Lan,
        Podcasts = VLC::MediaDiscoverer::Category::Podcasts,
        Localdirs = VLC::MediaDiscoverer::Category::Localdirs,
    };

    public ref class MediaDiscovererDescription sealed
    {
    public:
        Platform::String^ name();
        Platform::String^ longName();
        MediaDiscovererCategory category();
    internal:
        explicit MediaDiscovererDescription(const VLC::MediaDiscoverer::Description& desc);

    private:
        Platform::String^ m_name;
        Platform::String^ m_longName;
        MediaDiscovererCategory m_category;
    };
236
}