lcksk / gst123

Automatically exported from code.google.com/p/gst123
0 stars 0 forks source link

Port to GStreamer 1.0 #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

soon (next few days) GStreamer 1.0 will be released and it would be a good idea 
to start using it in gst123. There are already pre-releases/release-candidates 
since some time.

The attached patch ports gst123 to GStreamer 1.0 (and a second minor patch 
allows to force pulseaudio as audio output).

Original issue reported on code.google.com by sl...@coaxion.net on 19 Sep 2012 at 8:11

Attachments:

GoogleCodeExporter commented 8 years ago
New patch, works perfectly fine now.

Original comment by sl...@coaxion.net on 19 Sep 2012 at 8:20

Attachments:

GoogleCodeExporter commented 8 years ago
   Hi!

The problem I see with your patch is that the code will no longer compile with 
gstreamer 0.10; as long as many distributions don't have gstreamer 1.0, I think 
it would be better to make gst123 compile/work with both versions. I think 
adding #ifdefs all over the code is a bad idea, so my suggestion would be to 
have a separate source which contains compat code, so for instance this change:

-  player.playbin = gst_element_factory_make ("playbin2", "play");
+  player.playbin = gst_element_factory_make ("playbin", "play");

would look like this:

   player.playbin = Compat::create_playbin ("play");

and create_playbin would have two implementations, one for gstreamer 1.0 and 
one for gstreamer 0.10.

Original comment by Stefan.W...@gmail.com on 28 Sep 2012 at 8:13

GoogleCodeExporter commented 8 years ago
Or just some #ifdefs for this in the main code, e.g.

#if GST_CHECK_VERSION(1,0,0)
player.playbin = gst_element_factory_make ("playbin", "play");
#else
player.playbin = gst_element_factory_make ("playbin2", "play");
#endif

Note that all the next releases of distros will include GStreamer 1.0, as it's 
part of GNOME 3.6.

Original comment by sl...@coaxion.net on 28 Sep 2012 at 8:56

GoogleCodeExporter commented 8 years ago
As I said: I'd rather have the compatibility code in a separate source. This 
compat file can also contain #if checks, but the rest of the sources shouldn't.

Original comment by Stefan.W...@gmail.com on 29 Oct 2012 at 3:29

GoogleCodeExporter commented 8 years ago
I've now added compatibility code, so gst123-0.3.2 (released today) can be 
compiled against both: GStreamer 1.0 and GStreamer 0.10. It also supports 
forcing output to pulseaudio (-a pulse), so I'm closing this issue.

Original comment by Stefan.W...@gmail.com on 11 Jan 2013 at 11:39