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 162822 - Use libunique
Use libunique
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Movie player
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 501591 (view as bug list)
Depends on: 378260
Blocks:
 
 
Reported: 2005-01-03 15:42 UTC by Bastien Nocera
Modified: 2009-04-02 01:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2005-01-03 15:42:52 UTC
SSIA
Comment 1 Bastien Nocera 2007-04-16 19:35:55 UTC
GtkUnique is missing the ability to get more than just a status return value, like we do in Totem:
                line = totem_option_create_line (TOTEM_REMOTE_COMMAND_SHOW_PLAYING);
                bacon_message_connection_set_callback (conn,
                                totem_print_playing_cb, loop);
                bacon_message_connection_send (conn, line);
Comment 2 Luis Menina 2007-11-23 14:49:16 UTC
I don't understand why totem should use that... If the goal is to forbid the user to launch 2 instances of the application, you won't be able to play 2 videos simultaneously, side-by-side, in 2 different windows ?
Comment 3 Bastien Nocera 2007-11-25 00:54:35 UTC
(In reply to comment #2)
> I don't understand why totem should use that... If the goal is to forbid the
> user to launch 2 instances of the application, you won't be able to play 2
> videos simultaneously, side-by-side, in 2 different windows ?

And that's not supported nor planned. See bug #498826
Comment 4 Bastien Nocera 2007-12-06 18:04:52 UTC
*** Bug 501591 has been marked as a duplicate of this bug. ***
Comment 5 Martin Ejdestig 2007-12-06 23:32:38 UTC
Bug 501591 was about making sure Totem can start when there is a zombie around (otherwise you'll have to restart the computer... not good). If GtkUnique doesn't handle this case, please remember to open a bug about it after the switch. :)

(In reply to comment #1 bug 501591)
> It is that code to blame, but I'm not sure how you would handle this case.
> Hopefully, switching to D-Bus in the future will take care of that, as the
> receiving end will time out, and allow us to start up.

Wouldn't it be better to check the status of the process and take immediate action if its state is Z(ombie)?

Also, when is the port to GtkUnique going to take place? After it has been moved to GTK+? I think that might take a while... In the mean time, could something be done about zombies in the current startup code?
Comment 6 Bastien Nocera 2007-12-06 23:46:37 UTC
(In reply to comment #5)
> Bug 501591 was about making sure Totem can start when there is a zombie around
> (otherwise you'll have to restart the computer... not good). If GtkUnique
> doesn't handle this case, please remember to open a bug about it after the
> switch. :)
> 
> (In reply to comment #1 bug 501591)
> > It is that code to blame, but I'm not sure how you would handle this case.
> > Hopefully, switching to D-Bus in the future will take care of that, as the
> > receiving end will time out, and allow us to start up.
> 
> Wouldn't it be better to check the status of the process and take immediate
> action if its state is Z(ombie)?
> 
> Also, when is the port to GtkUnique going to take place? After it has been
> moved to GTK+? I think that might take a while... In the mean time, could
> something be done about zombies in the current startup code?

Show me code that detects zombies and kills them in a reliable and portable way, I'm all for it. I don't think it exists though. And most of the problems with zombies would happen when only one thread in Totem dies/crashes without the rest following (ie. most of the time it's stuck, but not a Zombie).

You could probably add some better code to do the detection of a dead server at the try_server() part of BaconMessageConnection.
Comment 7 Martin Ejdestig 2007-12-07 00:46:29 UTC
(In reply to comment #6)
> Show me code that detects zombies and kills them in a reliable and portable
> way, I'm all for it. I don't think it exists though.

Why don't you think detection is enough?

> And most of the problems
> with zombies would happen when only one thread in Totem dies/crashes without
> the rest following (ie. most of the time it's stuck, but not a Zombie).

Ok. But that's a related problem that might call for additional checks. :)
Comment 8 Patryk Zawadzki 2008-07-29 11:19:16 UTC
Uhm, why do you want to force users to open VLC or mplayer just to compare two videos? I often do that after transcoding from one format to another for example.

Selecting 10 files and clicking open should result in one totem window with a playlist. Opening one file and then another should result in two windows being opened. It is useful to be able to pause one video, play another and then unpause the first one without losing the information about current track and position.
Comment 9 Bastien Nocera 2009-04-02 01:03:40 UTC
2009-04-02  Bastien Nocera  <hadess@hadess.net>

        * configure.in:
        * src/Makefile.am:
        * src/bacon-message-connection.c:
        * src/bacon-message-connection.h:
        * src/plugins/lirc/totem-lirc.c (totem_lirc_to_command):
        * src/totem-object.c (totem_remote_command_get_type),
        (totem_action_exit), (totem_action_remote):
        * src/totem-options.c (totem_options_process_for_server):
        * src/totem-options.h:
        * src/totem-private.h:
        * src/totem.c (totem_message_received_cb), (main):
        * src/totem.h: Remove use of bacon-message-connection and 
        use libunique instead (Closes: #162822)