<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">Le ven. 4 janv. 2019 14 h 41, Stirling Westrup <<a href="mailto:swestrup@gmail.com">swestrup@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I need to write a generic decide_allocation routine for a new type of<br>
device-hardware memory we're implementing in a product, and I'm unsure<br>
of the priorities to give to the various parts of a GstQuery.<br>
<br>
To make things simpler, assume that I have already filtered the<br>
GstQuery response to remove all inappropriate pools and parameter<br>
sets, and that there are still at least one proposed pool and one<br>
proposed allocation params left.<br>
<br>
Taking a look at the various implementations of decide_allocation out<br>
there, it looks like a typical implementation does this:<br>
<br>
1) If there are one or more proposed buffer pools, take the first one<br>
as our accepted pool type. If there are no proposed buffer pools,<br>
create one of a default type.<br>
2) If there are one or more proposed allocation parameters, take the<br>
first one as our proposed parameters. If there are no proposed<br>
allocation parameters, then create a default one.<br>
3) Apply the parameters from step (2) to the pool determined in step<br>
(1), even if that means reprogramming an existing pool with default<br>
parameters.<br>
<br>
Is this correct? Should step 3 perhaps only apply the parameters if<br>
step 1 created a default buffer pool? I've also seen code that applies<br>
proposed allocation parameters to a proposed buffer pool, is that<br>
correct?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">At the moment, most specialized pool simply ignore the allocation params, so it does not really matters. This is mostly past as a hint. Unfortunately, a lot of validation is missing all over the place, so it's not impossible we will hit some issues with this at some point in time.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
The GstQuery<br>
<br>
-- <br>
Stirling Westrup<br>
Programmer, Entrepreneur.<br>
<a href="https://www.linkedin.com/e/fpf/77228" rel="noreferrer noreferrer" target="_blank">https://www.linkedin.com/e/fpf/77228</a><br>
<a href="http://www.linkedin.com/in/swestrup" rel="noreferrer noreferrer" target="_blank">http://www.linkedin.com/in/swestrup</a><br>
<a href="http://technaut.livejournal.com" rel="noreferrer noreferrer" target="_blank">http://technaut.livejournal.com</a><br>
<a href="http://sourceforge.net/users/stirlingwestrup" rel="noreferrer noreferrer" target="_blank">http://sourceforge.net/users/stirlingwestrup</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>