Re: Porting perl-GStreamer to gst 1.0

2014-12-07 Thread Brian Manning
GStreamer(0) looks explicitly for libgstreamer-0.10, as per this block
of code in Makefile.PL:

unless (eval { %pkgcfg = ExtUtils::PkgConfig->find (
 "gstreamer-0.10 >= $build_reqs{'libgstreamer'}");
   1; })

So there's no more changes needed to GStreamer(0) as far as I can see.

Thanks,

Brian

On Sat, Dec 6, 2014 at 10:53 AM, Brian Manning  wrote:
> One other thing I saw but forgot to ask about;  here's the %build_reqs
> for GStreamer(0):
>
> our %build_reqs = (
>   'perl-ExtUtils-Depends'   => '0.205',
>   'perl-ExtUtils-PkgConfig' => '1.07',
>   'perl-Glib'   => '1.180',
>   'libgstreamer'=> '0.10.0',
> );
>
> Would it work/be worthwhile to have 'libgstreamer' in there twice,
> i.e. once with "=> '0.10.0'" and once with "<= '0.11.0'"?  (N.B. I
> think 0.11.x was the beta series for 1.0.0).
>
> I can try it later today with both greater than and less than tests in
> Makefile.PL to see how MakeMaker reacts.
>
> Thanks,
>
> Brian
>
>
> On Sat, Dec 6, 2014 at 3:29 AM, Torsten Schönfeld
>  wrote:
>> On 06.12.2014 07:01, Brian Manning wrote:
>>>
>>> I made some changes to the docs for GStreamer(0), with notes about
>>> both C libs/Perl modules being able to be installed concurrently, as
>>> well as links to GStreamer1.
>>
>>
>> Looks good to me.  Thanks, Brian!
>>
>> ___
>> 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


Re: Porting perl-GStreamer to gst 1.0

2014-12-06 Thread Brian Manning
One other thing I saw but forgot to ask about;  here's the %build_reqs
for GStreamer(0):

our %build_reqs = (
  'perl-ExtUtils-Depends'   => '0.205',
  'perl-ExtUtils-PkgConfig' => '1.07',
  'perl-Glib'   => '1.180',
  'libgstreamer'=> '0.10.0',
);

Would it work/be worthwhile to have 'libgstreamer' in there twice,
i.e. once with "=> '0.10.0'" and once with "<= '0.11.0'"?  (N.B. I
think 0.11.x was the beta series for 1.0.0).

I can try it later today with both greater than and less than tests in
Makefile.PL to see how MakeMaker reacts.

Thanks,

Brian


On Sat, Dec 6, 2014 at 3:29 AM, Torsten Schönfeld
 wrote:
> On 06.12.2014 07:01, Brian Manning wrote:
>>
>> I made some changes to the docs for GStreamer(0), with notes about
>> both C libs/Perl modules being able to be installed concurrently, as
>> well as links to GStreamer1.
>
>
> Looks good to me.  Thanks, Brian!
>
> ___
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-12-06 Thread Torsten Schönfeld

On 06.12.2014 07:01, Brian Manning wrote:

I made some changes to the docs for GStreamer(0), with notes about
both C libs/Perl modules being able to be installed concurrently, as
well as links to GStreamer1.


Looks good to me.  Thanks, Brian!
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-12-05 Thread Brian Manning
Hi all,

I made some changes to the docs for GStreamer(0), with notes about
both C libs/Perl modules being able to be installed concurrently, as
well as links to GStreamer1.

If nobody sees any problems with the attached patches, I'll push to
git.gnome.org and do a release on December's release date, Saturday
December 20th at 00:00UTC.

You can also clone my *UNOFFICIAL* git repo with the attached patches
already committed at:

https://github.com/cpanxaoc/perl-GStreamer.git

Note that since this git repo is an unofficial, private repo, I can
and may use 'git push --force' on it at any time.  You have been
warned.

Please let me know if you have any questions.

Thanks,

Brian


On Sun, Nov 23, 2014 at 10:54 AM, Brian Manning  wrote:
> I can change the docs in the next few days, making a note about the
> different library versions and a link to new module for Gstreamer1,
> then push a release of Gstreamer0 to CPAN.
>
> Thanks,
>
> Brian
>
> On Sun, Nov 23, 2014 at 1:04 AM, Kaare Rasmussen  wrote:
>> Hi Timm
>>
>> This is great stuff, thanks.
>>
>> Now, if anyone has control over the GStreamer module, I think a "forward"
>> reference to GStreamer1 would be beneficial for someone finding it on search
>> or meta cpan.
>>
>> Thanks for pointing those out.  The sintel trailer got taken along for the
>> ride from my own testing.  I removed it and also updated the POD.  New
>> version was just uploaded to CPAN.
>>
>> On Sat, Nov 22, 2014 at 7:39 AM, Torsten Schönfeld 
>> wrote:
>>>
>>> On 22.11.2014 03:58, Timm Murray wrote:

 Got it all working using appsink rather than fakesink, which is probably
 more appropriate.  It avoids the use of a callback (which I'm still not
 sure what I was doing wrong there).

 Anyway, that gets me to where I wanted to be.  I'll be throwing it up on
 CPAN.
>>>
>>>
>>> Thanks for making your code available!  Two notes:
>>>
>>> * Is it intentional that the distribution contains the 10MB
>>> sintel_trailer-480p.webm?  The tests don't seem to use it.
>>>
>>> * The POD doesn't render correctly in two places due to missing spaces in
>>> in code citations like "C>", which should be "C<<
>>> ElementFactory->make() >>".
>>>
>>> ___
>>> 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
>>
>>
>>
>> ___
>> gtk-perl-list mailing list
>> gtk-perl-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
>>


0001-copyright.pod-updated-copyright-year.patch
Description: Binary data


0002-README-Add-note-for-and-link-to-new-GStreamer1-modul.patch
Description: Binary data


0003-GStreamer.pm-Announce-link-to-new-GStreamer1-module.patch
Description: Binary data
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-25 Thread David


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-23 Thread Brian Manning
I can change the docs in the next few days, making a note about the
different library versions and a link to new module for Gstreamer1,
then push a release of Gstreamer0 to CPAN.

Thanks,

Brian

On Sun, Nov 23, 2014 at 1:04 AM, Kaare Rasmussen  wrote:
> Hi Timm
>
> This is great stuff, thanks.
>
> Now, if anyone has control over the GStreamer module, I think a "forward"
> reference to GStreamer1 would be beneficial for someone finding it on search
> or meta cpan.
>
> Thanks for pointing those out.  The sintel trailer got taken along for the
> ride from my own testing.  I removed it and also updated the POD.  New
> version was just uploaded to CPAN.
>
> On Sat, Nov 22, 2014 at 7:39 AM, Torsten Schönfeld 
> wrote:
>>
>> On 22.11.2014 03:58, Timm Murray wrote:
>>>
>>> Got it all working using appsink rather than fakesink, which is probably
>>> more appropriate.  It avoids the use of a callback (which I'm still not
>>> sure what I was doing wrong there).
>>>
>>> Anyway, that gets me to where I wanted to be.  I'll be throwing it up on
>>> CPAN.
>>
>>
>> Thanks for making your code available!  Two notes:
>>
>> * Is it intentional that the distribution contains the 10MB
>> sintel_trailer-480p.webm?  The tests don't seem to use it.
>>
>> * The POD doesn't render correctly in two places due to missing spaces in
>> in code citations like "C>", which should be "C<<
>> ElementFactory->make() >>".
>>
>> ___
>> 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
>
>
>
> ___
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-23 Thread Kaare Rasmussen

Hi Timm

This is great stuff, thanks.

Now, if anyone has control over the GStreamer module, I think a 
"forward" reference to GStreamer1 would be beneficial for someone 
finding it on search or meta cpan.


Thanks for pointing those out.  The sintel trailer got taken along for 
the ride from my own testing.  I removed it and also updated the POD.  
New version was just uploaded to CPAN.


On Sat, Nov 22, 2014 at 7:39 AM, Torsten Schönfeld > wrote:


On 22.11.2014 03:58, Timm Murray wrote:

