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 724786 - souphttpsrc: add support to disconnect on playing->paused transition
souphttpsrc: add support to disconnect on playing->paused transition
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-20 09:56 UTC by Branislav Katreniak
Modified: 2018-11-03 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-gstsouphttpsrc-add-support-to-disconnect-on-playing-.patch (5.04 KB, patch)
2014-02-20 09:57 UTC, Branislav Katreniak
needs-work Details | Review
0002-souphttpsrc-disconnect-http-connection-when-pipeline.patch (6.73 KB, patch)
2014-02-25 14:41 UTC, Branislav Katreniak
none Details | Review
0001-souphttpsrc-log-connection-events-at-info-level.patch (2.60 KB, patch)
2014-02-25 14:43 UTC, Branislav Katreniak
none Details | Review
patch for 1.4.3 branch (7.58 KB, patch)
2014-10-28 15:39 UTC, Branislav Katreniak
none Details | Review

Description Branislav Katreniak 2014-02-20 09:56:52 UTC
We implement playback from Pandora music service. The complication is that Pandora has hard requirement to disconnect the http connection on playing -> paused transition.

Is such functionality interesting upstream?
Comment 1 Branislav Katreniak 2014-02-20 09:57:52 UTC
Created attachment 269781 [details] [review]
0001-gstsouphttpsrc-add-support-to-disconnect-on-playing-.patch

This commit adds new boolean property "pause-disconnects". When active, the http connection is aborted on playing -> paused transition.
Comment 2 Sebastian Dröge (slomo) 2014-02-20 19:23:08 UTC
Review of attachment 269781 [details] [review]:

::: ext/soup/gstsouphttpsrc.c
@@ +1791,3 @@
+      root = x;
+    }
+    gst_element_get_state (root, &state, &pending, 0);

Why does it care about the state of the toplevel element? I think it should only care about its own state being PAUSED or PLAYING.

Also should it maybe only close the connection after being paused for some seconds?


(Independent of that, you're leaking the return value of gst_element_get_parent())
Comment 3 Branislav Katreniak 2014-02-25 14:41:06 UTC
Created attachment 270279 [details] [review]
0002-souphttpsrc-disconnect-http-connection-when-pipeline.patch

Thank you for review.

I prepared new patch:
* No search for root element, no call to gst_element_get_parent()
* Disconnect is hooked on timer, new property specifies its timeout.

I failed to cover the case when session_io_status is queued.
I don't fully understand the internal state of the plugin.
Can you give me an advice how to finish it?

The code is usable for our purposes in current state, but it just half finished.
Comment 4 Branislav Katreniak 2014-02-25 14:43:53 UTC
Created attachment 270280 [details] [review]
0001-souphttpsrc-log-connection-events-at-info-level.patch

This commit increases connection events to info level.
It proved helpful for me.

Right now, souphttpsrc logs nearly nothing at info level.
Comment 5 Branislav Katreniak 2014-10-28 15:39:48 UTC
Created attachment 289525 [details] [review]
patch for 1.4.3 branch
Comment 6 Edward Hervey 2017-11-10 09:52:56 UTC
Branislav, sorry for the lack of response in 3 years :( Can you rebase your patch against current gstreamer ? A lot has changed in that element since.
Comment 7 Branislav Katreniak 2017-11-10 10:29:46 UTC
Sorry, I will not push this forward. I changed my job and focus in the mean time. 

Nice to see that gstreamer project starts to be responsive again.
Comment 8 GStreamer system administrator 2018-11-03 14:51:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/109.