After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313086 - 0.9 patch, part #2
0.9 patch, part #2
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: GStreamer backend
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Maintainer alias for GStreamer component of Totem
Maintainer alias for GStreamer component of Totem
Depends on:
Blocks:
 
 
Reported: 2005-08-10 10:16 UTC by Ronald Bultje
Modified: 2005-11-03 21:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch, current version (67.10 KB, patch)
2005-08-10 10:17 UTC, Ronald Bultje
none Details | Review
updated patch for current GStreamer CVS HEAD (fixes state enums etc.) (67.55 KB, patch)
2005-09-03 17:34 UTC, Tim-Philipp Müller
none Details | Review
same patch as above, but compiles with 0.8 as well (67.73 KB, patch)
2005-09-03 18:08 UTC, Tim-Philipp Müller
none Details | Review
updated patch with registry and bus API changes (67.94 KB, patch)
2005-09-26 16:14 UTC, Tim-Philipp Müller
none Details | Review
Updated for caps-filter, bus api changes (65.57 KB, patch)
2005-09-29 14:21 UTC, Andy Wingo
none Details | Review
same as above, only that gstscreenshot.c is updated for capsfilter changes as well (67.90 KB, patch)
2005-10-06 10:33 UTC, Tim-Philipp Müller
none Details | Review
Updated patch (66.30 KB, patch)
2005-10-10 15:47 UTC, Michael Smith
none Details | Review
updated patch (for recent state change stuff) (70.32 KB, patch)
2005-10-11 14:26 UTC, Tim-Philipp Müller
none Details | Review
update for GST_TAG_DATE => GST_TYPE_DATE change (and fix minor memleak) (71.06 KB, patch)
2005-10-13 19:34 UTC, Tim-Philipp Müller
none Details | Review
updated patch (this time hopefully without g_date_free-ing random values on the stack) (71.06 KB, patch)
2005-10-14 18:07 UTC, Tim-Philipp Müller
none Details | Review
updated patch (71.65 KB, patch)
2005-10-19 10:22 UTC, Tim-Philipp Müller
none Details | Review
Updated patch (recent query API changes) (71.87 KB, patch)
2005-10-19 22:51 UTC, Tim-Philipp Müller
none Details | Review
updated patch, separates 0.8 and 0.10 code into different backends (157.70 KB, patch)
2005-10-26 08:50 UTC, Tim-Philipp Müller
none Details | Review
same patch as above, but keeps changes to 0.8 backend to a minimum (127.97 KB, patch)
2005-10-26 16:41 UTC, Tim-Philipp Müller
none Details | Review

Description Ronald Bultje 2005-08-10 10:16:13 UTC
Attached patch makes HEAD/CVS compileable against 0.8 or 0.9, depending on a
./configure switch. I use this to test GStreamer-0.9. For me, this is easier to
maintain than the separate BRANCH-GSTREAMER-0_9, since CVS merge features suck.
Comment 1 Ronald Bultje 2005-08-10 10:17:07 UTC
Created attachment 50506 [details] [review]
patch, current version

Against GStreamer HEAD/CVS of right now.
Comment 2 Tim-Philipp Müller 2005-09-03 17:34:05 UTC
Created attachment 51764 [details] [review]
updated patch for current GStreamer CVS HEAD (fixes state enums etc.)

Updated patch that fixes the old GstElementState enums and state change
function semantics to the new stuff as in GStreamer CVS HEAD.

 Cheers
  -Tim
Comment 3 Tim-Philipp Müller 2005-09-03 18:08:53 UTC
Created attachment 51765 [details] [review]
same patch as above, but compiles with 0.8 as well

Same updated patch as before, just that it compiles and works with 0.8 as well.


 Cheers
  -Tim
Comment 4 Tim-Philipp Müller 2005-09-26 16:14:48 UTC
Created attachment 52686 [details] [review]
updated patch with registry and bus API changes
Comment 5 Andy Wingo 2005-09-29 14:21:57 UTC
Created attachment 52809 [details] [review]
Updated for caps-filter, bus api changes
Comment 6 Tim-Philipp Müller 2005-10-06 10:33:21 UTC
Created attachment 53104 [details] [review]
same as above, only that gstscreenshot.c is updated for capsfilter changes as well
Comment 7 Michael Smith 2005-10-10 15:47:58 UTC
Created attachment 53299 [details] [review]
Updated patch

As above, updated for changed API in state changes.
Comment 8 Tim-Philipp Müller 2005-10-11 14:26:35 UTC
Created attachment 53331 [details] [review]
updated patch (for recent state change stuff)
Comment 9 Tim-Philipp Müller 2005-10-13 19:34:31 UTC
Created attachment 53429 [details] [review]
update for GST_TAG_DATE => GST_TYPE_DATE change (and fix minor memleak)
Comment 10 Tim-Philipp Müller 2005-10-14 18:07:28 UTC
Created attachment 53484 [details] [review]
updated patch (this time hopefully without g_date_free-ing random values on the stack)
Comment 11 Tim-Philipp Müller 2005-10-19 10:22:50 UTC
Created attachment 53647 [details] [review]
updated patch
Comment 12 Tim-Philipp Müller 2005-10-19 22:51:22 UTC
Created attachment 53669 [details] [review]
Updated patch (recent query API changes)
Comment 13 Tim-Philipp Müller 2005-10-26 08:50:47 UTC
Created attachment 53905 [details] [review]
updated patch, separates 0.8 and 0.10 code into different backends
Comment 14 Ronald Bultje 2005-10-26 14:01:08 UTC
That's not a good idea, I considered that several times and in the end, most of
it is just duplicated code and bugfixes in one will be lost in the other. We'll
have to maintain the 0.8 port for at least cycle, so just keep them together.
Comment 15 Tim-Philipp Müller 2005-10-26 14:37:44 UTC
My understanding is that this is the best way to get the 0.10 code into totem
CVS HEAD any time soon.

