<!doctype html><html><head>
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
</head>
<body>Hello,<br>
<br>
Yes, that is what I meant.<br>
<br>
Although we probably will need to distinguish a single "strong" reference from es_out_Add/Del and any number of weak references from Hold/Release. For instance, the decoder should be tied to the strong ref, not all refs (so that it gets deleted at the right time).<br><br><div class="gmail_quote">Le 20 août 2018 10:43:05 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>ahhh, missed the reference counted part. Indeed, it will work.<br></div>
<div><br></div>
<div>I summarize what I understood then:<br></div>
<div><br></div>
<div>- Create an opaque type to hold ES, like struct vlc_es.<br></div>
<div>- Make it reference counted and expose vlc_es_Hold(), vlc_es_Release().<br></div>
<div>- Also hold the es_format_t, title, and maybe other infos (to ease vlc_es propagation through events). These members will be available via vlc_es_getFmt() and vlc_es_GetTitle()<br></div>
<div><br></div>
<div>I can add everything to the input/es_out now, but it won't be used now (waiting for input manager).<br></div>
<div>API/Users will still be able to select en es via the fmt.i_id but the new preferred way will be ^^.<br></div>
<div><br></div>
<div>When a vlc_es is selected via the future input manager, the vlc_es is held by the first call, and until the input thread handle this control<br></div>
<div><br></div>
<div>Agree?<br></div>
<div><br></div>
<div>On Sun, Aug 19, 2018, at 17:24, Rémi Denis-Courmont wrote:<br></div>
<blockquote type="cite"><div>I don't recall suggesting "void" pointers. I suggested reference-counted (and thus, typed) pointers.<br></div>
<div><br></div>
<div defang_data-gmailquote="yes"><div>Le 19 août 2018 11:16:19 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div>I agree about keeping fmt.id for TS ES and using an unique ID for libvlc or the new input manager.<br></div>
<div><br></div>
<div>Using a void* can be racy when deleting and creating an ES (the es can use the same pointer).<br></div>
<div><br></div>
<div>An integer overflow is very unlikely to happen when creating an ES (and we can still check the overflw and fail if it happens). <br></div>
<div><br></div>
<div>Do you still prefer using void* ?<br></div>
<div><br></div>
<div>On Fri, Aug 17, 2018, at 19:03, Rémi Denis-Courmont wrote:<br></div>
<blockquote type="cite"><div>You cannot have more than uintptr_t references on an object in memory (or even all objects).<br></div>
<div><br></div>
<div>But as François pointed out, no matter how large the integer, you can always overflow after long enough.<br></div>
<div><br></div>
<div>I just don't see the point in using handles or IDs when you can use pointers. Pointers are generally the easiest identifier in C.<br></div>
<div><br></div>
<div><div>Le 17 août 2018 17:59:44 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div>
<blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><pre><div>So, I plan to use a uintptr_t (on the allocated es) as a unique es identifier.<br></div>
<div>
<br></div>
<div><br></div>
<div>
<br></div>
<div>On Fri, Aug 17, 2018, at 15:27, Francois Cartegnie wrote:<br></div>
<div>
<br></div>
<blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(114, 159, 207);padding-left:1ex;"><div> Le 17/08/2018 à 15:21, Francois Cartegnie a écrit :<br></div>
<div>
<br></div>
<div> <br></div>
<div>
<br></div>
<blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(173, 127, 168);padding-left:1ex;"><div> <br></div>
<div>
<br></div>
<div> You can't track usable ids unless you allocate UINTxx_MAX bits to<br></div>
<div>
<br></div>
<div> reference id usage, and add a worth case time of that number of bytes - 1.<br></div>
<div>
<br></div>
</blockquote><div> <br></div>
<div>
<br></div>
<div> worsT case time<br></div>
<div>
<br></div>
<div> <br></div>
<div>
<br></div>
<div> <br></div>
<div>
<br></div>
<div> Hell.....<br></div>
<div>
<br></div>
<div><hr><br></div>
<div>
<br></div>
<div> vlc-devel mailing list<br></div>
<div>
<br></div>
<div> To unsubscribe or modify your subscription options:<br></div>
<div>
<br></div>
<div> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
<div>
<br></div>
</blockquote><div><hr><br></div>
<div>
<br></div>
<div>vlc-devel mailing list<br></div>
<div>
<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div>
<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
<div>
<br></div>
</pre></blockquote></div>
<div><br></div>
<div>--<br></div>
<div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div>
<div><u>_______________________________________________</u><br></div>
<div>vlc-devel mailing list<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
</blockquote><div><br></div>
</blockquote></div>
<div><br></div>
<div>--<br></div>
<div> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div>
<div><u>_______________________________________________</u><br></div>
<div>vlc-devel mailing list<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
</blockquote><div><br></div>


</blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>