[vlc-commits] lib: remove VLM API

Rémi Denis-Courmont git at videolan.org
Sun Jul 15 14:16:38 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 12 19:59:50 2018 +0300| [3de6692cea140be7c14eda74b34f8f076127c98e] | committer: Rémi Denis-Courmont

lib: remove VLM API

There does not appear to be any real user. The "broadcast"
functionality can be reproduced more simply with the LibVLC media
player API. The "VoD" functionality does not make much sense outside of
the VLC executable process.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3de6692cea140be7c14eda74b34f8f076127c98e
---

 doc/Makefile.am                |   1 -
 doc/libvlc/libvlc_DVD_ripper.c | 309 -----------------
 include/vlc/libvlc_events.h    |  19 --
 include/vlc/libvlc_vlm.h       | 342 -------------------
 include/vlc/vlc.h              |   1 -
 lib/Makefile.am                |   2 -
 lib/core.c                     |   4 -
 lib/libvlc.sym                 |  21 --
 lib/libvlc_internal.h          |   1 -
 lib/vlm.c                      | 744 -----------------------------------------
 po/POTFILES.in                 |   1 -
 src/test/headers.c             |   1 -
 12 files changed, 1446 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 2d29980361..e811961755 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,7 +2,6 @@ NULL =
 
 LIBVLC_SAMPLES = \
 	libvlc/gtk_player.c \
-	libvlc/libvlc_DVD_ripper.c \
 	libvlc/QtPlayer/LICENSE \
 	libvlc/QtPlayer/main.cpp \
 	libvlc/QtPlayer/player.cpp \
