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 708184 - --pause option doesn't work when launched the first time
--pause option doesn't work when launched the first time
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-09-16 19:17 UTC by Cosimo Cecchi
Modified: 2014-03-28 00:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add support for starting a playlist paused (2.84 KB, patch)
2013-09-16 20:56 UTC, Cosimo Cecchi
needs-work Details | Review
Add support for starting a playlist paused (2.59 KB, patch)
2013-09-16 20:57 UTC, Cosimo Cecchi
reviewed Details | Review
main: Add support for starting a playlist paused (2.70 KB, patch)
2014-03-28 00:14 UTC, Bastien Nocera
committed Details | Review

Description Cosimo Cecchi 2013-09-16 19:17:36 UTC
To reproduce, without any instance of Totem running:
- open the terminal
- launch "totem --pause /path/to/file"

Expected:
- /path/to/file is in the playlist, in a paused state

Actual:
- /path/to/file is in the playlist, already playing

Patch attached.
Comment 1 Cosimo Cecchi 2013-09-16 20:56:07 UTC
Created attachment 255065 [details] [review]
Add support for starting a playlist paused

Currently, when --pause is specified in the first command line
invocation of Totem, the passed-in media will still start.
This patch saves the initial state of the pause option to a separate
variable, so that when we receive the first playlist changed event, we
can avoid starting up the stream if the option was specified.
Comment 2 Cosimo Cecchi 2013-09-16 20:57:04 UTC
Created attachment 255066 [details] [review]
Add support for starting a playlist paused

--

Same patch against the gnome-3-8 branch.
Comment 3 Bastien Nocera 2013-09-19 23:36:03 UTC
Review of attachment 255065 [details] [review]:

There's a libgd change in that patch.

::: src/totem-object.c
@@ +2904,3 @@
 		totem_object_set_mrl_and_play (totem, mrl, subtitle);
+		if (totem->pause_start)
+			totem_object_pause (totem);

It shouldn't start playing instead, rather than starting to play and then pausing.

There's code that does that in totem master, to handle session restore.
Comment 4 Bastien Nocera 2013-09-19 23:37:06 UTC
Review of attachment 255066 [details] [review]:

Much better :)

Please commit to gnome-3-8 and gnome-3-10 after the 3.10 release next week.
Comment 5 Bastien Nocera 2014-01-23 06:38:12 UTC
The patches don't apply anymore. Any chance for you to update them?
Comment 6 Bastien Nocera 2014-03-28 00:14:59 UTC
Created attachment 273128 [details] [review]
main: Add support for starting a playlist paused

Currently, when --pause is specified in the first command line
invocation of Totem, the passed-in media will still start.
This patch saves the initial state of the pause option to a separate
variable, so that when we receive the first playlist changed event, we
can avoid starting up the stream if the option was specified.
Comment 7 Bastien Nocera 2014-03-28 00:17:30 UTC
Attachment 273128 [details] pushed as f22f8dd - main: Add support for starting a playlist paused