Besides, it's really painful to work with code that has a trizillion #ifdef
#ifndef #else #endif brackets, and code that can't be changed easily because you
always have to take 0.8 backwards compatibility into account when you change
something.

Having separate backends is also the safer option in the end, because this way
the 0.8 code doesn't get broken by accident. And let's face it, 0.8 maintainance
is not really something gstreamer devs do a lot of at the moment, and that will
be even less in a month's time when 0.10.0 comes out.

Having a separate 0.10 backend simply means that we can make use of all the new
0.9 features much more easily, while keeping the 0.8 as stable and rocking as it
currently is. 

Fixing things in one backend but not the other is not a much different problem
than fixing things in HEAD and the 0.8 branch of gst-plugins at the same time.
It's managable, and if things are forgotten it's pretty easy to
backport/forwardport the changes.

 Cheers
  -Tim
Comment 16 Ronald Bultje 2005-10-26 15:37:30 UTC
I will need to look closer at the patch to know for sure, but when I created my
original patch, I tried to put as little code as possible in the #ifdef macros,
and keep pretty much all code shared, exactly for maintainance reasons.
Comment 17 Tim-Philipp Müller 2005-10-26 16:41:02 UTC
Created attachment 53915 [details] [review]
same patch as above, but keeps changes to 0.8 backend to a minimum

This patch keeps the changes to the 0.8 backend to a minimum. The remaining
changes to the 0.8 are:
 - add bacon_video_widget_can_seek_direct()
 - extract xoverlay element if videosink is a bin
 - remove unused bits and pieces, add newlines here and there
 - add some casts for gcc4 to fix compiler warnings
 - move some code from cb_audio_fixate() into helper functions for clarity
 - fix minor memory leak
 - better error messages when audio/video sink couldn't be created
   (same as in 0.10 backend)

 Cheers
  -Tim
Comment 18 Thomas Vander Stichele 2005-10-31 11:53:16 UTC
Ronald, one of the issues is that there are changes that should be made to the
0.9-based backend that have no equivalent in the 0.8 backend.  For example,
everything is ready now to not *freeze the UI* when opening stuff.  There is
simply no equivalent for this in 0.8.

So basically, how it currently is is not really an argument in favor of keeping
things in one backend - if anything, it stifles progress.
Comment 19 Ronald Bultje 2005-10-31 16:12:57 UTC
As for the patch, I discussed it with Tim, and we (contributors) will figure it
out with Bastien (the maintainer), and we'll do just fine at that. In the end,
if Bastien says one or the other, I will comply, since he's maintainer. If he
wants us to figure it out, then I still think it should be the same backend.

Bastie, your call. Poke me on IRC if you need me.
Comment 20 Bastien Nocera 2005-10-31 18:42:04 UTC
I don't care one way or the other, whatever makes it easier for you guys to
maintain the 2 versions, and for people to contribute.
Comment 21 Bastien Nocera 2005-11-03 21:36:27 UTC
2005-11-03  Tim-Philipp Müller  <tim at centricular dot net>

        * configure.in:
        * src/backend/Makefile.am:
          Add configure magic GStreamer 0.9/0.10 backend: --enable-gstreamer
          now optionally accepts a GStreamer major/minor version as well
          (if none is specified it defaults to GStreamer 0.8).

        * src/backend/bacon-video-widget-gst-0.10.c:
          Add GStreamer 0.9/0.10 backend (based on Ronald's original
          patch, #313086).

        * src/backend/bacon-video-widget-gst.c:
        (bacon_video_widget_signal_idler), (got_found_tag),
        (parse_stream_info), (cb_audio_fixate), (get_num_audio_channels),
        (fixate_to_num), (bacon_video_widget_set_audio_out_type),
        (bacon_video_widget_open_with_subtitle), (bacon_video_widget_play),
        (bacon_video_widget_can_direct_seek),
        (bacon_video_widget_get_metadata_string),
        (bacon_video_widget_get_metadata_int), (bacon_video_widget_new):
          Some fixes for the 0.8 backend: gcc4 signedness fixes; move some
          code from cb_audio_fixate() into helper functions; fix minor memory
          leak; improve error messages when sink could not be created.

        * src/backend/bacon-video-widget-xine.c:
        (bacon_video_widget_can_direct_seek):
        * src/backend/bacon-video-widget.h:
          Add new _can_direct_seek() method.

        * src/backend/gstscreenshot.c: (have_data), (get_any),
        (bvw_frame_conv_convert):
          Add code paths for GStreamer 0.9/0.10.

        * src/totem.c: (seek_slider_changed_cb), (seek_slider_released_cb):
          Slider magic for direct seeking.