hi

try Glib::Object::Introspection::GValueWrapper like here:
https://gist.github.com/vividsnow/06e8eb21165d6f01a8bf#file-gstreamer-video-test-pl-L17


On 11/20/2014 05:52 AM, Timm Murray wrote:
> Moved the namespace to GStreamer1.  Renamed the github repo as well:
> 
> https://github.com/frezik/GStreamer1
> 
> I also cleaned up the examples to be more idiomatic.
> 
> I'm getting stuck on how to set parameters on the caps.  What I have now is:
> 
>     my $caps = GStreamer1::Caps->new_empty_simple( 'video/x-h264' );
>     $caps->set_value( width => 800 );
>     $caps->set_value( height => 600 );
> 
> 
> This gives me the error "Cannot convert arbitrary SV to GValue".
> 
> In the original GStreamer Perl module, setting caps was done something like 
> this:
> 
>     my $caps = GStreamer::Caps::Simple->new( 'video/x-h264',
>         alignment       => 'Glib::String' => 'au',
>         'stream-format' => 'Glib::String' => 'byte-stream',
>     );
> 
> This constructor, in particular setting the Glib type, seems to be a bit of 
> syntactic sugar handled here:
> 
> https://metacpan.org/source/XAOC/GStreamer-0.19/xs/GstCaps.xs
> 
> Around line 46.
> 
> Is there a way to coerce the type information?
> 
> Thanks,
> Timm
> 
> On Tue, Nov 18, 2014 at 4:09 PM, Timm Murray <tmur...@wumpus-cave.net 
> <mailto:tmur...@wumpus-cave.net>> wrote:
> 
>     I should be coming back around to this over the next few days.  I 
> probably will cleanup the examples along those lines.
> 
>     My main priority is getting a more complex pipeline going with callbacks 
> on a fakesink.  That should provide a solid example, and hit on my original 
> goal for the
>     project (getting still images and video off the Raspberry Pi camera 
> without an external program).
> 
>     Thanks,
>     Timm
> 
>     On Tue, Nov 18, 2014 at 2:42 PM, Torsten Schoenfeld <kaffeeti...@gmx.de 
> <mailto:kaffeeti...@gmx.de>> wrote:
> 
>         On 13.11.2014 00:01, Timm Murray wrote:
>         > Thanks, I was able to get a basic pipeline going:
>         >
>         > https://github.com/frezik/Gst
> 
>         I don't know if you've changed it yet, but in your examples/hello.pl 
> <http://hello.pl>,
>         you can write some things more idiomatically.  Instead of
> 
>         Gst::Element::set_state( $pipeline, "playing" );
>         my $bus = Gst::Element::get_bus( $pipeline );
>         my $msg = $bus->timed_pop_filtered( Gst::CLOCK_TIME_NONE,
>                                             [ 'error', 'eos' ]);
>         Gst::Element::set_state( $pipeline, "null" );
> 
>         make use of the class hierarchy to write
> 
>         $pipeline->set_state( "playing" );
>         my $bus = $pipeline->get_bus;
>         my $msg = $bus->timed_pop_filtered( Gst::CLOCK_TIME_NONE,
>                                             [ 'error', 'eos' ]);
>         $pipeline->set_state( "null" );
>         _______________________________________________
>         gtk-perl-list mailing list
>         gtk-perl-list@gnome.org <mailto:gtk-perl-list@gnome.org>
>         https://mail.gnome.org/mailman/listinfo/gtk-perl-list
> 
> 
> 
> 
> 
> _______________________________________________
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
> 
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to