File: GstElementFactory.t

package info (click to toggle)
libgstreamer-perl 0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 900 kB
  • ctags: 59
  • sloc: perl: 2,456; ansic: 32; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 886 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 12;

# $Id$

use Glib qw(TRUE FALSE);
use GStreamer -init;

my $factory = GStreamer::ElementFactory -> find("__nada__");
is($factory, undef);

$factory = GStreamer::ElementFactory -> find("queue");
isa_ok($factory, "GStreamer::ElementFactory");

# Can't reliably test this.
my $type = $factory -> get_element_type();

ok(defined $factory -> get_longname());
ok(defined $factory -> get_klass());
ok(defined $factory -> get_description());
ok(defined $factory -> get_author());

is($factory -> get_uri_type(), "unknown");
is($factory -> get_uri_protocols(), ());

isa_ok($factory -> create("urgs"), "GStreamer::Element");
isa_ok(GStreamer::ElementFactory -> make(queue => "urgs"), "GStreamer::Element");

my $caps = GStreamer::Caps::Any -> new();
ok($factory -> can_src_caps($caps));
ok($factory -> can_sink_caps($caps));