Snec / gst-gz

GStreamer plugin for gzip and zlib compression and decompression.
GNU Lesser General Public License v2.1
3 stars 1 forks source link
gstreamer gzip zlib

zlib based GStreamer plugins

This project provides GStreamer plugins in order to compress and decompress data with zlib.

Two plugins are provided:

Two formats are supported for now:

GStreamer 1.0 and 0.10 are both supported.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

These plugins have been tested on Ubuntu 16.04

You should install those dependencies:

# Basic build tools:
sudo apt-get install git build-essential automake libtool itstool gtk-doc-tools yelp-tools gnome-common gnome-doc-utils yasm flex bison

# Zlib:
sudo apt install zlib1g-dev

# GStreamer 1.0:
sudo apt install gstreamer1.0-plugins-base libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgstreamer1.0-0

# GStreamer 0.10:
sudo apt install gstreamer0.10-plugins-base libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev libgstreamer0.10-0

Installing

Clone the git repository:

git clone https://github.com/Snec/gst-gz.git

Build and install the plugins:

cd gst-gz
./autogen.sh
./configure --with-gstreamer-api=1.0
make
sudo make install

You can choose which GStreamer version to use with the --with-gstreamer-api option. (--with-gstreamer-api=0.10 to use GStreamer 0.10)

Running tests on plugins

echo "This is a test ..." > file.txt 
GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 gst-launch-1.0 -v filesrc location=file.txt ! gzenc ! filesink location=file.txt.gz
GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 gst-launch-1.0 -v filesrc location=file.txt.gz ! gzdec ! filesink location=file_dec.txt
if cmp -s "file.txt" "file_dec.txt"; then echo "Test failed"; else echo "Test succed"; fi

Plugins details

gzenc

Pad Templates:

SRC template: 'src' Availability: Always Capabilities: application/x-gzip

SINK template: 'sink' Availability: Always Capabilities: ANY

Element Properties:

gzdec

Pad Templates:

SINK template: 'sink' Availability: Always Capabilities: application/x-gzip

SRC template: 'src' Availability: Always Capabilities: ANY

Element Properties:

Todo

Add support for deflate compressed format (RFC 1951)

Author

License

This project is licensed under the LGPL License - see the LICENSE file for details.