<html><head></head><body>I don't understand your points. Hold has to be there manually because that's just how the class work.<br><br>And I don't see what manual calls to release you are referring to. The trivial wrappers are needed for casting. This is a mismatch between C and C++, that I only hilights that C++ should be avoided in vlc.git.<br><br><div class="gmail_quote">Le 20 mars 2019 18:23:15 GMT+08:00, "Hugo Beauzée-Luyssen" <hugo@beauzee.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;">
<pre class="k9mail">On Mon, Mar 18, 2019, at 4:37 PM, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Le lundi 18 mars 2019, 15:20:14 EET Hugo Beauzée-Luyssen a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">Hi,<br><br>I like the idea but why using QSharedPointer instead of vlc_shared_data_ptr<br>or wrap_cptr?<br></blockquote>AFAIU, vlc_shared_data_ptr and the Qt equivalent are meant for, well, shared <br>data. Also AFAIU, vlc_shared_data_ptr would not work here since it <br>instantiates one type per pair of hold/release functions, and we need one <br>single type for all four possible pairs (none, input, aout, vout).<br><br></blockquote><br>Fair point<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">As for wrap_cptr, it seems to me that Qt code uses Qt rather than VLC C++, or <br>even ISO C++, helpers, e.g. QString rather than std::string and QMutexLocker <br>rather than vlc_mutex_locker.<br><br></blockquote><br>QString is the only type we can use if the string needs to be displayed, so I'm not sure if the comparison is fair/relevant.<br>Regarding mutexes, as far as I can see most locking is done manually, and the use of QMutexLocker/vlc_mutex_locker is marginal.<br><br>That being said, what mostly concerns me is that even though a smart pointer is used, there are still manual calls to hold/release.<br><br></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>