VLC 4.0.0-dev
Loading...
Searching...
No Matches
libvlc_downloader.h File Reference

LibVLC downloader API. More...

Include dependency graph for libvlc_downloader.h:

Go to the source code of this file.

Data Structures

struct  libvlc_downloader_cbs
 Downloader callbacks. More...
struct  libvlc_downloader_request_t
 struct defining a downloader request More...
struct  libvlc_downloader_cfg
 struct defining downloader configuration More...

Macros

#define LIBVLC_DOWNLOADER_CB_ERROR   ((ptrdiff_t)-1)
 Sentinel return value to signal an error in the download (to be returned by on_buffer callback).
#define LIBVLC_DOWNLOADER_CB_CANCEL   ((ptrdiff_t)-2)
 Sentinel return value to cancel the download (to be returned by on_buffer callback).

Typedefs

typedef struct libvlc_downloader_t libvlc_downloader_t
typedef struct libvlc_downloader_request_t libvlc_downloader_request_t
 A downloader request object.
typedef struct libvlc_downloader_task libvlc_downloader_task
 Opaque handle of a downloader task.
typedef enum libvlc_downloader_status_t libvlc_downloader_status_t
 Downloader status.

Enumerations

enum  libvlc_downloader_status_t {
  libvlc_downloader_status_pending , libvlc_downloader_status_running , libvlc_downloader_status_paused , libvlc_downloader_status_finished ,
  libvlc_downloader_status_cancelled , libvlc_downloader_status_error
}
 Downloader status. More...

Functions

libvlc_downloader_t * libvlc_downloader_new (libvlc_instance_t *inst, const struct libvlc_downloader_cfg *cfg)
 Create a downloader instance.
libvlc_downloader_task * libvlc_downloader_queue (libvlc_downloader_t *downloader, const libvlc_downloader_request_t *req, const struct libvlc_downloader_cbs *cbs, void *cbs_opaque)
 Download a media asynchronously.
size_t libvlc_downloader_cancel (libvlc_downloader_t *downloader, libvlc_downloader_task *task)
 Cancel an ongoing download.
void libvlc_downloader_set_pause (libvlc_downloader_t *downloader, libvlc_downloader_task *task, bool paused)
 Toggle pause/resume for the download.
void libvlc_downloader_destroy (libvlc_downloader_t *downloader)
 Destroy a downloader and free resources.
libvlc_media_t * libvlc_downloader_task_get_media (libvlc_downloader_task *task)
 Get the media associated with the downloader request handle.
void libvlc_downloader_task_release (libvlc_downloader_task *task)
 Release a downloader task handle.

Detailed Description

LibVLC downloader API.