Got it all working using appsink rather than fakesink, which
is probably
more appropriate.  It avoids the use of a callback (which I'm
still not
sure what I was doing wrong there).

Anyway, that gets me to where I wanted to be.  I'll be
throwing it up on
CPAN.


Thanks for making your code available!  Two notes:

* Is it intentional that the distribution contains the 10MB
sintel_trailer-480p.webm?  The tests don't seem to use it.

* The POD doesn't render correctly in two places due to missing
spaces in in code citations like "C>",
which should be "C<< ElementFactory->make() >>".

___
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


___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-22 Thread Timm Murray
Thanks for pointing those out.  The sintel trailer got taken along for the
ride from my own testing.  I removed it and also updated the POD.  New
version was just uploaded to CPAN.

On Sat, Nov 22, 2014 at 7:39 AM, Torsten Schönfeld 
wrote:

> On 22.11.2014 03:58, Timm Murray wrote:
>
>> Got it all working using appsink rather than fakesink, which is probably
>> more appropriate.  It avoids the use of a callback (which I'm still not
>> sure what I was doing wrong there).
>>
>> Anyway, that gets me to where I wanted to be.  I'll be throwing it up on
>> CPAN.
>>
>
> Thanks for making your code available!  Two notes:
>
> * Is it intentional that the distribution contains the 10MB
> sintel_trailer-480p.webm?  The tests don't seem to use it.
>
> * The POD doesn't render correctly in two places due to missing spaces in
> in code citations like "C>", which should be "C<<
> ElementFactory->make() >>".
>
> ___
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-22 Thread Torsten Schönfeld

On 22.11.2014 03:58, Timm Murray wrote:

Got it all working using appsink rather than fakesink, which is probably
more appropriate.  It avoids the use of a callback (which I'm still not
sure what I was doing wrong there).

Anyway, that gets me to where I wanted to be.  I'll be throwing it up on
CPAN.


Thanks for making your code available!  Two notes:

* Is it intentional that the distribution contains the 10MB 
sintel_trailer-480p.webm?  The tests don't seem to use it.


* The POD doesn't render correctly in two places due to missing spaces 
in in code citations like "C>", which should be 
"C<< ElementFactory->make() >>".

___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-21 Thread Timm Murray
Got it all working using appsink rather than fakesink, which is probably
more appropriate.  It avoids the use of a callback (which I'm still not
sure what I was doing wrong there).

Anyway, that gets me to where I wanted to be.  I'll be throwing it up on
CPAN.

On Thu, Nov 20, 2014 at 9:06 PM, Timm Murray 
wrote:

> Things done:
>
> * Used Glib::Object::Introspection::GValueWrapper to wrap types for caps.
> This is wrapped in GStreamer1::Caps::Simple to mimic the original GStreamer
> Perl module
> * Fleshed out docs, particularly some porting notes
> * Fleshed out adding to the pipeline and linking elements in examples/
> rpi_src.pl
>
> All the above has been pushed to github.
>
> In examples/rpi_src.pl, a callback is being set on a fakesink to grab the
> jpeg and save it to a file.  It doesn't seem that this is getting called.
> The light does come on for my Raspberry Pi's camera module, so the pipeline
> should be running and grabbing data from the camera.
>
> I realize that this could be done more simply by setting
> "location=/path/to/file" on a filesink, but I want to do it this way
> because:
>
> 1) I want to provide an example of using a signal callback
> 2) My app needs to do more than just save the data to the file
>
> Feel like things are really close now.
>
> Thanks,
> Timm
>
> On Thu, Nov 20, 2014 at 2:46 AM, "Torsten Schönfeld" 
> wrote:
>
>> vividsnow :
>> > try Glib::Object::Introspection::GValueWrapper like here:
>> >
>> https://gist.github.com/vividsnow/06e8eb21165d6f01a8bf#file-gstreamer-video-test-pl-L17
>>
>> Exactly.  See [1] for a short explanation.  You would probably make those
>> people happy that try to port from GStreamer to GStreamer1 if you try to
>> emulate the old caps API, as tested in GStreamer/t/GstCaps.t.  On the other
>> hand, I just realized that you might be able to automatically determine the
>> type information via GStreamer1::Structure::get_field_type [2], which would
>> allow you to get rid of the type argument.
>>
>> [1] <
>> https://metacpan.org/pod/Glib::Object::Introspection#Converting-a-Perl-variable-to-a-GValue
>> >
>> [2] <
>> https://developer.gnome.org/gstreamer/stable/gstreamer-GstStructure.html#gst-structure-get-field-type
>> >
>> ___
>> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-20 Thread Timm Murray
Things done:

