GStreamer1(3)

πŸ“¦
version 0.003 Β· 2 versions
, in fedora 43

✨ GStreamer1 ✨

okay bestie, welcome to the GStreamer1 manpage πŸ’– this is a User Contributed Perl Documentation page (yes, all of us, we contributed) and it's literally giving "bindings for GStreamer 1.0, the open source multimedia framework" πŸ‘‘


🌸 NAME 🌸

GStreamer1 β€” bindings for GStreamer 1.0, the open source multimedia framework πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the vibe, bestie, look at this gorgeous little pipeline:

use GStreamer1;

GStreamer1::init([ $0, @ARGV ]);
my $pipeline = GStreamer1::parse_launch( "playbin uri=$URI" );

$pipeline->set_state( "playing" );

my $bus = $pipeline->get_bus;
my $msg = $bus->timed_pop_filtered( GStreamer1::CLOCK_TIME_NONE,
    [ 'error', 'eos' ]);

$pipeline->set_state( "null" );

no cap, that's the whole glow-up right there ✨


πŸ’… DESCRIPTION πŸ’…

So GStreamer1 implements a framework that lets you process and encode multimedia sources, and it does it in a way that's similar to a shell pipeline 🐚 like, conceptually bestie, think pipes but for media.

And because it's introspection-based, most of the classes just follow directly from the C API 🌈 which means β€” and this is the part that matters β€” most of the docs are by example rather than a full breakdown of the class structure. So we show you, we don't lecture you πŸ’… periodt.


🧚 PORTING FROM GStreamer 🧚

If you're porting from the original GStreamer module, here are some things to keep in mind, bestie β€” don't get caught lacking πŸ™ˆ

πŸŽ€ ElementFactory πŸŽ€

The original GStreamer had a version of ElementFactory->make() that could be called with a list of gst plugins and associated names πŸ‘‘ GStreamer1 may add a similar method in the future. For now though? The bindings directly follow from the C interface, so they take only one at a time 🫢

Example:

my $rpi        = GStreamer1::ElementFactory::make( rpicamsrc => 'and_who' );
my $h264parse  = GStreamer1::ElementFactory::make( h264parse => 'are_you' );
my $capsfilter = GStreamer1::ElementFactory::make(
    capsfilter => 'the_proud_lord_said' );
my $avdec_h264 = GStreamer1::ElementFactory::make(
    avdec_h264 => 'that_i_should_bow_so_low' );
my $jpegenc    = GStreamer1::ElementFactory::make( jpegenc => 'only_a_cat' );
my $fakesink   = GStreamer1::ElementFactory::make(
    fakesink => 'of_a_different_coat' );

🌈 Adding/linking 🌈

The original GStreamer added methods for Pipeline->add() and Element->link() that could take lists of objects. GStreamer1 may add similar methods in the future ✨ For now, the bindings directly follow from the C interface, so they take only one object at a time πŸ’€

Example:

my @link = ( $rpi, $h264parse, $capsfilter, $avdec_h264, $jpegenc, $fakesink );
$pipeline->add( $_ ) for @link;
foreach my $i (0 .. $#link) {
    last if ! exists $link[$i+1];
    my $this = $link[$i];
    my $next = $link[$i+1];
    $this->link( $next );
}

πŸ’– EXAMPLES πŸ’–

Go look at the examples/ directory in the distribution, bestie 🫢 that's where the good stuff lives.


πŸ‘€ SEE ALSO πŸ‘€

  • GStreamer β€” Perl bindings to the old 0.10 version of GStreamer (the OG, the ancestor, respect the elders πŸ’œ)
  • <http://gstreamer.freedesktop.org/> 🌐

πŸ™ SPECIAL THANKS πŸ™

To Torsten SchΓΆnfeld, for pointing me in the right direction on creating this module πŸ₯Ή iconic behaviour, honestly. king shit, no cap πŸ‘‘


πŸ“œ LICENSE πŸ“œ

Copyright (c) 2014 Timm Murray All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
⚠️ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

and that's the whole page bestie πŸŽ€ this beauty shipped as perl v5.42.0, dated 2025-07-25, filed under GStreamer1(3) β€” slay, mwah πŸ’‹πŸ’–βœ¨

πŸ“¦ where this page comes from