Skip to content

Instantly share code, notes, and snippets.

@sidsethupathi
Created January 23, 2024 16:21
Show Gist options
  • Save sidsethupathi/86474e38b1161ae9b81c3df2dd08be11 to your computer and use it in GitHub Desktop.
Save sidsethupathi/86474e38b1161ae9b81c3df2dd08be11 to your computer and use it in GitHub Desktop.
gstreamer + cef blacklist
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
config.vm.box = "ubuntu/jammy64"
config.vm.define "wbcw"
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
config.vm.network "forwarded_port", guest: 3000, host: 3000, host_ip: "127.0.0.1"
config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: "target/*", rsync__auto: true, rsync__verbose: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y x11-apps \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools \
gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 \
gstreamer1.0-qt5 gstreamer1.0-pulseaudio build-essential cmake graphviz
SHELL
config.vm.provision "shell", privileged: false, inline: <<-SHELL
git clone https://github.com/centricular/gstcefsrc
cd gstcefsrc
mkdir -p build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make
echo 'export GST_PLUGIN_PATH=/home/vagrant/gstcefsrc/build/Release:$GST_PLUGIN_PATH' >> ~/.bashrc
if ! grep -q "cd /vagrant" ~/.bashrc ; then
echo "cd /vagrant" >> ~/.bashrc
fi
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment