diff --git a/compile-libvlc.sh b/compile-libvlc.sh index f932b622179b50fc66129f9c36d9e4df68754bfc..381e4eeacc063408fc025f96142fc72b1e5683c6 100755 --- a/compile-libvlc.sh +++ b/compile-libvlc.sh @@ -576,7 +576,6 @@ get_symbol() } VLC_MODULES=$(find_modules vlc/$VLC_BUILD_DIR/modules) -EXTRA_MODULES="demuxdump2" DEFINITION=""; BUILTINS="const void *vlc_static_modules[] = {\n"; for file in $VLC_MODULES; do @@ -609,11 +608,6 @@ EOF DEFINITION=$DEFINITION"int vlc_entry__$name (int (*)(void *, void *, int, ...), void *);\n"; BUILTINS="$BUILTINS vlc_entry__$name,\n"; done; -for module in ${EXTRA_MODULES}; do - echo $module - DEFINITION=$DEFINITION"int vlc_entry__${module} (int (*)(void *, void *, int, ...), void *);\n"; - BUILTINS="$BUILTINS vlc_entry__${module},\n"; -done BUILTINS="$BUILTINS NULL\n};\n"; \ printf "/* Autogenerated from the list of modules */\n#include \n$DEFINITION\n$BUILTINS\n" > libvlc/jni/libvlcjni-modules.c diff --git a/libvlc/jni/Android.mk b/libvlc/jni/Android.mk index ea47c6e50602cba4a370af37713afa3b22e9ee76..8b5e56ed3045fd47bf5744093b969abb90bb534f 100644 --- a/libvlc/jni/Android.mk +++ b/libvlc/jni/Android.mk @@ -1,14 +1,6 @@ LOCAL_PATH := $(call my-dir) ANDROID_PRIVATE_LIBDIR := $(LOCAL_PATH)/../../android-libs -include $(CLEAR_VARS) -LOCAL_MODULE := demuxdump2_plugin -LOCAL_SRC_FILES += modules/demuxdump2.c -LOCAL_C_INCLUDES := $(VLC_SRC_DIR)/include -LOCAL_CFLAGS := -std=gnu99 -DMODULE_NAME=demuxdump2 -Wall - -include $(BUILD_STATIC_LIBRARY) - include $(CLEAR_VARS) LOCAL_MODULE := libvlc ARCH=$(APP_ABI) @@ -48,7 +40,6 @@ LOCAL_LDLIBS := -L$(VLC_CONTRIB)/lib \ ifeq ($(HAVE_LIBCOMPAT), 1) LOCAL_SHARED_LIBRARIES:= libcompat.7 endif -LOCAL_STATIC_LIBRARIES:= libdemuxdump2_plugin include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) diff --git a/libvlc/jni/modules/demuxdump2.c b/libvlc/jni/modules/demuxdump2.c deleted file mode 100644 index b19c0922b84f71267ed5a64c9a5ecfa0c8c25fff..0000000000000000000000000000000000000000 --- a/libvlc/jni/modules/demuxdump2.c +++ /dev/null @@ -1,164 +0,0 @@ -/***************************************************************************** - * demuxdump2.c : Pseudo demux module for vlc (with write status) - ***************************************************************************** - * Copyright (C) 2016 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. - *****************************************************************************/ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -static int Open(vlc_object_t *); -static void Close (vlc_object_t *); - -vlc_module_begin () - set_shortname("Dump") - set_category(CAT_INPUT) - set_subcategory(SUBCAT_INPUT_DEMUX) - set_capability("demux", 0) - change_private() - add_savefile("demuxdump-file", "stream-demux.dump", NULL, NULL, false) - change_private() - set_callbacks(Open, Close) - add_shortcut("dump2") -vlc_module_end () - -#define READ_ONCE 32768 - -struct demux_sys_t -{ - void *p_buf; - int i_out_fd; - uint64_t i_size; - uint64_t i_written; - unsigned int i_level; -}; - -static void SendEventCache(demux_t *p_demux, float f_value) -{ - vlc_value_t val; - val.f_float = f_value; - var_Change(p_demux->p_input, "cache", VLC_VAR_SETVALUE, &val, NULL); - var_SetInteger(p_demux->p_input, "intf-event", INPUT_EVENT_CACHE); -} - -static int Demux(demux_t *p_demux) -{ - demux_sys_t *p_sys = p_demux->p_sys; - - ssize_t i_ret = stream_Read(p_demux->s, p_sys->p_buf, READ_ONCE); - - if (i_ret < 0) - return -1; - else if (i_ret == 0) - return 0; - - size_t i_towrite = i_ret; - size_t i_written = 0; - - while (i_written < i_towrite) - { - i_ret = vlc_write_i11e(p_sys->i_out_fd, p_sys->p_buf + i_written, - i_towrite - i_written); - if (i_ret == -1) - return -1; - i_written += i_ret; - } - p_sys->i_written += i_written; - - if (p_sys->i_size > 0) - { - unsigned int i_level = p_sys->i_written / (p_sys->i_size / (double) 100); - if (i_level != p_sys->i_level) - { - p_sys->i_level = i_level; - SendEventCache(p_demux, i_level / (float) 100); - } - } - - return 1; -} - -static int Control(demux_t *p_demux, int i_query, va_list args) -{ - return demux_vaControlHelper(p_demux->s, 0, -1, 0, 1, i_query, args); -} - -static int Open(vlc_object_t * p_this) -{ - demux_t *p_demux = (demux_t*)p_this; - - /* Accept only if forced */ - if (!p_demux->obj.force) - return VLC_EGENERIC; - - char *psz_path = var_InheritString(p_demux, "demuxdump-file"); - if (psz_path == NULL) - { - msg_Err(p_demux, "no dump file name given"); - return VLC_EGENERIC; - } - - int i_fd = vlc_open(psz_path, O_CREAT|O_WRONLY); - free(psz_path); - if (i_fd == -1) - return VLC_EGENERIC; - - demux_sys_t *p_sys = malloc(sizeof(*p_sys)); - if (p_sys == NULL) - { - vlc_close(i_fd); - return VLC_ENOMEM; - } - p_sys->p_buf = malloc(READ_ONCE); - if (p_sys->p_buf == NULL) - { - vlc_close(i_fd); - return VLC_ENOMEM; - } - if (stream_GetSize(p_demux->s, &p_sys->i_size) != VLC_SUCCESS) - p_sys->i_size = 0; - p_sys->i_written = 0; - - p_sys->i_out_fd = i_fd; - - p_demux->p_sys = p_sys; - p_demux->pf_demux = Demux; - p_demux->pf_control = Control; - return VLC_SUCCESS; -} - -static void Close(vlc_object_t *p_this) -{ - demux_t *p_demux = (demux_t*)p_this; - demux_sys_t *p_sys = p_demux->p_sys; - - vlc_close(p_sys->i_out_fd); - free(p_sys->p_buf); - free(p_sys); -}