| Server IP : 185.11.201.71 / Your IP : 192.168.7.18 Web Server : Apache/2.4.29 (Ubuntu) System : Linux tech-virtual-machine 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 User : tech ( 1000) PHP Version : 7.4.28 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /snap/gnome-46-2404/164/usr/bin/ |
Upload File : |
#!/usr/bin/perl -w
=head1 NAME
dh_gstscancodecs - enumerate and classify gstreamer codecs
=cut
use strict;
use Debian::Debhelper::Dh_Lib;
use File::Temp;
=head1 SYNOPSIS
dh_gstscancodecs [debhelper options]
=head1 DESCRIPTION
This program is meant to assist in building a package that provides
codecs, demultiplexers and other media-handling components for
gstreamer-based applications.
dh_gstscancodecs generates substitution variable for debian/control,
by scanning libraries /usr/lib/gstreamer-1.0/*.so and
/usr/lib/$DEB_HOST_MULTIARCH/gstreamer-1.0/*.so.
The generated substitution variables are
=over 4
=item gstreamer:Version
Should be added to XB-GStreamer-Version
=item gstreamer:Elements
Should be added to XB-GStreamer-Elements
=item gstreamer:Provides
Should be added to Provides
=item gstreamer:URISources
Should be added to XB-GStreamer-URI-Sources
=item gstreamer:URISinks
Should be added to XB-GStreamer-URI-Sinks
=item gstreamer:Encoders
Should be added to XB-GStreamer-Encoders
=item gstreamer:Decoders
Should be added to XB-GStreamer-Decoders
=back
This control fields will be used by the /usr/bin/gstreamer-codec-install
helper to install required missing GStreamer elements.
=head1 OPTIONS
The standard debhelper options are supported.
=cut
init();
my $deb_host_multiarch = `dpkg-architecture -qDEB_HOST_MULTIARCH`;
chop $deb_host_multiarch;
my $libdir = '/usr/lib/'.$deb_host_multiarch;
$::pluginlibdirprefix = $libdir.'/gstreamer-';
$::pluginlibdirlegacy = '/usr/lib/gstreamer-';
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp = tmpdir($package);
delsubstvar($package, "gstreamer:Version");
delsubstvar($package, "gstreamer:URISinks");
delsubstvar($package, "gstreamer:URISources");
delsubstvar($package, "gstreamer:Encoders");
delsubstvar($package, "gstreamer:Decoders");
foreach my $sodir (glob "$tmp$::pluginlibdirprefix* $tmp$::pluginlibdirlegacy*") {
my $gstversion = $sodir;
$gstversion =~ s/^$tmp$::pluginlibdirprefix//;
$gstversion =~ s/^$tmp$::pluginlibdirlegacy//;
verbose_print("# gstreamer version $gstversion");
my (undef, $tmpfile) = File::Temp::tempfile("/tmp/".basename($0).".XXXX", UNLINK => 1);
my (undef, $registryfile) = File::Temp::tempfile("/tmp/".basename($0).".XXXX", UNLINK => 1);
my $command="GST_REGISTRY=$registryfile GST_PLUGIN_SYSTEM_PATH= GST_PLUGIN_PATH=$sodir $libdir/gstreamer$gstversion/gstreamer-$gstversion/gst-codec-info-$gstversion " . join(' ', (glob "$sodir/*.so")) . " > $tmpfile";
system($command);
if ($?) {
my $output;
{
local *F;
open(F, $tmpfile);
local $/;
$output = <F>;
close(F);
}
die("gst-codec-info-$gstversion call failed: '".$command."' rc: $? output: $output");
}
local *F;
open(F, $tmpfile);
my ($variable, $value);
while(<F>) {
$variable = $1 if /([a-zA-Z]*:[a-zA-Z]*)=/;
$value = $2 if /([a-zA-Z]*:[a-zA-Z]*)=(.*)\n/;
addsubstvar($package, $variable, $value);
}
}
}
=head1 SEE ALSO
L<debhelper(1)>
This program is an extension to debhelper.
=head1 AUTHOR
Ian Jackson <iwj@ubuntu.com>
Sebastian Dröge <sebastian.droege@collabora.co.uk>
=cut