<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 </head><body><blockquote type="cite"><p>On 07 April 2016 at 00:12 Peter Bennett <pgbennett@comcast.net> wrote:<br><br><br>> IMO the dynamic cast is convoluted. Why not create your virtual !GetName()<br>> ? It could default to an empty string and only needs to be overridden by<br>> videoout_omx. It may become useful for someone else later...<br>><br>That was my first preference. I looked carefully for an existing virtual<br>method that would work but found none. The trouble with that is if it is<br>a pure virtual method I would need to add it to all VideoOutput<br>subclasses, which makes for a lot of changes. The other alternative is<br>not have it as pure and let it return a null by default until it is<br>implemented in all VideoOutput subclasses.<br><br>Please let me know what your preference is. If you prefer me to create a<br>virtual GetName() I will do that. Would you like me to add it to all<br>VideoOutput subclasses as well, or just leave it as defaulting to null<br>until they are changed? If I add it to all I will make it pure virtual<br>so as to enforce its use in future classes.</p></blockquote><p>A pure virtual just clutters the code & patch for no benefit - a future user of it may prefer a different name/id. </p><p>And there's plenty of defaulted virtuals already, so it conforms to the existing design.<br></p><p>There's no danger of someone using it without first checking the string value, at which point they can override it as they see fit. Being non-null indicates it's being used somewhere.<br></p><p>GetDescription/GetId may be a bit more generic, but you've probably got a better grasp of renderers than me.<br></p><p>Just my 2c. Wait to see what others think.<br></p></body></html>