<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Good afternoon GStreamer gurus,</div>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I have a question about the query logic in GstBin. The code in gst_bin_query() attempts to dispatch the query to any sinks in the bin. If there aren't any sinks it tries its src pads, and if there are no src pads it gives up and the query fails. But isn't it
a legitimate use case to query DURATION or SEEKING on a pipeline which has no sinks, since these would usually be answered by the source or demuxer? If there aren't any sinks, shouldn't the query be dispatched on the sink pad of the "most downstream" element?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
To give a concrete example, I'm trying to handle the case of a TV channel which goes off air for part of the day. When the channel goes off air the broadcaster sends an updated PMT which has no video or audio PIDs. This causes the demuxer to remove all its
source pads, which causes all sinks to be removed from the pipeline. Upstream of the demuxer is a "timeshift" element that supports seeking, which can be used to rewind and replay some of the previously broadcast content, but this is not possible because once
the sinks are removed I can no longer query the seekable range.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I've experimented with setting the GST_ELEMENT_FLAG_SINK on the demuxer when it removes the last source pad, i.e. making it pretend to be a sink, and this does allow the queries to be answered correctly, but it feels a bit hacky and I don't see any other demuxers
doing this.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm not sure if there's a better way to solve this that I have missed, or if this is deficency of GstBin.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Any thoughts / suggestions gratefully received</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Tom</div>
This transmission contains information that may be confidential and contain personal views which are not necessarily those of YouView TV Ltd. YouView TV Ltd (Co No:7308805) is a limited liability company registered in England and Wales with its registered address
at YouView TV Ltd, 3rd Floor, 10 Lower Thames Street, London, EC3R 6YT. For details see our web site at http://www.youview.com
</body>
</html>