* Used Glib::Object::Introspection::GValueWrapper to wrap types for caps.
This is wrapped in GStreamer1::Caps::Simple to mimic the original GStreamer
Perl module
* Fleshed out docs, particularly some porting notes
* Fleshed out adding to the pipeline and linking elements in examples/
rpi_src.pl

All the above has been pushed to github.

In examples/rpi_src.pl, a callback is being set on a fakesink to grab the
jpeg and save it to a file.  It doesn't seem that this is getting called.
The light does come on for my Raspberry Pi's camera module, so the pipeline
should be running and grabbing data from the camera.

I realize that this could be done more simply by setting
"location=/path/to/file" on a filesink, but I want to do it this way
because:

1) I want to provide an example of using a signal callback
2) My app needs to do more than just save the data to the file

Feel like things are really close now.

Thanks,
Timm

On Thu, Nov 20, 2014 at 2:46 AM, "Torsten Schönfeld" 
wrote:

> vividsnow :
> > try Glib::Object::Introspection::GValueWrapper like here:
> >
> https://gist.github.com/vividsnow/06e8eb21165d6f01a8bf#file-gstreamer-video-test-pl-L17
>
> Exactly.  See [1] for a short explanation.  You would probably make those
> people happy that try to port from GStreamer to GStreamer1 if you try to
> emulate the old caps API, as tested in GStreamer/t/GstCaps.t.  On the other
> hand, I just realized that you might be able to automatically determine the
> type information via GStreamer1::Structure::get_field_type [2], which would
> allow you to get rid of the type argument.
>
> [1] <
> https://metacpan.org/pod/Glib::Object::Introspection#Converting-a-Perl-variable-to-a-GValue
> >
> [2] <
> https://developer.gnome.org/gstreamer/stable/gstreamer-GstStructure.html#gst-structure-get-field-type
> >
> ___
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-20 Thread Torsten Schönfeld
vividsnow :
> try Glib::Object::Introspection::GValueWrapper like here:
> https://gist.github.com/vividsnow/06e8eb21165d6f01a8bf#file-gstreamer-video-test-pl-L17

Exactly.  See [1] for a short explanation.  You would probably make those 
people happy that try to port from GStreamer to GStreamer1 if you try to 
emulate the old caps API, as tested in GStreamer/t/GstCaps.t.  On the other 
hand, I just realized that you might be able to automatically determine the 
type information via GStreamer1::Structure::get_field_type [2], which would 
allow you to get rid of the type argument.

[1] 

[2] 

___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-19 Thread vividsnow
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  > 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  > 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 
> ,
> 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 
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-19 Thread Timm Murray
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 
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 
> 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,
>> 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
>> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-18 Thread Timm Murray
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 
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,
> 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
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-18 Thread Torsten Schoenfeld
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,
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
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-14 Thread Ed .
Ed> If the CPAN GStreamer doesn’t work properly now, then it ought to be 
clobbered?
Timm> That's the thing--it works fine as far as it goes. It's just compiled 
against a deprecated version of the API (0.10), and there's no straightforward 
way to compile it against the new stuff (1.0).
Timm> Given the precedent set by Gtk2 and the like, I think making it 
GStreamer1 will be fine.

Me too.

Ed___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-14 Thread Timm Murray
Was working on this more last night and commented most of the Gst* libs
out.  Haven't yet pushed those changes.

The plain Gst typelib is loaded, there's just a little trick to it:

foreach my $name ('', ('Allocators', ...)) {
my $basename = 'Gst' . $name;
my $pkg  = $name
? 'Gst::' . $name
: 'Gst';
...
}

That initial empty string in the foreach loop will end up building
$basename and $pkg as 'Gst'.  I should probably comment that.

Ed> If the CPAN GStreamer doesn’t work properly now, then it ought to be
clobbered?

That's the thing--it works fine as far as it goes. It's just compiled
against a deprecated version of the API (0.10), and there's no
straightforward way to compile it against the new stuff (1.0).

Given the precedent set by Gtk2 and the like, I think making it GStreamer1
will be fine.

Thanks,
Timm

On Fri, Nov 14, 2014 at 2:33 AM, "Torsten Schönfeld" 
wrote:

> "Timm Murray" :
> > I've made a full module out of it as Gst::*.  I'm open to suggestions on
> the namespace; I don't necessarily want to clobber the existing
> > GStreamer module on CPAN.  I thought maybe doing GStreamer10, but
> putting the version in the namespace doesn't seem right, either.
>
> I agree that we should not reuse the "GStreamer" namespace, as people
> might still expect and rely on it to refer to 0.x bindings.  There's ample
> precedence of including the major version number in the namespace (Gtk2,
> Gtk3, Gnome2, etc.).  I don't think it's necessary to include the minor
> version in the namespace, as libgstreamer promises API stability in 1.x.
> So I'd suggest "GStreamer1".
>
> In your current module you unconditionally call
> Glib::Object::Introspection->setup for many typelibs which might not be
> installed on all systems.  The call will throw an exception in this case,
> which you should probably trap at least for the optional typelibs.  Also,
> you don't seem to be loading the base 'Gst-1.0' typelib, but it probably
> gets pulled in by the others.
> ___
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-14 Thread Torsten Schönfeld
"Ed ." :
> If the CPAN GStreamer doesn’t work properly now, then it ought to be 
> clobbered?

It does work properly with libgstreamer 0.x.
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-14 Thread Ed .
If the CPAN GStreamer doesn’t work properly now, then it ought to be clobbered?

From: Timm Murray 
Sent: Thursday, November 13, 2014 9:47 PM
To: gtk-perl-list@gnome.org 
Subject: Re: Porting perl-GStreamer to gst 1.0

Now that I check again, I think the time_popped_filtered() call was fine.  I 
was messing around with the URI passed to playbin so it didn't reference a full 
path on my own system.  I've corrected that now, and it seems to work as 
expected.


I've made a full module out of it as Gst::*.  I'm open to suggestions on the 
namespace; I don't necessarily want to clobber the existing GStreamer module on 
CPAN.  I thought maybe doing GStreamer10, but putting the version in the 
namespace doesn't seem right, either.


All recent changes are up on the github repo.


Thanks,
Timm


On Thu, Nov 13, 2014 at 3:19 AM, "Torsten Schönfeld"  wrote:

  "Timm Murray" :
  > Thanks, I was able to get a basic pipeline going:
  >
  > https://github.com/frezik/Gst

  Excellent!

  > The original C tutorial uses timed_pop_filtered() like this:
  >
  > msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, 
GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
  >
  > From what I gathered from Glib::Flags, this should work like this:
  >
  > my $msg = $bus->timed_pop_filtered( GStreamer::CLOCK_TIME_NONE, [ 'error', 
'eos' ]);
  >
  > But this causes the program to promptly exit without outputting anything.

  Your translation seems correct to me.  Maybe there is a problem with the 
wrapper GStreamer::CLOCK_TIME_NONE.  The original definition is

  #define GST_CLOCK_TIME_NONE ((GstClockTime) -1)

  GstClockTime is an unsigned 64 bit integer, so this expression will overflow. 
 The docs say the value should be 18446744073709551615 (i.e., 2^64-1).  What's 
the value of GStreamer::CLOCK_TIME_NONE for you?  (I can't test right now.)


  -Torsten
  ___
  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
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-14 Thread Torsten Schönfeld
"Timm Murray" :
> I've made a full module out of it as Gst::*.  I'm open to suggestions on the 
>namespace; I don't necessarily want to clobber the existing
> GStreamer module on CPAN.  I thought maybe doing GStreamer10, but putting the 
> version in the namespace doesn't seem right, either.

I agree that we should not reuse the "GStreamer" namespace, as people might 
still expect and rely on it to refer to 0.x bindings.  There's ample precedence 
of including the major version number in the namespace (Gtk2, Gtk3, Gnome2, 
etc.).  I don't think it's necessary to include the minor version in the 
namespace, as libgstreamer promises API stability in 1.x.  So I'd suggest 
"GStreamer1".

In your current module you unconditionally call 
Glib::Object::Introspection->setup for many typelibs which might not be 
installed on all systems.  The call will throw an exception in this case, which 
you should probably trap at least for the optional typelibs.  Also, you don't 
seem to be loading the base 'Gst-1.0' typelib, but it probably gets pulled in 
by the others.
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-13 Thread Timm Murray
Now that I check again, I think the time_popped_filtered() call was fine.
I was messing around with the URI passed to playbin so it didn't reference
a full path on my own system.  I've corrected that now, and it seems to
work as expected.

I've made a full module out of it as Gst::*.  I'm open to suggestions on
the namespace; I don't necessarily want to clobber the existing GStreamer
module on CPAN.  I thought maybe doing GStreamer10, but putting the version
in the namespace doesn't seem right, either.

All recent changes are up on the github repo.

Thanks,
Timm

On Thu, Nov 13, 2014 at 3:19 AM, "Torsten Schönfeld" 
wrote:

> "Timm Murray" :
> > Thanks, I was able to get a basic pipeline going:
> >
> > https://github.com/frezik/Gst
>
> Excellent!
>
> > The original C tutorial uses timed_pop_filtered() like this:
> >
> > msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
> GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
> >
> > From what I gathered from Glib::Flags, this should work like this:
> >
> > my $msg = $bus->timed_pop_filtered( GStreamer::CLOCK_TIME_NONE, [
> 'error', 'eos' ]);
> >
> > But this causes the program to promptly exit without outputting anything.
>
> Your translation seems correct to me.  Maybe there is a problem with the
> wrapper GStreamer::CLOCK_TIME_NONE.  The original definition is
>
> #define GST_CLOCK_TIME_NONE ((GstClockTime) -1)
>
> GstClockTime is an unsigned 64 bit integer, so this expression will
> overflow.  The docs say the value should be 18446744073709551615 (i.e.,
> 2^64-1).  What's the value of GStreamer::CLOCK_TIME_NONE for you?  (I can't
> test right now.)
>
> -Torsten
> ___
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-13 Thread Torsten Schönfeld
"Timm Murray" :
> Thanks, I was able to get a basic pipeline going:
> 
> https://github.com/frezik/Gst

Excellent!

> The original C tutorial uses timed_pop_filtered() like this:
> 
> msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR 
> | GST_MESSAGE_EOS);
> 
> From what I gathered from Glib::Flags, this should work like this:
> 
> my $msg = $bus->timed_pop_filtered( GStreamer::CLOCK_TIME_NONE, [ 'error', 
> 'eos' ]);
> 
> But this causes the program to promptly exit without outputting anything.

Your translation seems correct to me.  Maybe there is a problem with the 
wrapper GStreamer::CLOCK_TIME_NONE.  The original definition is

#define GST_CLOCK_TIME_NONE ((GstClockTime) -1)

GstClockTime is an unsigned 64 bit integer, so this expression will overflow.  
The docs say the value should be 18446744073709551615 (i.e., 2^64-1).  What's 
the value of GStreamer::CLOCK_TIME_NONE for you?  (I can't test right now.)

-Torsten
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-12 Thread Timm Murray
Thanks, I was able to get a basic pipeline going:

https://github.com/frezik/Gst

The script 'introspection.pl' builds the bindings and runs code based on
the GStreamer Hello, World! tutorial (
http://docs.gstreamer.com/pages/viewpage.action?pageId=327735).  The '
symdump.pl' script builds every Gst*-1.0.typelib that I have on my system
and dumps out all the packages it creates.

The while() loop to get the messages from $bus->timed_pop() is quick,
dirty, and wrong.  It does let the movie play, but it doesn't catch the
messages in meaningful ways.  The original C tutorial uses
timed_pop_filtered() like this:

msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
GST_MESSAGE_ERROR | GST_MESSAGE_EOS);

>From what I gathered from Glib::Flags, this should work like this:

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

But this causes the program to promptly exit without outputting anything.

In any case, this is enough for a running start.

Thanks,
Timm

On Wed, Nov 12, 2014 at 2:20 AM, "Torsten Schönfeld" 
wrote:

> "Timm Murray" :
> > Thanks, that was easy.  There were a couple critical symbols it didn't
> pick up, like GST_STATE_PLAYING (which I expect would become
> GStreamer::STATE_PLAYING).  I used Devel::Symdump to recursively drop
> everything under the 'GStreamer::' namespace and I couldn't find anything.
>
> GST_STATE_PLAYING is a member of the enum GstState, so it's wrapped like
> all enums in perl-Glib-based bindings: you simply use the short name
> string, i.e., "playing" in this case.
>
> Stuff like this is documented in Glib::Flags [1] and Gtk2::api [2], the
> latter of which we should get into the docs of
> Glib::Object::Introspection.  Patches welcome.
>
> [1] Automatically generated at build-time, and thus not visible on CPAN
> sites.
> [2] https://metacpan.org/pod/Gtk2::api
>
> -Torsten
> ___
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-12 Thread Torsten Schönfeld
"Timm Murray" :
> Thanks, that was easy.  There were a couple critical symbols it didn't pick 
> up, like GST_STATE_PLAYING (which I expect would become 
> GStreamer::STATE_PLAYING).  I used Devel::Symdump to recursively drop 
> everything under the 'GStreamer::' namespace and I couldn't find anything.

GST_STATE_PLAYING is a member of the enum GstState, so it's wrapped like all 
enums in perl-Glib-based bindings: you simply use the short name string, i.e., 
"playing" in this case.

Stuff like this is documented in Glib::Flags [1] and Gtk2::api [2], the latter 
of which we should get into the docs of Glib::Object::Introspection.  Patches 
welcome.

[1] Automatically generated at build-time, and thus not visible on CPAN sites.
[2] https://metacpan.org/pod/Gtk2::api

-Torsten
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Porting perl-GStreamer to gst 1.0

2014-11-11 Thread Timm Murray
Thanks, that was easy.  There were a couple critical symbols it didn't pick
up, like GST_STATE_PLAYING (which I expect would become
GStreamer::STATE_PLAYING).  I used Devel::Symdump to recursively drop
everything under the 'GStreamer::' namespace and I couldn't find anything.

There's a lot of magic going on underneath here that I don't understand.
My immediate thought is to use an xs module to pull in the missing
constants from gst/gst.h and then use the Glib::Object::Introspection to do
the harder parts.  But maybe there's a way to have Introspection do
everything?

Thanks,
Timm

On Tue, Nov 11, 2014 at 2:23 AM, "Torsten Schönfeld" 
wrote:

> "Timm Murray" :
> > Has anyone made an attempt to port the current GStreamer bindings to the
> 1.0 API?  Looks like these haven't been touched in 13 months, and it's
> stuck on the 0.10 API (which is no longer being supported).  I have some
> use for gst dealing with the Raspberry Pi camera, and getting the bindings
> on 1.0 would be very helpful.
>
> Before you start investing in a port of the manual bindings, try the
> introspection-based bindings: <
> https://mail.gnome.org/archives/gtk-perl-list//2014-April/msg00011.html>.
> ___
> 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


Re: Porting perl-GStreamer to gst 1.0

2014-11-11 Thread Torsten Schönfeld
"Timm Murray" :
> Has anyone made an attempt to port the current GStreamer bindings to the 1.0 
> API?  Looks like these haven't been touched in 13 months, and it's stuck on 
> the 0.10 API (which is no longer being supported).  I have some use for gst 
> dealing with the Raspberry Pi camera, and getting the bindings on 1.0 would 
> be very helpful.

Before you start investing in a port of the manual bindings, try the 
introspection-based bindings: 
.
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list