How to Implement Gstreamer with QObject model

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to Implement Gstreamer with QObject model

namus
Hi Guys ,

I heard that Gstreamer works on GObject model .
Is it possible to integrate Gstreamer with QEventLoop ie ., QObject model?

In GObject model ,while playing the pipeline . we use g_main_loop_new() api to get a GMainLoop pointer .
& then we will add an buscall watch to catch EOS & we will quit the mainloop using g_main_loop_quit() api.

In QObject Model , does we need to use QEventLoop pointer or How does it goes?
Do we have Gstreamer documentation / tutorials wrt to QObject model .

Pls le t me know .

Regards,
Suman.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement Gstreamer with QObject model

George Kiagiadakis
On Wed, Oct 27, 2010 at 3:06 PM, namus <[hidden email]> wrote:

> Hi Guys ,
> I heard that Gstreamer works on GObject model .
> Is it possible to integrate Gstreamer with QEventLoop ie ., QObject model?
> In GObject model ,while playing the pipeline . we use g_main_loop_new() api
> to get a GMainLoop pointer .
> & then we will add an buscall watch to catch EOS & we will quit the mainloop
> using g_main_loop_quit() api.
> In QObject Model , does we need to use QEventLoop pointer or How does it
> goes?
> Do we have Gstreamer documentation / tutorials wrt to QObject model .
> Pls le t me know .
> Regards,
> Suman.

As far as I know the only thing that needs integration with the
QEventLoop is the bus messages. On X11, if Qt is compiled with GLib
support enabled, it is possible to use the GStreamer API without doing
anything else, just like you would use it with GLib/GObject. On other
platforms (and X11 with GLib support disabled), you need to poll the
bus for messages from the Qt event loop.

You might be interested in QtGStreamer [1], which already has this
kind of integration with the Qt event loop. Note that this library is
still a work in progress and it has no compatibility promises yet.

Regards,
George

[1]. http://gitorious.org/qtgstreamer

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement Gstreamer with QObject model

michael smith-6-3
In reply to this post by namus
On Wed, Oct 27, 2010 at 5:06 AM, namus <[hidden email]> wrote:
> Hi Guys ,
> I heard that Gstreamer works on GObject model .
> Is it possible to integrate Gstreamer with QEventLoop ie ., QObject model?
> In GObject model ,while playing the pipeline . we use g_main_loop_new() api
> to get a GMainLoop pointer .
> & then we will add an buscall watch to catch EOS & we will quit the mainloop
> using g_main_loop_quit() api.
> In QObject Model , does we need to use QEventLoop pointer or How does it
> goes?

You don't need to use GMainLoop with GStreamer - that part of the API
is optional. There are lots of other ways to receive bus messages.

Mike

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement Gstreamer with QObject model

namus
Hi Guys,

let me know ..how to catch the bus messages without gmainloop?
How will the other methods differ from gmainloop mechanism?

And just for curiosity ..
1.Can I define my own looping mechanism.. 
   what can be the design considerations for designing my own looping mechanism?
   (may be out of topic .. but just wanted to know .. is this similar to "creating a deamon" ? ..)

Any tutorial/documents will be helpful to me .


Regards,
Suman.

On Wed, Oct 27, 2010 at 3:29 PM, Michael Smith <[hidden email]> wrote:
On Wed, Oct 27, 2010 at 5:06 AM, namus <[hidden email]> wrote:
> Hi Guys ,
> I heard that Gstreamer works on GObject model .
> Is it possible to integrate Gstreamer with QEventLoop ie ., QObject model?
> In GObject model ,while playing the pipeline . we use g_main_loop_new() api
> to get a GMainLoop pointer .
> & then we will add an buscall watch to catch EOS & we will quit the mainloop
> using g_main_loop_quit() api.
> In QObject Model , does we need to use QEventLoop pointer or How does it
> goes?

You don't need to use GMainLoop with GStreamer - that part of the API
is optional. There are lots of other ways to receive bus messages.

Mike

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement Gstreamer with QObject model

Cedric Hombourger
Hi Suman,

Have you considered the Phonon framework?
It provides a nice object oriented framework for multimedia while using GStreamer as the backend?

Regards,
Cedric

On Oct 28, 2010, at 2:02 PM, namus wrote:

Hi Guys,

let me know ..how to catch the bus messages without gmainloop?
How will the other methods differ from gmainloop mechanism?

And just for curiosity ..
1.Can I define my own looping mechanism.. 
   what can be the design considerations for designing my own looping mechanism?
   (may be out of topic .. but just wanted to know .. is this similar to "creating a deamon" ? ..)

Any tutorial/documents will be helpful to me .


Regards,
Suman.

On Wed, Oct 27, 2010 at 3:29 PM, Michael Smith <[hidden email]> wrote:
On Wed, Oct 27, 2010 at 5:06 AM, namus <[hidden email]> wrote:
> Hi Guys ,
> I heard that Gstreamer works on GObject model .
> Is it possible to integrate Gstreamer with QEventLoop ie ., QObject model?
> In GObject model ,while playing the pipeline . we use g_main_loop_new() api
> to get a GMainLoop pointer .
> & then we will add an buscall watch to catch EOS & we will quit the mainloop
> using g_main_loop_quit() api.
> In QObject Model , does we need to use QEventLoop pointer or How does it
> goes?

You don't need to use GMainLoop with GStreamer - that part of the API
is optional. There are lots of other ways to receive bus messages.

Mike

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement Gstreamer with QObject model

George Kiagiadakis
In reply to this post by namus
On Thu, Oct 28, 2010 at 3:02 PM, namus <[hidden email]> wrote:
> Hi Guys,
> let me know ..how to catch the bus messages without gmainloop?

Using gst_bus_pop() or the "sync-message" signal.

> How will the other methods differ from gmainloop mechanism?

gst_bus_pop() is the same thing if you call it from the main thread.
Actually, the GMainLoop integration code calls gst_bus_pop()
periodically from the event loop and emits the "message" signal on the
bus if it finds that a new message has arrived.

The "sync-message" signal is a different thing, it delivers the
message on the same thread that it is sent from and it is not a good
idea to use it unless you need it.

> And just for curiosity ..
> 1.Can I define my own looping mechanism..
>    what can be the design considerations for designing my own looping
> mechanism?
>    (may be out of topic .. but just wanted to know .. is this similar to
> "creating a deamon" ? ..)
> Any tutorial/documents will be helpful to me .

Yes, you can. You can use a QTimer or something similar that expires
every once in a while and calls a slot that uses gst_bus_pop() to poll
for new messages. This is essentially what the GMainLoop integration
code does as well.

You can use this as an example:
http://gitorious.org/qtgstreamer/qtgstreamer/blobs/master/src/QGst/bus.cpp

Regards,
George

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement Gstreamer with QObject model

Vineeth-2
In reply to this post by namus
You can find one gstreamer test application developed using qt here : http://gstreamer-devel.966125.n4.nabble.com/how-to-make-gstreamer-run-in-separate-thread-tt1960435.html#a2174062
Always update the qt's UI elements esp pixmaps etc., only from qt event loop.
--vineeth


On Wed, Oct 27, 2010 at 5:36 PM, namus <[hidden email]> wrote:
Hi Guys ,

I heard that Gstreamer works on GObject model .
Is it possible to integrate Gstreamer with QEventLoop ie ., QObject model?

In GObject model ,while playing the pipeline . we use g_main_loop_new() api to get a GMainLoop pointer .
& then we will add an buscall watch to catch EOS & we will quit the mainloop using g_main_loop_quit() api.

In QObject Model , does we need to use QEventLoop pointer or How does it goes?
Do we have Gstreamer documentation / tutorials wrt to QObject model .

Pls le t me know .

Regards,
Suman.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel