Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/VLC/modules/stream_out/hls/   (VLC Media Plyer ©)  Datei vom 23.9.2026 mit Größe 2 kB image not shown  

Quelle  storage.h   Sprache: C

 

/*****************************************************************************
 * storage.h
 *****************************************************************************
 * Copyright (C) 2023 VLC authors and VideoLAN
 *
 * 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 HLS_STORAGE_H
#define HLS_STORAGE_H

/**
 * Handy simple storage abstraction to allow seamless support of in-memory or
 * filesystem HLS segment/manifest storage.
 */


struct hls_storage_config
{
    const char *name;
    const char *mime;
};

typedef struct hls_storage
{
    const char *mime;
    /**
     * Get a copy of the whole storage content.
     *
     * \param[out] dest Pointer on a byte buffer, will be freshly allocated by
     * the function call. \return Byte count of the byte buffer. \retval -1 On
     * error.
     */

    ssize_t (*get_content)(const struct hls_storage *, uint8_t **dest);
} hls_storage_t;

/**
 * Create an HLS opaque storage from a chain of blocks.
 *
 * \note The returned storage must be destroyed with \ref hls_storage_Destroy.
 *
 * \param content The block chain.
 * \param hls_storage_config The storage specific config.
 * \param hls_config The global hls config.
 * \param[out] out The new storage on success.
 *
 * \retval 0 on success.
 * \retval -errno on error.
 */

int hls_storage_FromBlocks(block_t *content,
                           const struct hls_storage_config *,
                           const struct hls_config *,
                           hls_storage_t **out) VLC_USED;

/**
 * Create an HLS opaque storage from a byte buffer.
 *
 * \note The returned storage must be destroyed with \ref hls_storage_Destroy.
 *
 * \param data Pointer on the buffer.
 * \param size Byte size of the buffer.
 * \param hls_storage_config The storage specific config.
 * \param hls_config The global hls config.
 * \param[out] out The new storage on success.
 *
 * \retval 0 on success.
 * \retval -errno on error.
 */

int hls_storage_FromBytes(void *data,
                          size_t size,
                          const struct hls_storage_config *,
                          const struct hls_config *,
                          hls_storage_t **out) VLC_USED;

size_t hls_storage_GetSize(const hls_storage_t *);

void hls_storage_Destroy(hls_storage_t *);

#endif

Messung
CHZG
829410092

¤ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.