Commit bfd77c0c authored by Marlene Böhmer's avatar Marlene Böhmer

Update gstreamer and video states.

parent 8b70bc6a
gstreamer:
{%- if grains['osrelease'] == '16.04' %}
version: "1.10"
{%- elif grains['osrelease'] == '18.04' %}
version: "1.14"
{%- endif %}
{% set version = salt['pillar.get']('gstreamer:version') %}
gstreamer_uninstalled_packages:
pkg.installed:
- pkgs:
- git
- autopoint
- bison
- flex
- pkg-config
- libx264-dev
- v4l-utils
- libglib2.0-dev
- liborc-0.4-dev
gst_uninstalled_script:
file.managed:
- name: /opt/rna/create-uninstalled-setup.sh
- source: salt://gstreamer/files/create-uninstalled-setup.sh
- user: rna
- group: rna
- template: jinja
- context:
gst_version: '{{ version }}'
gst_uninstalled_create:
cmd.run:
- name: /bin/sh /opt/rna/create-uninstalled-setup.sh
- runas: rna
- unless: ls /home/rna/gst/{{version}}/gstreamer/scripts/gst-uninstalled
- require:
- pkg: gstreamer_packages
- file: gst_uninstalled_script
gst_uinstalled_symlink:
file.symlink:
- name: /home/rna/bin/gst-{{version}}
- target: /home/rna/gst/{{version}}/gstreamer/scripts/gst-uninstalled
- user: rna
- makedirs: True
gst_gstreamer_build_script:
file.managed:
- name: /home/rna/gst_build.sh
- source: salt://gstreamer/files/build.sh
- user: rna
- group: rna
- mode: 777
- template: jinja
- context:
gst_version: '{{ version }}'
gst_gstreamer_build:
cmd.run:
- name: ./bin/gst-{{version}} "./gst_build.sh"
- cwd: /home/rna/
- runas: rna
gst_plugins:
file.directory:
- name: /home/rna/gst/{{version}}/plugins
- user: rna
- group: rna
- require:
- user: user_rna
- group: group_rna
......@@ -6,66 +6,23 @@ include:
gstreamer_packages:
pkg.installed:
- pkgs:
- git
- autopoint
- bison
- flex
- pkg-config
- libx264-dev
- v4l-utils
- libglib2.0-dev
- liborc-0.4-dev
- libgstreamer1.0-dev
- libgstreamer-plugins-base1.0-dev
gst_uninstalled_script:
file.managed:
- name: /opt/rna/create-uninstalled-setup.sh
- source: salt://gstreamer/files/create-uninstalled-setup.sh
- user: rna
- group: rna
- template: jinja
- context:
gst_version: '{{ version }}'
gst_uninstalled_create:
cmd.run:
- name: /bin/sh /opt/rna/create-uninstalled-setup.sh
- runas: rna
- unless: ls /home/rna/gst/{{version}}/gstreamer/scripts/gst-uninstalled
- require:
- pkg: gstreamer_packages
- file: gst_uninstalled_script
gst_uinstalled_symlink:
file.symlink:
- name: /home/rna/bin/gst-{{version}}
- target: /home/rna/gst/{{version}}/gstreamer/scripts/gst-uninstalled
- user: rna
- makedirs: True
gst_gstreamer_build_script:
file.managed:
- name: /home/rna/gst_build.sh
- source: salt://gstreamer/files/build.sh
- user: rna
- group: rna
- mode: 777
- template: jinja
- context:
gst_version: '{{ version }}'
gst_gstreamer_build:
cmd.run:
- name: ./bin/gst-{{version}} "./gst_build.sh"
- cwd: /home/rna/
- runas: rna
{% if pillar["video"]["role"] == "receiver" %}
include:
- gstreamer.gst_uninstalled
{% endif %}
gst_plugins:
file.directory:
- name: /home/rna/gst/{{version}}/plugins
- user: rna
- group: rna
- require:
- user: user_rna
- group: group_rna
{% if pillar["video"]["role"] == "sender" %}
system_gstreamer_packages:
pkg.installed:
- pkgs:
- libgstreamer1.0-0
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-plugins-bad
- gstreamer1.0-plugins-ugly
- gstreamer1.0-libav
- gstreamer1.0-tools
{% endif %}
......@@ -3,6 +3,10 @@
video_app:
cmd.run:
{% if pillar["video"]["role"] == "receiver" %}
- name: ./bin/gst-{{version}} /opt/rna/video/build.sh {{ role }}
{% elif pillar["video"]["role"] == "sender" %}
- name: /opt/rna/video/build.sh {{ role }}
{% endif %}
- runas: rna
- cwd: /home/rna
......@@ -41,7 +41,11 @@ gst_plugin_build:
- group: rna
- mode: 770
cmd.run:
{% if pillar["video"]["role"] == "receiver" %}
- name: ./bin/gst-{{version}} ./build_prrt_plugin.sh
{% elif pillar["video"]["role"] == "sender" %}
- name: ./build_prrt_plugin.sh
{% endif %}
- cwd: /home/rna
- runas: rna
- watch:
......@@ -49,6 +53,8 @@ gst_plugin_build:
- require:
- cmd: prrt_build
{% if pillar["video"]["role"] == "receiver" %}
gst_plugin_symlink:
file.symlink:
- name: /home/rna/gst/{{version}}/plugins/prrt
......@@ -56,6 +62,16 @@ gst_plugin_symlink:
- user: rna
- makedirs: True
{% elif pillar["video"]["role"] == "sender" %}
gst_plugin_path:
file.append:
- name: /home/rna/.bashrc
- text: export GST_PLUGIN_PATH=/opt/rna/video/gst_plugin/plugin/
{% endif %}
video_build_app_script:
file.managed:
- name: /opt/rna/video/build.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment