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 609423 - [appsrc] gst_app_src_set_size() should update duration and post a duration message
[appsrc] gst_app_src_set_size() should update duration and post a duration me...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.27
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-09 13:47 UTC by Philippe Normand
Modified: 2010-02-12 10:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
appsrc: Update segment duration and post a duration message if the duration changes (1.37 KB, patch)
2010-02-09 16:40 UTC, Sebastian Dröge (slomo)
committed Details | Review
basesrc: Protect segment values from concurrent access from different threads (17.19 KB, patch)
2010-02-09 16:53 UTC, Sebastian Dröge (slomo)
none Details | Review
basesrc: Protect segment values from concurrent access from different threads (17.18 KB, patch)
2010-02-09 17:07 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Philippe Normand 2010-02-09 13:47:53 UTC
Otherwise applications using on-disk buffering won't work because the query of segment size/maxsize will return -1.
Comment 1 Sebastian Dröge (slomo) 2010-02-09 16:40:10 UTC
Created attachment 153339 [details] [review]
appsrc: Update segment duration and post a duration message if the duration changes

Fixes bug #609423.
Comment 2 Sebastian Dröge (slomo) 2010-02-09 16:41:50 UTC
(In reply to comment #1)
> Created an attachment (id=153339) [details] [review]
> appsrc: Update segment duration and post a duration message if the duration
> changes
> 
> Fixes bug #609423.

Additionally locking is required in basesrc for the segment values but that's unfortunately not that easy :)
Comment 3 Sebastian Dröge (slomo) 2010-02-09 16:53:33 UTC
Created attachment 153341 [details] [review]
basesrc: Protect segment values from concurrent access from different threads

This could happen easily in the query functions or when the size is set
on appsrc from some non-streaming thread.
Comment 4 Sebastian Dröge (slomo) 2010-02-09 17:07:19 UTC
Created attachment 153343 [details] [review]
basesrc: Protect segment values from concurrent access from different threads

This could happen easily in the query functions or when the size is set
on appsrc from some non-streaming thread.
Comment 5 Philippe Normand 2010-02-11 15:15:29 UTC
I tested the patches with success, it would be nice to get them in next release :)
Comment 6 Sebastian Dröge (slomo) 2010-02-12 10:04:19 UTC
commit b5fd5953d1f5fe54f2c6a1dadf8f22bd70bd776b
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Feb 9 17:39:21 2010 +0100

    appsrc: Update segment duration and post a duration message if the duration 
    
    Fixes bug #609423.

commit 5998e902a3696a3fe7c4255da1da89af9d03f22b
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Feb 9 17:52:13 2010 +0100

    basesrc: Protect segment values from concurrent access from different thread
    
    This could happen easily in the query functions or when the size is set
    on appsrc from some non-streaming thread.