diff --git a/doc/libvlc/libvlc_DVD_ripper.c b/doc/libvlc/libvlc_DVD_ripper.c
deleted file mode 100644
index 7a6e778991..0000000000
--- a/doc/libvlc/libvlc_DVD_ripper.c
+++ /dev/null
@@ -1,309 +0,0 @@
-// gcc -o main main.c `pkg-config --cflags --libs gtk+-2.0 libvlc`
-
-/* Written by Vincent Schüßler */
-/* License WTFPL http://sam.zoy.org/wtfpl/ */
-
-#include <stdlib.h>
-#include <time.h>
-#include <string.h>
-#include <gtk/gtk.h>
-#include <vlc/vlc.h>
-
-#define PRESET_H264_AAC_MP4_HIGH "MP4 high (h.264 + AAC)"
-#define PRESET_H264_AAC_MP4_LOW "MP4 low (h.264 + AAC)"
-#define PRESET_THEORA_VORBIS_OGG_HIGH "OGG high (Theora + Vorbis)"
-#define PRESET_THEORA_VORBIS_OGG_LOW "OGG low (Theora + Vorbis)"
-#define PRESET_VP8_VORBIS_WEBM_HIGH "WebM high (VP8 + Vorbis)"
-#define PRESET_VP8_VORBIS_WEBM_LOW "WebM low (VP8 + Vorbis)"
-#define BORDER_WIDTH 6
-
-GtkWidget *window;
-GtkWidget *source_entry, *dest_entry;
-GtkWidget *progressbar;
-libvlc_instance_t *vlcinst;
-libvlc_media_list_t *medialist;
-GtkWidget *run_button, *format_chooser, *spinner;
-char stopped;
-
-gchar* get_filepath(GtkWidget* widget, GtkFileChooserAction action) {
-    GtkWidget *dialog;
-    gchar *path;
-    dialog = gtk_file_chooser_dialog_new("Choose location", GTK_WINDOW(gtk_widget_get_toplevel(widget)), action, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
-    if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
-        path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
-    }
-    else {
-        path = NULL;
-    }
-    gtk_widget_destroy(dialog);
-    return path;
-}
-
-void on_select_source_path(GtkWidget *widget, gpointer data) {
-    char *path;
-    char scheme[] = "file://";
-    char *uri;
-
-    if(data==NULL) {
-        path = (char*) get_filepath(widget, GTK_FILE_CHOOSER_ACTION_OPEN);
-    }
-    else {
-        path = (char*) get_filepath(widget, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-    }
-    if(path != NULL) {
-        uri = malloc((strlen(scheme)+strlen(path)+1) * sizeof(char));
-        if(uri == NULL) return;
-        uri[0] = '\0';
-        strncat(uri, scheme, strlen(scheme));
-        strncat(uri, path, strlen(path));
-        g_free(path);
-        
-        gtk_entry_set_text(GTK_ENTRY(source_entry), uri);
-        free(uri);
-    }
-}
-
-void on_select_dest_path(GtkWidget *widget, gpointer data) {
-    gchar *path;
-    path = get_filepath(widget, GTK_FILE_CHOOSER_ACTION_SAVE);
-    if(path != NULL) {
-        gtk_entry_set_text(GTK_ENTRY(dest_entry), path);
-        g_free(path);
-    }
-}
-
-char* get_pos_string(float pos) {
-    int len;
-    const char format[] = "%.3f %%";
-    char *pos_string;
-    pos *= 100;
-    len = snprintf(NULL, 0, format, pos);
-    pos_string = malloc(len);
-    if(pos_string==NULL) return NULL;
-    sprintf(pos_string, format, pos);
-    return pos_string;
-}
-
-gboolean update_progressbar(char *handle) {
-    float pos = libvlc_vlm_get_media_instance_position(vlcinst, handle, 0);
-    char *pos_string;
-    if(pos < 1.0 && 0.0 <= pos) {
-        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar), pos);
-        pos_string = get_pos_string(pos);
-        if(pos_string != NULL) {
-            gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progressbar), pos_string);
-            free(pos_string);
-        }
-        return TRUE;
-    }
-    if(stopped = 1) {
-        free(handle);
-        return FALSE;
-    }
-}
-
-const char* get_transcode_string(char *preset) {
-    static const char mp4_high[] = "#transcode{vcodec=h264,venc=x264{cfr=16},scale=1,acodec=mp4a,ab=160,channels=2,samplerate=44100}";
-    static const char mp4_low[] = "#transcode{vcodec=h264,venc=x264{cfr=40},scale=1,acodec=mp4a,ab=96,channels=2,samplerate=44100}";
-    static const char ogg_high[] = "#transcode{vcodec=theo,venc=theora{quality=9},scale=1,acodec=vorb,ab=160,channels=2,samplerate=44100}";
-    static const char ogg_low[] = "#transcode{vcodec=theo,venc=theora{quality=4},scale=1,acodec=vorb,ab=96,channels=2,samplerate=44100}";
-    static const char webm_high[] = "#transcode{vcodec=VP80,vb=2000,scale=1,acodec=vorb,ab=160,channels=2,samplerate=44100}";
-    static const char webm_low[] = "#transcode{vcodec=VP80,vb=1000,scale=1,acodec=vorb,ab=96,channels=2,samplerate=44100}";
-    static const char nothing[] = "";
-    if(0 == strcmp(preset, PRESET_H264_AAC_MP4_HIGH)) {
-        return mp4_high;
-    }
-    else if(0 == strcmp(preset, PRESET_H264_AAC_MP4_LOW)) {
-        return mp4_low;
-    }
-    else if(0 == strcmp(preset, PRESET_THEORA_VORBIS_OGG_HIGH)) {
-        return ogg_high;
-    }
-    else if(0 == strcmp(preset, PRESET_THEORA_VORBIS_OGG_LOW)) {
-        return ogg_low;
-    }
-    else if(0 == strcmp(preset, PRESET_VP8_VORBIS_WEBM_HIGH)) {
-        return webm_high;
-    }
-    else if(0 == strcmp(preset, PRESET_VP8_VORBIS_WEBM_LOW)) {
-        return webm_low;
-    }
-    else {
-        return nothing;
-    }
-}
-
-void on_run(GtkWidget *widget, gpointer data) {
-    char *handle;
-    const char *transcode;
-    char *source = (char*) gtk_entry_get_text(GTK_ENTRY(source_entry));
-    char *dest = (char*) gtk_entry_get_text(GTK_ENTRY(dest_entry));
-    char *preset= (char*) gtk_combo_box_get_active_text(GTK_COMBO_BOX(format_chooser));
-    int i;
-    char file_begin[] = ":file{dst=";
-    char file_end[] = "}";
-    char *sout;
-    if(preset == NULL) return;
-    gtk_widget_set_sensitive(widget, FALSE);
-    handle = malloc((strlen(source)+4+1) * sizeof(char));
-    if(handle == NULL) return;
-    strncpy(handle, source, strlen(source));
-    for(i=0;i<=3;++i) {
-        handle[strlen(source)+i] = (char) (((unsigned int) rand()) & 63) + '0';
-    }
-    handle[strlen(source)+4] = '\0';
-    transcode = get_transcode_string(preset);
-    free(preset);
-    sout = malloc((strlen(transcode)+strlen(file_begin)+strlen(dest)+strlen(file_end)+1) * sizeof(char));
-    if(sout == NULL) {
-        free(handle);
-        return;
-    }
-    strncpy(sout, transcode, strlen(transcode)+1);
-    strncat(sout, file_begin, strlen(file_begin));
-    strncat(sout, dest, strlen(dest));
-    strncat(sout, file_end, strlen(file_end));
-    libvlc_vlm_add_broadcast(vlcinst, handle, source, sout, 0, NULL, 1, 0);
-    free(sout);
-    libvlc_vlm_play_media(vlcinst, handle);
-    gtk_widget_show(spinner);
-    gtk_spinner_start(GTK_SPINNER(spinner));
-    stopped = 0;
-    g_timeout_add(50, (GSourceFunc) update_progressbar, handle);
-}
-
-void stop(void) {
-    stopped = 1;
-    gtk_spinner_stop(GTK_SPINNER(spinner));
-    gtk_widget_hide(spinner);
-    gtk_widget_set_sensitive(run_button, TRUE);
-    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar), 0.0);
-    gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progressbar), "");
-}
-
-gboolean on_end(void) {
-    GtkWidget *dialog;
-    stop();
-    dialog = gtk_message_dialog_new(GTK_WINDOW(window), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "Rip done");
-    gtk_dialog_run(GTK_DIALOG(dialog));
-    gtk_widget_destroy(dialog);
-    return FALSE;
-}
-
-void on_end_vlc(const libvlc_event_t *event, void *data) {
-    g_idle_add((GSourceFunc) on_end, NULL);
-}
-
-gboolean on_error(void) {
-    GtkWidget *dialog;
-    stop();
-    dialog = gtk_message_dialog_new(GTK_WINDOW(window), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error");gtk_dialog_run(GTK_DIALOG(dialog));
-    gtk_widget_destroy(dialog);
-    return FALSE;
-}
-
-void on_error_vlc(const libvlc_event_t *event, void *data) {
-    g_idle_add((GSourceFunc) on_error, NULL);
-}
-
-int main (int argc, char *argv[]) {
-    GtkWidget *media_list, *scrolled;
-    GtkWidget *choose_frame, *output_frame, *run_frame;
-    GtkWidget *vbox, *choose_table, *output_table, *run_table;
-    GtkWidget *source_label, *source_button, *source_folder_button;
-    GtkWidget *dest_label, *dest_button;
-
-    libvlc_event_manager_t *evtman;
-
-    gtk_init(&argc, &argv);
-
-    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    gtk_container_set_border_width(GTK_CONTAINER(window), BORDER_WIDTH);
-    gtk_window_set_title(GTK_WINDOW(window), "libVLC DVD ripper");
-
-    //setup vbox
-    vbox = gtk_vbox_new(FALSE, BORDER_WIDTH);
-    gtk_container_add(GTK_CONTAINER(window), vbox);
-
-    // setup media list with scrolled window
-    media_list = gtk_tree_view_new();
-    gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(media_list), FALSE);
-    scrolled = gtk_scrolled_window_new(NULL, NULL);
-    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-    gtk_container_add(GTK_CONTAINER(scrolled), media_list);
-
-    // setup "choose"-frame
-    choose_frame = gtk_frame_new("Choose DVD");
-    gtk_box_pack_start(GTK_BOX(vbox), choose_frame, TRUE, TRUE, 0);
-    choose_table = gtk_table_new(1, 4, FALSE);
-    gtk_table_set_row_spacings(GTK_TABLE(choose_table), BORDER_WIDTH/2);
-    gtk_table_set_col_spacings(GTK_TABLE(choose_table), BORDER_WIDTH/2);
-    gtk_container_set_border_width(GTK_CONTAINER(choose_table), BORDER_WIDTH);
-    source_label = gtk_label_new("Input file or folder:");
-    source_entry = gtk_entry_new();
-    gtk_entry_set_text(GTK_ENTRY(source_entry), "dvd://");
-    source_button = gtk_button_new_with_label("Open file");
-    source_folder_button = gtk_button_new_with_label("Open folder");
-    g_signal_connect(G_OBJECT(source_button), "clicked", G_CALLBACK(on_select_source_path), NULL);
-    g_signal_connect(G_OBJECT(source_folder_button), "clicked", G_CALLBACK(on_select_source_path), (gpointer) 1);
-    gtk_table_attach(GTK_TABLE(choose_table), source_label, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-    gtk_table_attach(GTK_TABLE(choose_table), source_entry, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
-    gtk_table_attach(GTK_TABLE(choose_table), source_button, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-    gtk_table_attach(GTK_TABLE(choose_table), source_folder_button, 3, 4, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-    gtk_container_add(GTK_CONTAINER(choose_frame), choose_table);
-
-    // setup "output"-frame
-    output_frame = gtk_frame_new("Output settings");
-    gtk_box_pack_start(GTK_BOX(vbox), output_frame, TRUE, TRUE, 0);
-    output_table = gtk_table_new(2, 3, FALSE);
-    gtk_table_set_row_spacings(GTK_TABLE(output_table), BORDER_WIDTH/2);
-    gtk_table_set_col_spacings(GTK_TABLE(output_table), BORDER_WIDTH/2);
-    gtk_container_set_border_width(GTK_CONTAINER(output_table), BORDER_WIDTH);
-    gtk_container_add(GTK_CONTAINER(output_frame), output_table);
-    dest_label = gtk_label_new("Output file:");
-    dest_entry = gtk_entry_new();
-    format_chooser = gtk_combo_box_new_text();
-    gtk_combo_box_append_text(GTK_COMBO_BOX(format_chooser), PRESET_H264_AAC_MP4_HIGH);
-    gtk_combo_box_append_text(GTK_COMBO_BOX(format_chooser), PRESET_H264_AAC_MP4_LOW);
-    gtk_combo_box_append_text(GTK_COMBO_BOX(format_chooser), PRESET_THEORA_VORBIS_OGG_HIGH);
-    gtk_combo_box_append_text(GTK_COMBO_BOX(format_chooser), PRESET_THEORA_VORBIS_OGG_LOW);
-    gtk_combo_box_append_text(GTK_COMBO_BOX(format_chooser), PRESET_VP8_VORBIS_WEBM_HIGH);
-    gtk_combo_box_append_text(GTK_COMBO_BOX(format_chooser), PRESET_VP8_VORBIS_WEBM_LOW);
-    gtk_combo_box_set_active(GTK_COMBO_BOX(format_chooser), 0);
-    dest_button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
-    g_signal_connect(G_OBJECT(dest_button), "clicked", G_CALLBACK(on_select_dest_path), NULL);
-    gtk_table_attach(GTK_TABLE(output_table), dest_label, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-    gtk_table_attach(GTK_TABLE(output_table), dest_entry, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
-    gtk_table_attach(GTK_TABLE(output_table), dest_button, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-    gtk_table_attach(GTK_TABLE(output_table), format_chooser, 0, 4, 1, 2, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
-
-    // setup "run"-frame
-    run_frame = gtk_frame_new("Run");
-    gtk_box_pack_start(GTK_BOX(vbox), run_frame, TRUE, TRUE, 0);
-    run_table = gtk_table_new(3, 2, FALSE);
-    gtk_table_set_row_spacings(GTK_TABLE(run_table), BORDER_WIDTH/2);
-    gtk_table_set_col_spacings(GTK_TABLE(run_table), BORDER_WIDTH/2);
-    gtk_container_set_border_width(GTK_CONTAINER(run_table), BORDER_WIDTH);
-    gtk_container_add(GTK_CONTAINER(run_frame), run_table);
-    progressbar = gtk_progress_bar_new();
-    spinner = gtk_spinner_new();
-    run_button = gtk_button_new_from_stock(GTK_STOCK_OK);
-    g_signal_connect(G_OBJECT(run_button), "clicked", G_CALLBACK(on_run), NULL);
-    gtk_table_attach(GTK_TABLE(run_table), progressbar, 0, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
-    gtk_table_attach(GTK_TABLE(run_table), gtk_label_new(""), 0, 1, 1, 2, GTK_EXPAND, GTK_SHRINK, 0, 0);
-    gtk_table_attach(GTK_TABLE(run_table), spinner, 1, 2, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
-    gtk_table_attach(GTK_TABLE(run_table), run_button, 2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
-
-    // setup vlc
-    vlcinst = libvlc_new(0, NULL);
-    evtman = libvlc_vlm_get_event_manager(vlcinst);
-	libvlc_event_attach(evtman, libvlc_VlmMediaInstanceStatusEnd, on_end_vlc, NULL);
-	libvlc_event_attach(evtman, libvlc_VlmMediaInstanceStatusError, on_error_vlc, NULL);
-
-    g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
-    gtk_widget_show_all(window);
-    gtk_widget_hide(spinner);
-    gtk_main ();
-    libvlc_release(vlcinst);
-    return 0;
-}
diff --git a/include/vlc/libvlc_events.h b/include/vlc/libvlc_events.h
index 24bdec0852..18a1513d8e 100644
--- a/include/vlc/libvlc_events.h
+++ b/include/vlc/libvlc_events.h
@@ -197,18 +197,6 @@ enum libvlc_event_e {
      * The renderer item is no longer valid.
      */
     libvlc_RendererDiscovererItemDeleted,
-
-    libvlc_VlmMediaAdded=0x600,
-    libvlc_VlmMediaRemoved,
-    libvlc_VlmMediaChanged,
-    libvlc_VlmMediaInstanceStarted,
-    libvlc_VlmMediaInstanceStopped,
-    libvlc_VlmMediaInstanceStatusInit,
-    libvlc_VlmMediaInstanceStatusOpening,
-    libvlc_VlmMediaInstanceStatusPlaying,
-    libvlc_VlmMediaInstanceStatusPause,
-    libvlc_VlmMediaInstanceStatusEnd,
-    libvlc_VlmMediaInstanceStatusError
 };
 
 /**
@@ -328,13 +316,6 @@ typedef struct libvlc_event_t
             libvlc_time_t   new_length;
         } media_player_length_changed;
 
-        /* VLM media */
-        struct
-        {
-            const char * psz_media_name;
-            const char * psz_instance_name;
-        } vlm_media_event;
-
         /* Extra MediaPlayer */
         struct
         {
diff --git a/include/vlc/libvlc_vlm.h b/include/vlc/libvlc_vlm.h
deleted file mode 100644
index cfa2d95646..0000000000
--- a/include/vlc/libvlc_vlm.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*****************************************************************************
- * libvlc_vlm.h:  libvlc_* new external API
- *****************************************************************************
- * Copyright (C) 1998-2008 VLC authors and VideoLAN
- * $Id$
- *
- * Authors: Clément Stenac <zorglub at videolan.org>
- *          Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
- *
- * 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 LIBVLC_VLM_H
-#define LIBVLC_VLM_H 1
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/** \defgroup libvlc_vlm LibVLC VLM
- * \ingroup libvlc
- * @{
- * \file
- * LibVLC stream output manager external API
- */
-
-/**
- * Release the vlm instance related to the given libvlc_instance_t
- *
- * \param p_instance the instance
- */
-LIBVLC_API void libvlc_vlm_release( libvlc_instance_t *p_instance );
-
-/**
- * Add a broadcast, with one input.
- *
- * \param p_instance the instance
- * \param psz_name the name of the new broadcast
- * \param psz_input the input MRL
- * \param psz_output the output MRL (the parameter to the "sout" variable)
- * \param i_options number of additional options
- * \param ppsz_options additional options
- * \param b_enabled boolean for enabling the new broadcast
- * \param b_loop Should this broadcast be played in loop ?
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_add_broadcast( libvlc_instance_t *p_instance,
-                                             const char *psz_name, const char *psz_input,
-                                             const char *psz_output, int i_options,
-                                             const char * const* ppsz_options,
-                                             int b_enabled, int b_loop );
-
-/**
- * Add a vod, with one input.
- *
- * \param p_instance the instance
- * \param psz_name the name of the new vod media
- * \param psz_input the input MRL
- * \param i_options number of additional options
- * \param ppsz_options additional options
- * \param b_enabled boolean for enabling the new vod
- * \param psz_mux the muxer of the vod media
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_add_vod( libvlc_instance_t * p_instance,
-                                       const char *psz_name, const char *psz_input,
-                                       int i_options, const char * const* ppsz_options,
-                                       int b_enabled, const char *psz_mux );
-
-/**
- * Delete a media (VOD or broadcast).
- *
- * \param p_instance the instance
- * \param psz_name the media to delete
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_del_media( libvlc_instance_t * p_instance,
-                                         const char *psz_name );
-
-/**
- * Enable or disable a media (VOD or broadcast).
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param b_enabled the new status
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_set_enabled( libvlc_instance_t *p_instance,
-                                           const char *psz_name, int b_enabled );
-
-/**
- * Set the output for a media.
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param psz_output the output MRL (the parameter to the "sout" variable)
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_set_output( libvlc_instance_t *p_instance,
-                                          const char *psz_name,
-                                          const char *psz_output );
-
-/**
- * Set a media's input MRL. This will delete all existing inputs and
- * add the specified one.
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param psz_input the input MRL
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_set_input( libvlc_instance_t *p_instance,
-                                         const char *psz_name,
-                                         const char *psz_input );
-
-/**
- * Add a media's input MRL. This will add the specified one.
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param psz_input the input MRL
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_add_input( libvlc_instance_t *p_instance,
-                                         const char *psz_name,
-                                         const char *psz_input );
-
-/**
- * Set a media's loop status.
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param b_loop the new status
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_set_loop( libvlc_instance_t *p_instance,
-                                        const char *psz_name,
-                                        int b_loop );
-
-/**
- * Set a media's vod muxer.
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param psz_mux the new muxer
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_set_mux( libvlc_instance_t *p_instance,
-                                       const char *psz_name,
-                                       const char *psz_mux );
-
-/**
- * Edit the parameters of a media. This will delete all existing inputs and
- * add the specified one.
- *
- * \param p_instance the instance
- * \param psz_name the name of the new broadcast
- * \param psz_input the input MRL
- * \param psz_output the output MRL (the parameter to the "sout" variable)
- * \param i_options number of additional options
- * \param ppsz_options additional options
- * \param b_enabled boolean for enabling the new broadcast
- * \param b_loop Should this broadcast be played in loop ?
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_change_media( libvlc_instance_t *p_instance,
-                                            const char *psz_name, const char *psz_input,
-                                            const char *psz_output, int i_options,
-                                            const char * const *ppsz_options,
-                                            int b_enabled, int b_loop );
-
-/**
- * Play the named broadcast.
- *
- * \param p_instance the instance
- * \param psz_name the name of the broadcast
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_play_media ( libvlc_instance_t *p_instance,
-                                           const char *psz_name );
-
-/**
- * Stop the named broadcast.
- *
- * \param p_instance the instance
- * \param psz_name the name of the broadcast
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_stop_media ( libvlc_instance_t *p_instance,
-                                           const char *psz_name );
-
-/**
- * Pause the named broadcast.
- *
- * \param p_instance the instance
- * \param psz_name the name of the broadcast
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_pause_media( libvlc_instance_t *p_instance,
-                                           const char *psz_name );
-
-/**
- * Seek in the named broadcast.
- *
- * \param p_instance the instance
- * \param psz_name the name of the broadcast
- * \param f_percentage the percentage to seek to
- * \return 0 on success, -1 on error
- */
-LIBVLC_API int libvlc_vlm_seek_media( libvlc_instance_t *p_instance,
-                                          const char *psz_name,
-                                          float f_percentage );
-
-/**
- * Return information about the named media as a JSON
- * string representation.
- *
- * This function is mainly intended for debugging use,
- * if you want programmatic access to the state of
- * a vlm_media_instance_t, please use the corresponding
- * libvlc_vlm_get_media_instance_xxx -functions.
- * Currently there are no such functions available for
- * vlm_media_t though.
- *
- * \param p_instance the instance
- * \param psz_name the name of the media,
- *      if the name is an empty string, all media is described
- * \return string with information about named media, or NULL on error
- */
-LIBVLC_API const char* libvlc_vlm_show_media( libvlc_instance_t *p_instance,
-                                                  const char *psz_name );
-
-/**
- * Get vlm_media instance position by name or instance id
- *
- * \param p_instance a libvlc instance
- * \param psz_name name of vlm media instance
- * \param i_instance instance id
- * \return position as float or -1. on error
- */
-LIBVLC_API float libvlc_vlm_get_media_instance_position( libvlc_instance_t *p_instance,
-                                                             const char *psz_name,
-                                                             int i_instance );
-
-/**
- * Get vlm_media instance time by name or instance id
- *
- * \param p_instance a libvlc instance
- * \param psz_name name of vlm media instance
- * \param i_instance instance id
- * \return time as integer or -1 on error
- */
-LIBVLC_API int libvlc_vlm_get_media_instance_time( libvlc_instance_t *p_instance,
-                                                       const char *psz_name,
-                                                       int i_instance );
-
-/**
- * Get vlm_media instance length by name or instance id
- *
- * \param p_instance a libvlc instance
- * \param psz_name name of vlm media instance
- * \param i_instance instance id
- * \return length of media item or -1 on error
- */
-LIBVLC_API int libvlc_vlm_get_media_instance_length( libvlc_instance_t *p_instance,
-                                                         const char *psz_name,
-                                                         int i_instance );
-
-/**
- * Get vlm_media instance playback rate by name or instance id
- *
- * \param p_instance a libvlc instance
- * \param psz_name name of vlm media instance
- * \param i_instance instance id
- * \return playback rate or -1 on error
- */
-LIBVLC_API int libvlc_vlm_get_media_instance_rate( libvlc_instance_t *p_instance,
-                                                       const char *psz_name,
-                                                       int i_instance );
-#if 0
-/**
- * Get vlm_media instance title number by name or instance id
- * \bug will always return 0
- * \param p_instance a libvlc instance
- * \param psz_name name of vlm media instance
- * \param i_instance instance id
- * \return title as number or -1 on error
- */
-LIBVLC_API int libvlc_vlm_get_media_instance_title( libvlc_instance_t *p_instance,
-                                                        const char *psz_name, int i_instance );
-
-/**
- * Get vlm_media instance chapter number by name or instance id
- * \bug will always return 0
- * \param p_instance a libvlc instance
- * \param psz_name name of vlm media instance
- * \param i_instance instance id
- * \return chapter as number or -1 on error
- */
-LIBVLC_API int libvlc_vlm_get_media_instance_chapter( libvlc_instance_t *p_instance,
-                                                          const char *psz_name, int i_instance );
-
-/**
- * Is libvlc instance seekable ?
- * \bug will always return 0
- * \param p_instance a libvlc instance
- * \param psz_name name of vlm media instance
- * \param i_instance instance id
- * \return 1 if seekable, 0 if not, -1 if media does not exist
- */
-LIBVLC_API int libvlc_vlm_get_media_instance_seekable( libvlc_instance_t *p_instance,
-                                                           const char *psz_name, int i_instance );
-#endif
-/**
- * Get libvlc_event_manager from a vlm media.
- * The p_event_manager is immutable, so you don't have to hold the lock
- *
- * \param p_instance a libvlc instance
- * \return libvlc_event_manager
- */
-LIBVLC_API libvlc_event_manager_t *
-    libvlc_vlm_get_event_manager( libvlc_instance_t *p_instance );
-
-/** @} */
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif /* <vlc/libvlc_vlm.h> */
diff --git a/include/vlc/vlc.h b/include/vlc/vlc.h
index 6d25cd507c..1c53fdb73f 100644
--- a/include/vlc/vlc.h
+++ b/include/vlc/vlc.h
@@ -47,7 +47,6 @@ extern "C" {
 #include <vlc/libvlc_media_discoverer.h>
 #include <vlc/libvlc_events.h>
 #include <vlc/libvlc_dialog.h>
-#include <vlc/libvlc_vlm.h>
 #include <vlc/deprecated.h>
 
 # ifdef __cplusplus
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ffae0044f8..b605cd6549 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -18,7 +18,6 @@ pkginclude_HEADERS = \
 	../include/vlc/libvlc_media_list.h \
 	../include/vlc/libvlc_media_list_player.h \
 	../include/vlc/libvlc_media_player.h \
-	../include/vlc/libvlc_vlm.h \
 	../include/vlc/libvlc_renderer_discoverer.h \
 	../include/vlc/vlc.h
 
@@ -42,7 +41,6 @@ libvlc_la_SOURCES = \
 	error.c \
 	log.c \
 	playlist.c \
-	vlm.c \
 	video.c \
 	audio.c \
 	event.c \
diff --git a/lib/core.c b/lib/core.c
index d777f695ce..2dab53da11 100644
--- a/lib/core.c
+++ b/lib/core.c
@@ -30,7 +30,6 @@
 #include <vlc/vlc.h>
 
 #include <vlc_interface.h>
-#include <vlc_vlm.h>
 
 #include <stdarg.h>
 #include <limits.h>
@@ -63,7 +62,6 @@ libvlc_instance_t * libvlc_new( int argc, const char *const *argv )
     }
 
     p_new->p_libvlc_int = p_libvlc_int;
-    p_new->vlm = NULL;
     p_new->ref_count = 1;
     p_new->p_callback_list = NULL;
     vlc_mutex_init(&p_new->instance_lock);
@@ -98,8 +96,6 @@ void libvlc_release( libvlc_instance_t *p_instance )
     if( refs == 0 )
     {
         vlc_mutex_destroy( lock );
-        if( p_instance->vlm != NULL )
-            libvlc_vlm_release( p_instance );
         libvlc_Quit( p_instance->p_libvlc_int );
         libvlc_InternalCleanup( p_instance->p_libvlc_int );
         libvlc_InternalDestroy( p_instance->p_libvlc_int );
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index cfde9675c4..cfa588be01 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -257,27 +257,6 @@ libvlc_video_set_track
 libvlc_video_take_snapshot
 libvlc_video_new_viewpoint
 libvlc_video_update_viewpoint
-libvlc_vlm_add_broadcast
-libvlc_vlm_add_vod
-libvlc_vlm_add_input
-libvlc_vlm_change_media
-libvlc_vlm_del_media
-libvlc_vlm_get_event_manager
-libvlc_vlm_get_media_instance_length
-libvlc_vlm_get_media_instance_position
-libvlc_vlm_get_media_instance_rate
-libvlc_vlm_get_media_instance_time
-libvlc_vlm_pause_media
-libvlc_vlm_play_media
-libvlc_vlm_release
-libvlc_vlm_seek_media
-libvlc_vlm_set_enabled
-libvlc_vlm_set_input
-libvlc_vlm_set_loop
-libvlc_vlm_set_mux
-libvlc_vlm_set_output
-libvlc_vlm_show_media
-libvlc_vlm_stop_media
 libvlc_set_exit_handler
 libvlc_audio_filter_list_get
 libvlc_video_filter_list_get
diff --git a/lib/libvlc_internal.h b/lib/libvlc_internal.h
index 41e1450dd5..44df3cfd6f 100644
--- a/lib/libvlc_internal.h
+++ b/lib/libvlc_internal.h
@@ -60,7 +60,6 @@ VLC_API void libvlc_SetExitHandler( libvlc_int_t *, void (*) (void *), void * );
 struct libvlc_instance_t
 {
     libvlc_int_t *p_libvlc_int;
-    struct libvlc_vlm_t *vlm;
     unsigned      ref_count;
     vlc_mutex_t   instance_lock;
     struct libvlc_callback_entry_list_t *p_callback_list;
diff --git a/lib/vlm.c b/lib/vlm.c
deleted file mode 100644
index 0e32bccdc7..0000000000
--- a/lib/vlm.c
+++ /dev/null
@@ -1,744 +0,0 @@
-/*****************************************************************************
- * vlm.c: libvlc new API VLM handling functions
- *****************************************************************************
- * Copyright (C) 2005 VLC authors and VideoLAN
- * $Id$
- *
- * Authors: Clément Stenac <zorglub at videolan.org>
- *
- * 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.
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <vlc/libvlc.h>
-#include <vlc/libvlc_vlm.h>
-#include <vlc_es.h>
-#include <vlc_input.h>
-#include <vlc_vlm.h>
-#include <assert.h>
-
-#include "libvlc_internal.h"
-
-typedef struct libvlc_vlm_t
-{
-    libvlc_event_manager_t  event_manager;
-    vlm_t                  *p_vlm;
-} libvlc_vlm_t;
-
-/* VLM events callback. Transmit to libvlc */
-static int VlmEvent( vlc_object_t *p_this, const char * name,
-                     vlc_value_t old_val, vlc_value_t newval, void *param )
-{
-    VLC_UNUSED(p_this);
-    VLC_UNUSED(name);
-    VLC_UNUSED(old_val);
-    vlm_event_t *event = (vlm_event_t*)newval.p_address;
-    libvlc_event_manager_t *p_event_manager = (libvlc_event_manager_t *) param;
-    libvlc_event_t libvlc_event;
-
-    libvlc_event.u.vlm_media_event.psz_instance_name = NULL;
-    libvlc_event.u.vlm_media_event.psz_media_name = event->psz_name;
-
-    switch( event->i_type )
-    {
-    case VLM_EVENT_MEDIA_ADDED:
-        libvlc_event.type = libvlc_VlmMediaAdded;
-        break;
-    case VLM_EVENT_MEDIA_REMOVED:
-        libvlc_event.type = libvlc_VlmMediaRemoved;
-        break;
-    case VLM_EVENT_MEDIA_CHANGED:
-        libvlc_event.type = libvlc_VlmMediaChanged;
-        break;
-    case VLM_EVENT_MEDIA_INSTANCE_STARTED:
-        libvlc_event.type = libvlc_VlmMediaInstanceStarted;
-        break;
-    case VLM_EVENT_MEDIA_INSTANCE_STOPPED:
-        libvlc_event.type = libvlc_VlmMediaInstanceStopped;
-        break;
-    case VLM_EVENT_MEDIA_INSTANCE_STATE:
-        libvlc_event.u.vlm_media_event.psz_instance_name =
-            event->psz_instance_name;
-        switch( event->input_state )
-        {
-        case INIT_S:
-            libvlc_event.type = libvlc_VlmMediaInstanceStatusInit;
-            break;
-        case OPENING_S:
-            libvlc_event.type =
-                libvlc_VlmMediaInstanceStatusOpening;
-            break;
-        case PLAYING_S:
-            libvlc_event.type =
-                libvlc_VlmMediaInstanceStatusPlaying;
-            break;
-        case PAUSE_S:
-            libvlc_event.type = libvlc_VlmMediaInstanceStatusPause;
-            break;
-        case END_S:
-            libvlc_event.type = libvlc_VlmMediaInstanceStatusEnd;
-            break;
-        case ERROR_S:
-            libvlc_event.type = libvlc_VlmMediaInstanceStatusError;
-            break;
-        default:
-            return 0;
-        }
-        break;
-    default:
-        return 0;
-    }
-    libvlc_event_send( p_event_manager, &libvlc_event );
-    return 0;
-}
-
-void libvlc_vlm_release( libvlc_instance_t *p_instance )
-{
-    vlm_t *p_vlm = p_instance->vlm->p_vlm;
-    if( !p_vlm )
-        return;
-    /* We need to remove medias in order to receive events */
-    vlm_Control( p_vlm, VLM_CLEAR_MEDIAS );
-    vlm_Control( p_vlm, VLM_CLEAR_SCHEDULES );
-
-    var_DelCallback( (vlc_object_t *)p_vlm, "intf-event", VlmEvent,
-                     &p_instance->vlm->event_manager );
-    libvlc_event_manager_destroy( &p_instance->vlm->event_manager );
-    vlm_Delete( p_vlm );
-    free( p_instance->vlm );
-    p_instance->vlm = NULL;
-    libvlc_release( p_instance );
-}
-
-static int libvlc_vlm_init( libvlc_instance_t *p_instance )
-{
-    if( !p_instance->vlm )
-    {
-        p_instance->vlm = malloc( sizeof(*p_instance->vlm) );
-        if( p_instance->vlm == NULL )
-            return VLC_ENOMEM;
-        p_instance->vlm->p_vlm = NULL;
-        libvlc_event_manager_init( &p_instance->vlm->event_manager,
-                                   p_instance->vlm );
-    }
-
-    if( !p_instance->vlm->p_vlm )
-    {
-        p_instance->vlm->p_vlm = vlm_New( p_instance->p_libvlc_int, NULL );
-        if( !p_instance->vlm->p_vlm )
-        {
-            libvlc_printerr( "VLM not supported or out of memory" );
-            return VLC_EGENERIC;
-        }
-        var_AddCallback( (vlc_object_t *)p_instance->vlm->p_vlm,
-                         "intf-event", VlmEvent,
-                         &p_instance->vlm->event_manager );
-        libvlc_retain( p_instance );
-    }
-
-    return VLC_SUCCESS;
-}
-
-#define VLM_RET(p,ret) do { \
-    if( libvlc_vlm_init( p_instance ) ) \
-        return (ret); \
-    (p) = p_instance->vlm->p_vlm; \
-  } while(0)
-
-static vlm_media_instance_t *
-libvlc_vlm_get_media_instance( libvlc_instance_t *p_instance,
-                               const char *psz_name, int i_minstance_idx )
-{
-    vlm_t *p_vlm;
-    vlm_media_instance_t **pp_minstance;
-    vlm_media_instance_t *p_minstance;
-    int i_minstance;
-    int64_t id;
-
-    VLM_RET(p_vlm, NULL);
-
-    if( vlm_Control( p_vlm, VLM_GET_MEDIA_ID, psz_name, &id ) ||
-        vlm_Control( p_vlm, VLM_GET_MEDIA_INSTANCES, id, &pp_minstance,
-                     &i_minstance ) )
-    {
-        libvlc_printerr( "%s: media instances not found", psz_name );
-        return NULL;
-    }
-    p_minstance = NULL;
-    if( i_minstance_idx >= 0 && i_minstance_idx < i_minstance )
-    {
-        p_minstance = pp_minstance[i_minstance_idx];
-        TAB_REMOVE( i_minstance, pp_minstance, p_minstance );
-    }
-    while( i_minstance > 0 )
-        vlm_media_instance_Delete( pp_minstance[--i_minstance] );
-    TAB_CLEAN( i_minstance, pp_minstance );
-    return p_minstance;
-}
-
-/* local function to be used in libvlc_vlm_show_media only */
-static char* recurse_answer( vlm_message_t *p_answer, const char* psz_delim,
-                             const int i_list ) {
-    char* psz_childdelim = NULL;
-    char* psz_nametag = NULL;
-    char* psz_response = strdup( "" );
-    int i_success = 0;
-
-    vlm_message_t *aw_child, **paw_child;
-
-    i_success = asprintf( &psz_childdelim, "%s\t", psz_delim);
-    if( i_success == -1 )
-        return psz_response;
-
-    paw_child = p_answer->child;
-    aw_child = *( paw_child );
-    /* Iterate over children */
-    for( int i = 0; i < p_answer->i_child; i++ )
-    {
-        char *psz_tmp;
-        /* Spare comma if it is the last element */
-        char c_comma = ',';
-        if( i == (p_answer->i_child - 1) )
-            c_comma = ' ';
-
-        /* Append name of child node, if not in a list */
-        if( !i_list )
-        {
-            i_success = asprintf( &psz_tmp, "%s\"%s\": ",
-                          psz_response, aw_child->psz_name );
-            if( i_success == -1 ) break;
-            free( psz_response );
-            psz_response = psz_tmp;
-        }
-
-        /* If child node has children, */
-        if( aw_child->i_child )
-        {
-            /* If the parent node is a list (hence the child node is
-             * inside a list), create a property of its name as if it
-             * had a name value node
-             */
-            free( psz_nametag );
-            if( i_list )
-            {
-                i_success = asprintf( &psz_nametag, "\"name\": \"%s\",%s",
-                              aw_child->psz_name, psz_childdelim );
-                if( i_success == -1 )
-                {
-                    psz_nametag = NULL;
-                    break;
-                }
-            }
-            else
-            {
-                psz_nametag = strdup( "" );
-            }
-            /* If the child is a list itself, format it accordingly and
-             * recurse through the child's children, telling them that
-             * they are inside a list.
-             */
-            if( strcmp( aw_child->psz_name, "media" ) == 0 ||
-                strcmp( aw_child->psz_name, "inputs" ) == 0 ||
-                strcmp( aw_child->psz_name, "options" ) == 0 )
-            {
-                char *psz_recurse = recurse_answer( aw_child, psz_childdelim, 1 );
-                i_success = asprintf( &psz_tmp, "%s[%s%s%s]%c%s",
-                                      psz_response, psz_childdelim, psz_recurse,
-                                      psz_delim, c_comma, psz_delim );
-                free( psz_recurse );
-                if( i_success == -1 ) break;
-                free( psz_response );
-                psz_response = psz_tmp;
-            }
-            /* Not a list, so format the child as a JSON object and
-             * recurse through the child's children
-             */
-            else
-            {
-                char *psz_recurse = recurse_answer( aw_child, psz_childdelim, 0 );
-                i_success = asprintf( &psz_tmp, "%s{%s%s%s%s}%c%s",
-                                      psz_response, psz_childdelim, psz_nametag,
-                                      psz_recurse, psz_delim, c_comma, psz_delim );
-                free( psz_recurse );
-                if( i_success == -1 ) break;
-                free( psz_response );
-                psz_response = psz_tmp;
-            }
-        }
-        /* Otherwise - when no children are present - the node is a
-         * value node. So print the value string
-         */
-        else
-        {
-            /* If value is equivalent to NULL, print it as null */
-            if( aw_child->psz_value == NULL
-                || strcmp( aw_child->psz_value, "(null)" ) == 0 )
-            {
-                i_success = asprintf( &psz_tmp, "%snull%c%s",
-                                      psz_response, c_comma, psz_delim );
-                if( i_success == -1 ) break;
-                free( psz_response );
-                psz_response = psz_tmp;
-            }
-            /* Otherwise print the value in quotation marks */
-            else
-            {
-                i_success = asprintf( &psz_tmp, "%s\"%s\"%c%s",
-                                      psz_response, aw_child->psz_value,
-                                      c_comma, psz_delim );
-                if( i_success == -1 ) break;
-                free( psz_response );
-                psz_response = psz_tmp;
-            }
-        }
-        /* getting next child */
-        paw_child++;
-        aw_child = *( paw_child );
-    }
-    free( psz_nametag );
-    free( psz_childdelim );
-    if( i_success == -1 )
-    {
-        free( psz_response );
-        psz_response = strdup( "" );
-    }
-    return psz_response;
-}
-
-const char* libvlc_vlm_show_media( libvlc_instance_t *p_instance,
-                                   const char *psz_name )
-{
-    char *psz_message = NULL;
-    vlm_message_t *answer = NULL;
-    char *psz_response = NULL;
-    const char *psz_fmt = NULL;
-    const char *psz_delimiter = NULL;
-    int i_list;
-    vlm_t *p_vlm = NULL;
-
-    VLM_RET(p_vlm, NULL);
-
-    assert( psz_name );
-
-    if( asprintf( &psz_message, "show %s", psz_name ) == -1 )
-        return NULL;
-
-    vlm_ExecuteCommand( p_vlm, psz_message, &answer );
-    if( answer->psz_value )
-    {
-        libvlc_printerr( "Unable to call show %s: %s",
-                         psz_name, answer->psz_value );
-    }
-    else if ( answer->child )
-    {   /* in case everything was requested  */
-        if ( strcmp( psz_name, "" ) == 0 )
-        {
-            psz_fmt = "{\n\t%s\n}\n";
-            psz_delimiter = "\n\t";
-            i_list = 0;
-        }
-        else
-        {
-            psz_fmt = "%s\n";
-            psz_delimiter = "\n";
-            i_list = 1;
-        }
-        char *psz_tmp = recurse_answer( answer, psz_delimiter, i_list );
-        if( asprintf( &psz_response, psz_fmt, psz_tmp ) == -1 )
-        {
-            libvlc_printerr( "Out of memory" );
-            psz_response = NULL;
-        }
-        free( psz_tmp );
-    }
-    vlm_MessageDelete( answer );
-    free( psz_message );
-    return( psz_response );
-}
-
-
-int libvlc_vlm_add_broadcast( libvlc_instance_t *p_instance,
-                              const char *psz_name,
-                              const char *psz_input,
-                              const char *psz_output, int i_options,
-                              const char * const *ppsz_options,
-                              int b_enabled, int b_loop )
-{
-    vlm_t *p_vlm;
-    vlm_media_t m;
-    int n;
-
-    VLM_RET(p_vlm, -1);
-
-    vlm_media_Init( &m );
-    m.psz_name = strdup( psz_name );
-    m.b_enabled = b_enabled;
-    m.b_vod = false;
-    m.broadcast.b_loop = b_loop;
-    if( psz_input )
-        TAB_APPEND( m.i_input, m.ppsz_input, strdup(psz_input) );
-    if( psz_output )
-        m.psz_output = strdup( psz_output );
-    for( n = 0; n < i_options; n++ )
-        TAB_APPEND( m.i_option, m.ppsz_option, strdup(ppsz_options[n]) );
-
-    n = vlm_Control( p_vlm, VLM_ADD_MEDIA, &m, NULL );
-    vlm_media_Clean( &m );
-    if( n )
-    {
-        libvlc_printerr( "Media %s creation failed", psz_name );
-        return -1;
-    }
-    return 0;
-}
-
-int libvlc_vlm_add_vod( libvlc_instance_t *p_instance, const char *psz_name,
-                        const char *psz_input, int i_options,
-                        const char * const *ppsz_options, int b_enabled,
-                        const char *psz_mux )
-{
-    vlm_t *p_vlm;
-    vlm_media_t m;
-    int n;
-
-    VLM_RET(p_vlm, -1);
-
-    vlm_media_Init( &m );
-    m.psz_name = strdup( psz_name );
-    m.b_enabled = b_enabled;
-    m.b_vod = true;
-    m.vod.psz_mux = psz_mux ? strdup( psz_mux ) : NULL;
-    if( psz_input )
-        TAB_APPEND( m.i_input, m.ppsz_input, strdup(psz_input) );
-    for( n = 0; n < i_options; n++ )
-        TAB_APPEND( m.i_option, m.ppsz_option, strdup(ppsz_options[n]) );
-
-    n = vlm_Control( p_vlm, VLM_ADD_MEDIA, &m, NULL );
-    vlm_media_Clean( &m );
-    if( n )
-    {
-        libvlc_printerr( "Media %s creation failed", psz_name );
-        return -1;
-    }
-    return 0;
-}
-
-int libvlc_vlm_del_media( libvlc_instance_t *p_instance, const char *psz_name )
-{
-    vlm_t *p_vlm;
-    int64_t id;
-
-    VLM_RET(p_vlm, -1);
-
-    if( vlm_Control( p_vlm, VLM_GET_MEDIA_ID, psz_name, &id ) ||
-        vlm_Control( p_vlm, VLM_DEL_MEDIA, id ) )
-    {
-        libvlc_printerr( "Unable to delete %s", psz_name );
-        return -1;
-    }
-    return 0;
-}
-
-static vlm_media_t *get_media( libvlc_instance_t *p_instance,
-                               vlm_t **restrict pp_vlm, const char *name )
-{
-    vlm_media_t *p_media;
-    vlm_t *p_vlm;
-    int64_t id;
-
-    VLM_RET(p_vlm, NULL);
-    if( vlm_Control( p_vlm, VLM_GET_MEDIA_ID, name, &id ) ||
-        vlm_Control( p_vlm, VLM_GET_MEDIA, id, &p_media ) )
-        return NULL;
-    *pp_vlm = p_vlm;
-    return p_media;
-}
-
-#define VLM_CHANGE(psz_error, code ) do {   \
-    vlm_t *p_vlm;           \
-    vlm_media_t *p_media = get_media( p_instance, &p_vlm, psz_name ); \
-    if( p_media != NULL ) { \
-        code;               \
-        if( vlm_Control( p_vlm, VLM_CHANGE_MEDIA, p_media ) )       \
-            p_vlm = NULL;                                           \
-        vlm_media_Delete( p_media );                                \
-        if( p_vlm != NULL ) \
-            return 0;       \
-    }                       \
-    libvlc_printerr( psz_error, psz_name );                         \
-    return -1;              \
-  } while(0)
-
-int libvlc_vlm_set_enabled( libvlc_instance_t *p_instance,
-                            const char *psz_name, int b_enabled )
-{
-#define VLM_CHANGE_CODE { p_media->b_enabled = b_enabled; }
-    VLM_CHANGE( "Unable to delete %s", VLM_CHANGE_CODE );
-#undef VLM_CHANGE_CODE
-}
-
-int libvlc_vlm_set_loop( libvlc_instance_t *p_instance, const char *psz_name,
-                         int b_loop )
-{
-#define VLM_CHANGE_CODE { p_media->broadcast.b_loop = b_loop; }
-    VLM_CHANGE( "Unable to change %s loop property", VLM_CHANGE_CODE );
-#undef VLM_CHANGE_CODE
-}
-
-int libvlc_vlm_set_mux( libvlc_instance_t *p_instance, const char *psz_name,
-                        const char *psz_mux )
-{
-#define VLM_CHANGE_CODE { if( p_media->b_vod ) { \
-                            free( p_media->vod.psz_mux ); \
-                            p_media->vod.psz_mux = psz_mux \
-                                 ? strdup( psz_mux ) : NULL; \
-                          } }
-    VLM_CHANGE( "Unable to change %s mux property", VLM_CHANGE_CODE );
-#undef VLM_CHANGE_CODE
-}
-
-int libvlc_vlm_set_output( libvlc_instance_t *p_instance,
-                           const char *psz_name, const char *psz_output )
-{
-#define VLM_CHANGE_CODE { free( p_media->psz_output ); \
-                          p_media->psz_output = strdup( psz_output ); }
-    VLM_CHANGE( "Unable to change %s output property", VLM_CHANGE_CODE );
-#undef VLM_CHANGE_CODE
-}
-
-int libvlc_vlm_set_input( libvlc_instance_t *p_instance,
-                          const char *psz_name, const char *psz_input )
-{
-#define VLM_CHANGE_CODE { while( p_media->i_input > 0 ) \
-                            free( p_media->ppsz_input[--p_media->i_input] );\
-                          TAB_APPEND( p_media->i_input, p_media->ppsz_input, \
-                                      strdup(psz_input) ); }
-    VLM_CHANGE( "Unable to change %s input property", VLM_CHANGE_CODE );
-#undef VLM_CHANGE_CODE
-}
-
-int libvlc_vlm_add_input( libvlc_instance_t *p_instance,
-                          const char *psz_name, const char *psz_input )
-{
-#define VLM_CHANGE_CODE { TAB_APPEND( p_media->i_input, p_media->ppsz_input, \
-                          strdup(psz_input) ); }
-    VLM_CHANGE( "Unable to change %s input property", VLM_CHANGE_CODE );
-#undef VLM_CHANGE_CODE
-}
-
-int libvlc_vlm_change_media( libvlc_instance_t *p_instance,
-                             const char *psz_name, const char *psz_input,
-                             const char *psz_output, int i_options,
-                             const char * const *ppsz_options, int b_enabled,
-                             int b_loop )
-{
-#define VLM_CHANGE_CODE { int n;        \
-    p_media->b_enabled = b_enabled;     \
-    p_media->broadcast.b_loop = b_loop; \
-    while( p_media->i_input > 0 )       \
-        free( p_media->ppsz_input[--p_media->i_input] );    \
-    if( psz_input )                     \
-        TAB_APPEND( p_media->i_input, p_media->ppsz_input, strdup(psz_input) ); \
-    free( p_media->psz_output );        \
-    p_media->psz_output = psz_output ? strdup( psz_output ) : NULL; \
-    while( p_media->i_option > 0 )     \
-        free( p_media->ppsz_option[--p_media->i_option] );        \
-    for( n = 0; n < i_options; n++ )    \
-        TAB_APPEND( p_media->i_option, p_media->ppsz_option, \
-                    strdup(ppsz_options[n]) );   \
-  }
-    VLM_CHANGE( "Unable to change %s properties", VLM_CHANGE_CODE );
-#undef VLM_CHANGE_CODE
-}
-
-int libvlc_vlm_play_media( libvlc_instance_t *p_instance,
-                           const char *psz_name )
-{
-    vlm_t *p_vlm;
-    int64_t id;
-
-    VLM_RET(p_vlm, -1);
-
-    if( vlm_Control( p_vlm, VLM_GET_MEDIA_ID, psz_name, &id ) ||
-        vlm_Control( p_vlm, VLM_START_MEDIA_BROADCAST_INSTANCE, id, NULL, 0 ) )
-    {
-        libvlc_printerr( "Unable to play %s", psz_name );
-        return -1;
-    }
-    return 0;
-}
-
-int libvlc_vlm_stop_media( libvlc_instance_t *p_instance,
-                           const char *psz_name )
-{
-    vlm_t *p_vlm;
-    int64_t id;
-
-    VLM_RET(p_vlm, -1);
-
-    if( vlm_Control( p_vlm, VLM_GET_MEDIA_ID, psz_name, &id ) ||
-        vlm_Control( p_vlm, VLM_STOP_MEDIA_INSTANCE, id, NULL ) )
-    {
-        libvlc_printerr( "Unable to stop %s", psz_name );
-        return -1;
-    }
-    return 0;
-}
-
-int libvlc_vlm_pause_media( libvlc_instance_t *p_instance,
-                            const char *psz_name )
-{
-    vlm_t *p_vlm;
-    int64_t id;
-
-    VLM_RET(p_vlm, -1);
-
-    if( vlm_Control( p_vlm, VLM_GET_MEDIA_ID, psz_name, &id ) ||
-        vlm_Control( p_vlm, VLM_PAUSE_MEDIA_INSTANCE, id, NULL ) )
-    {
-        libvlc_printerr( "Unable to pause %s", psz_name );
-        return -1;
-    }
-    return 0;
-}
-
-int libvlc_vlm_seek_media( libvlc_instance_t *p_instance,
-                           const char *psz_name, float f_percentage )
-{
-    vlm_t *p_vlm;
-    int64_t id;
-
-    VLM_RET(p_vlm, -1);
-
-    if( vlm_Control( p_vlm, VLM_GET_MEDIA_ID, psz_name, &id ) ||
-        vlm_Control( p_vlm, VLM_SET_MEDIA_INSTANCE_POSITION, id, NULL,
-                     f_percentage ) )
-    {
-        libvlc_printerr( "Unable to seek %s to %f%%", psz_name, f_percentage );
-        return -1;
-    }
-    return 0;
-}
-
-float libvlc_vlm_get_media_instance_position( libvlc_instance_t *p_instance,
-                                              const char *psz_name,
-                                              int i_instance )
-{
-    vlm_media_instance_t *p_mi;
-    float result = -1.;
-
-    p_mi = libvlc_vlm_get_media_instance( p_instance, psz_name, i_instance );
-    if( p_mi )
-    {
-        result = p_mi->d_position;
-        vlm_media_instance_Delete( p_mi );
-    }
-    return result;
-}
-
-int libvlc_vlm_get_media_instance_time( libvlc_instance_t *p_instance,
-                                        const char *psz_name, int i_instance )
-{
-    vlm_media_instance_t *p_mi;
-    int result = -1;
-
-    p_mi = libvlc_vlm_get_media_instance( p_instance, psz_name, i_instance );
-    if( p_mi )
-    {
-        result = US_FROM_VLC_TICK(p_mi->i_time);
-        vlm_media_instance_Delete( p_mi );
-    }
-    return result;
-}
-
-int libvlc_vlm_get_media_instance_length( libvlc_instance_t *p_instance,
-                                          const char *psz_name,
-                                          int i_instance )
-{
-    vlm_media_instance_t *p_mi;
-    int result = -1;
-
-    p_mi = libvlc_vlm_get_media_instance( p_instance, psz_name, i_instance );
-    if( p_mi )
-    {
-        result = US_FROM_VLC_TICK(p_mi->i_length);
-        vlm_media_instance_Delete( p_mi );
-    }
-    return result;
-}
-
-int libvlc_vlm_get_media_instance_rate( libvlc_instance_t *p_instance,
-                                        const char *psz_name, int i_instance )
-{
-    vlm_media_instance_t *p_mi;
-    int result = -1;
-
-    p_mi = libvlc_vlm_get_media_instance( p_instance, psz_name, i_instance );
-    if( p_mi )
-    {
-        result = p_mi->i_rate;
-        vlm_media_instance_Delete( p_mi );
-    }
-    return result;
-}
-
-#if 0
-int libvlc_vlm_get_media_instance_title( libvlc_instance_t *p_instance,
-                                         const char *psz_name, int i_instance )
-{
-    vlm_media_instance_t *p_mi;
-
-    p_mi = libvlc_vlm_get_media_instance( p_instance, psz_name, i_instance );
-    if( p_mi )
-        vlm_media_instance_Delete( p_mi );
-    return p_mi ? 0 : -1;
-}
-
-int libvlc_vlm_get_media_instance_chapter( libvlc_instance_t *p_instance,
-                                           const char *psz_name,
-                                           int i_instance )
-{
-    vlm_media_instance_t *p_mi;
-
-    p_mi = libvlc_vlm_get_media_instance( p_instance, psz_name,
-                                          i_instance );
-    if( p_mi )
-        vlm_media_instance_Delete( p_mi );
-    return p_mi ? 0 : -1;
-}
-
-int libvlc_vlm_get_media_instance_seekable( libvlc_instance_t *p_instance,
-                                            const char *psz_name,
-                                            int i_instance )
-{
-    vlm_media_instance_t *p_mi;
-
-    p_mi = libvlc_vlm_get_media_instance( p_instance, psz_name, i_instance );
-    if( p_mi )
-        vlm_media_instance_Delete( p_mi );
-    return p_mi ? 0 : -1;
-}
-#endif
-
-libvlc_event_manager_t *
-libvlc_vlm_get_event_manager( libvlc_instance_t *p_instance )
-{
-    if( libvlc_vlm_init( p_instance ) )
-        return NULL;
-    return &p_instance->vlm->event_manager;
-}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3e6b09196a..c189881851 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -160,7 +160,6 @@ lib/media_list_player.c
 lib/media_player.c
 lib/playlist.c
 lib/video.c
-lib/vlm.c
 
 # modules
 modules/access/alsa.c
diff --git a/src/test/headers.c b/src/test/headers.c
index 7c396c8439..75338266f3 100644
--- a/src/test/headers.c
+++ b/src/test/headers.c
@@ -42,7 +42,6 @@
 #include <vlc/libvlc_media_list.h>
 #include <vlc/libvlc_media_list_player.h>
 #include <vlc/libvlc_media_player.h>
-#include <vlc/libvlc_vlm.h>
 
 #include <stdio.h>
 



More information about the vlc-commits mailing list