Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • Thrillseekr/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
400 results
Show changes
Commits on Source (9)
......@@ -378,6 +378,12 @@ case "${host_os}" in
AC_LIBOBJ([recvmsg])
AC_LIBOBJ([sendmsg])
;;
*emscripten*)
SYS=emscripten
# tdestroy() is a GNU extension
CFLAGS="${CFLAGS} -pthread -D_GNU_SOURCE"
CXXFLAGS="${CXXFLAGS} -pthread"
;;
*)
SYS="${host_os}"
;;
......@@ -451,6 +457,8 @@ AS_IF([test x$with_pic = xyes], [X86ASMDEFS="${X86ASMDEFS} -DPIC"])
AC_SUBST([X86ASMFLAGS])
AC_SUBST([X86ASMDEFS])
AM_CONDITIONAL([HAVE_EMSCRIPTEN], [test "${SYS}" = "emscripten"])
dnl
dnl Sadly autoconf does not think about testing foo.exe when ask to test
dnl for program foo on win32
......
......@@ -358,6 +358,9 @@ case "${OS}" in
*nacl*)
add_make_enabled "HAVE_NACL"
;;
*emscripten*)
add_make_enabled "HAVE_EMSCRIPTEN"
;;
esac
#
......
From 4bb53ad8e35f899f14e6d6144e60d8caa5c0651c Mon Sep 17 00:00:00 2001
From: Mehdi Sabwat <mehdi@videolabs.io>
Date: Mon, 6 Sep 2021 11:49:03 +0200
Subject: [PATCH 1/1] ffmpeg: add target_os support for emscripten
---
configure | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure b/configure
index d7a3f50..57ca005 100755
--- a/configure
+++ b/configure
@@ -5579,6 +5579,8 @@ case $target_os in
;;
minix)
;;
+ emscripten)
+ ;;
none)
;;
*)
--
2.33.0
......@@ -215,6 +215,10 @@ ifdef HAVE_NACL
FFMPEGCONF+=--disable-inline-asm --disable-asm --target-os=linux
endif
ifdef HAVE_EMSCRIPTEN
FFMPEGCONF+= --arch=wasm32 --target-os=emscripten
endif
# Build
PKGS += ffmpeg
ifeq ($(call need_pkg,"libavcodec >= $(FFMPEG_LAVC_MIN) libavformat >= 53.21.0 libswscale"),)
......@@ -247,6 +251,7 @@ endif
ifdef USE_LIBAV
$(APPLY) $(SRC)/ffmpeg/libav_gsm.patch
endif
$(APPLY) $(SRC)/ffmpeg/0001-ffmpeg-add-target_os-support-for-emscripten.patch
$(MOVE)
.ffmpeg: ffmpeg
......
......@@ -565,6 +565,9 @@ endif
ifdef HAVE_DARWIN_OS
CMAKE_SYSTEM_NAME = Darwin
endif
ifdef HAVE_EMSCRIPTEN
CMAKE_SYSTEM_NAME = Emscripten
endif
ifdef HAVE_ANDROID
CFLAGS += -DANDROID_NATIVE_API_LEVEL=$(ANDROID_API)
......@@ -620,6 +623,10 @@ ifdef HAVE_CROSS_COMPILE
echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> $@
echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> $@
endif
ifdef HAVE_EMSCRIPTEN
# https://github.com/emscripten-core/emscripten/blob/main/cmake/Modules/Platform/Emscripten.cmake#L268
echo "set(EMSCRIPTEN 1)" >> $@
endif
MESON_SYSTEM_NAME =
ifdef HAVE_WIN32
......@@ -634,12 +641,16 @@ else
ifdef HAVE_LINUX
# android has also system = linux and defines HAVE_LINUX
MESON_SYSTEM_NAME = linux
else
ifdef HAVE_EMSCRIPTEN
MESON_SYSTEM_NAME = emscripten
else
$(error "No meson system name known for this target")
endif
endif
endif
endif
endif
crossfile.meson: $(SRC)/gen-meson-crossfile.py
$(HOSTVARS_MESON) \
......
From c4c22e82c1fb1d722509e5005cb3ee4b3600b919 Mon Sep 17 00:00:00 2001
From: Mehdi Sabwat <mehdisabwat@gmail.com>
Date: Mon, 26 Apr 2021 15:37:44 +0200
Subject: [PATCH 1/1] emscripten: disable big endian test
This test should not run on the emscripten platform because of :
https://github.com/emscripten-core/emscripten/blob/dff33368427fba16745c8ce52f11484a67b2855d/cmake/Modules/TestBigEndian.cmake#L5
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 299f74c3..d343905b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -162,8 +162,10 @@ endif()
#-----------------------------------------------------------------------------
# Big endian test:
+if (NOT EMSCRIPTEN)
include (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
TEST_BIG_ENDIAN(OPJ_BIG_ENDIAN)
+endif()
#-----------------------------------------------------------------------------
# Setup file for setting custom ctest vars
--
2.31.1
......@@ -22,6 +22,7 @@ endif
$(APPLY) $(SRC)/openjpeg/install.patch
$(APPLY) $(SRC)/openjpeg/pic.patch
$(APPLY) $(SRC)/openjpeg/openjp2_pthread.patch
$(APPLY) $(SRC)/openjpeg/emscripten.patch
$(call pkg_static,"./src/lib/openjp2/libopenjp2.pc.cmake.in")
$(MOVE)
......
......@@ -151,6 +151,10 @@ else
VPX_CONF += --disable-optimizations
endif
ifdef HAVE_EMSCRIPTEN
VPX_CONF += --extra-cflags="$(CFLAGS) -pthread"
endif
# Always enable debug symbols, we strip in the final executables if needed
VPX_CONF += --enable-debug
......
......@@ -20,6 +20,7 @@ variables:
VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android:20210730131708
VLC_SNAP_IMAGE: registry.videolan.org/vlc-ubuntu-focal:20210611174203
VLC_RASPBIAN_IMAGE: registry.videolan.org/vlc-debian-raspbian:20200213203125
VLC_WASM_EMSCRIPTEN: registry.videolan.org/vlc-debian-wasm-emscripten:20210601090557
.variables-debian: &variables-debian
HOST_ARCH: x86_64
......@@ -102,6 +103,11 @@ variables:
ANDROID_ARCH: x86_64
TRIPLET: x86_64-linux-android
.variables-emscripten-wasm32: &variables-emscripten-wasm32
HOST_ARCH: wasm32
TRIPLET: $HOST_ARCH-unknown-emscripten
EMSDK_VERSION: 2.0.23
# Common rules
.base-template:
stage: build
......@@ -457,6 +463,24 @@ android-x86_64:
extends: .android-common
variables: *variables-android-x86_64
#
# Webassembly
#
wasm32-emscripten-build :
extends: .docker-template
variables: *variables-emscripten-wasm32
image:
name: $VLC_WASM_EMSCRIPTEN
script:
- source $EMSCRIPTEN_SDK/emsdk_env.sh
- |
if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
./extras/package/wasm-emscripten/build.sh --with-prebuilt-contribs
else
./extras/package/wasm-emscripten/build.sh --gen-contrib-archive
fi
#
# VLC Documentation
#
......
#! /bin/sh
# Copyright (C) 2003-2021 the VideoLAN team
#
# This file is under the same license as the vlc package.
set -e
diagnostic()
{
echo "### build logs ###: " "$@" 1>&2;
}
usage()
{
echo "Usage: $0 [--mode=(default=1)]"
echo " --with-prebuilt-contribs | -c"
echo " --mode=1 build all "
echo " --mode=0 incremental build (do not bootstrap and configure) "
}
NM="$EMSDK/upstream/bin/llvm-nm"
get_symbol()
{
echo "$1" | grep vlc_entry_"$2" | cut -d " " -f 3
}
get_entryname()
{
symbols=$($NM -g "$1")
entryname=$(get_symbol "$symbols" _)
echo "$entryname"
}
while test -n "$1"
do
case "$1" in
--help|-h)
usage
exit 0
;;
--mode=*)
BUILD_MODE="${1#--mode=}"
;;
--with-prebuilt-contribs)
VLC_USE_PREBUILT_CONTRIBS=1
;;
--gen-contrib-archive|-c)
GENERATE_ARCHIVE=1
;;
*)
echo "Unrecognized options $1"
usage
exit 1
;;
esac
shift
done
BUILD_MODE=${BUILD_MODE:=1}
VLC_PREBUILT_CONTRIBS_URL=${VLC_PREBUILT_CONTRIBS_URL:-""}
BUILDDIR_NAME="build-emscripten"
GENERATE_ARCHIVE=${GENERATE_ARCHIVE:=0}
VLC_USE_PREBUILT_CONTRIBS=${VLC_USE_PREBUILT_CONTRIBS:=0}
diagnostic "setting MAKEFLAGS"
if [ -z "$MAKEFLAGS" ]; then
UNAMES=$(uname -s)
MAKEFLAGS=
if which nproc >/dev/null; then
MAKEFLAGS=-j$(nproc)
elif [ "$UNAMES" = "Darwin" ] && which sysctl >/dev/null; then
MAKEFLAGS=-j$(sysctl -n machdep.cpu.thread_count)
fi
export MAKEFLAGS;
fi
diagnostic "setting up dir paths"
OLD_PWD=$(pwd)
VLC_SRCPATH="$(dirname "$0")/../../../"
cd "$VLC_SRCPATH"
VLC_SRCPATH=$(pwd)
cd "$OLD_PWD"
diagnostic "vlc sources path: "
echo "$VLC_SRCPATH";
diagnostic "vlc tools: bootstrap"
cd "$VLC_SRCPATH"/extras/tools
./bootstrap
diagnostic "vlc tools: make"
make
# update the PATH
export PATH=$VLC_SRCPATH/extras/tools/bin:$PATH
diagnostic "sdk tests: checking if autoconf supports emscripten"
# https://code.videolan.org/-/snippets/1283
for file in /usr/share/automake-*
do
# This will pick the latest automake version
AUTOMAKE_VERSION="$(echo "$file" | cut -d- -f2)"
done
diagnostic "using automake version: /usr/share/automake-$AUTOMAKE_VERSION"
if [ -f /usr/share/automake-"$AUTOMAKE_VERSION"/config.sub ]; then
/usr/share/automake-"$AUTOMAKE_VERSION"/config.sub wasm32-unknown-emscripten
fi
mkdir -p "$VLC_SRCPATH"/contrib/contrib-emscripten
cd "$VLC_SRCPATH"/contrib/contrib-emscripten
diagnostic "vlc contribs: bootstrap"
../bootstrap --disable-disc --disable-sout --disable-net \
--disable-postproc --disable-gmp --disable-gcrypt --disable-ass \
--disable-gpgerror --disable-harfbuzz --disable-fontconfig \
--disable-asdcplib --disable-caca --disable-gettext \
--disable-goom --disable-libplacebo \
--disable-lua --disable-luac --disable-sqlite \
--disable-medialibrary --disable-mpcdec --disable-schroedinger \
--disable-orc --disable-protobuf --disable-sidplay2 \
--disable-soxr --disable-spatialaudio --disable-speex \
--disable-speexdsp --disable-taglib --disable-zvbi \
--disable-rnnoise \
--host=wasm32-unknown-emscripten
diagnostic "vlc contribs: make"
if [ "$VLC_USE_PREBUILT_CONTRIBS" -eq "0" ]; then
emmake make
if [ "$GENERATE_ARCHIVE" -eq "1" ]; then
diagnostic "vlc contribs: generating package"
emmake make package
fi
else
diagnostic "vlc contribs: using prebuilt contribs"
emmake make prebuilt PREBUILT_URL="$VLC_PREBUILT_CONTRIBS_URL"
fi
diagnostic "starting libvlc build"
BUILD_PATH=$VLC_SRCPATH/$BUILDDIR_NAME
mkdir -p "$BUILD_PATH"
diagnostic "vlc build dir: "
echo "$BUILD_PATH";
cd "$BUILD_PATH"
if [ $BUILD_MODE -eq 1 ]; then
diagnostic "libvlc build: bootstrap"
../bootstrap
diagnostic "libvlc build: configure"
# if_nameindex is not supported in emscripten
# ie: not exposed from musl to src/library.js
# the test in configure.ac fails because htons is not
# in tools/deps_info.py
# shm.h is a blacklisted module
emconfigure "$VLC_SRCPATH"/configure --host=wasm32-unknown-emscripten --enable-debug \
--disable-shared --disable-vlc \
--disable-sout --disable-vlm --disable-xcb --disable-lua \
--disable-addonmanagermodules --disable-ssp \
ac_cv_func_if_nameindex=yes ac_cv_header_sys_shm_h=no \
--with-contrib="$VLC_SRCPATH"/contrib/wasm32-unknown-emscripten
fi
diagnostic "libvlc build: make"
emmake make
diagnostic "libvlc build: generate static modules entry points"
# start by deleting the previous version so that it's not overwritten
rm -f "$BUILD_PATH"/vlc-modules.c "$BUILD_PATH"/vlc-modules.bc
# create module list
echo "creating module list"
FUN_PROTOS=""
FUN_LIST=""
for file in "$BUILD_PATH"/modules/.libs/*plugin.a
do
ENTRY=$(get_entryname "$file")
FUN_PROTOS="$FUN_PROTOS""int $ENTRY (int (*)(void *, void *, int, ...), void *);\n"
FUN_LIST="$FUN_LIST""$ENTRY,\n"
done;
printf "// This file is autogenerated
#include <stddef.h>
%b\n
const void *vlc_static_modules[] = {
%bNULL
};\n" "$FUN_PROTOS" "$FUN_LIST" \
> "$BUILD_PATH"/vlc-modules.c
diagnostic "vlc static modules: compiling static modules entry points"
# compile vlc-modules.c
emcc -pthread -c "$BUILD_PATH"/vlc-modules.c -o "$BUILD_PATH"/vlc-modules.bc
echo "VLC for wasm32-unknown-emscripten built!"
......@@ -185,7 +185,7 @@
# define VLC_USED
#endif
#if defined (__ELF__) || defined (__MACH__)
#if defined (__ELF__) || defined (__MACH__) || defined (__wasm__)
# define VLC_WEAK __attribute__((weak))
#else
/**
......
......@@ -691,6 +691,7 @@ int clock_getres(clockid_t clock_id, struct timespec *tp);
#ifndef _WIN32
# ifndef HAVE_CLOCK_NANOSLEEP
# include <time.h>
int clock_nanosleep(clockid_t clock_id, int flags,
const struct timespec *rqtp, struct timespec *rmtp);
# endif
......
......@@ -444,6 +444,19 @@ libvlccore_la_SOURCES += \
posix/timer.c
endif
if HAVE_EMSCRIPTEN
libvlccore_la_SOURCES += \
posix/thread.c \
posix/getaddrinfo.c \
posix/error.c \
posix/dirs.c \
posix/filesystem.c \
posix/specific.c \
posix/timer.c \
emscripten/netconf.c \
emscripten/thread.c
endif
if HAVE_DARWIN
libvlccore_la_SOURCES += \
darwin/error.c \
......@@ -487,8 +500,10 @@ if !HAVE_LINUX
libvlccore_la_SOURCES += posix/wait.c
endif
if !HAVE_ANDROID
if !HAVE_EMSCRIPTEN
libvlccore_la_SOURCES += posix/sort.c
endif
libvlccore_la_SOURCES += \
posix/sort.c \
posix/thread.c
if !HAVE_DARWIN
libvlccore_la_SOURCES += \
......
/*****************************************************************************
* vlc_getProxyUrl for emscripten
*****************************************************************************
* Copyright (C) 2021 - VideoLabs, VideoLAN and VLC Authors
*
* 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_common.h>
char *vlc_getProxyUrl(const char *url)
{
VLC_UNUSED(url);
return NULL;
}
/*****************************************************************************
* vlc_thread implementation for emscripten
*****************************************************************************
* Copyright (C) 2021 - VideoLabs, VideoLAN and VLC Authors
*
* 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 <pthread.h>
unsigned long vlc_thread_id(void)
{
return pthread_self();
}