[mythtv] Ticket #12709: Segmentation fault playing a recording with file missing

SIDDONS ROGER dizygotheca at ntlworld.com
Thu Apr 7 10:55:00 UTC 2016

>     On 07 April 2016 at 00:12 Peter Bennett <pgbennett at comcast.net> wrote:
>     > IMO the dynamic cast is convoluted. Why not create your virtual
>     > !GetName()
>     > ? It could default to an empty string and only needs to be overridden by
>     > videoout_omx. It may become useful for someone else later...
>     >
>     That was my first preference. I looked carefully for an existing virtual
>     method that would work but found none. The trouble with that is if it is
>     a pure virtual method I would need to add it to all VideoOutput
>     subclasses, which makes for a lot of changes. The other alternative is
>     not have it as pure and let it return a null by default until it is
>     implemented in all VideoOutput subclasses.
>     Please let me know what your preference is. If you prefer me to create a
>     virtual GetName() I will do that. Would you like me to add it to all
>     VideoOutput subclasses as well, or just leave it as defaulting to null
>     until they are changed? If I add it to all I will make it pure virtual
>     so as to enforce its use in future classes.

A pure virtual just clutters the code & patch for no benefit - a future user of
it may prefer a different name/id.

And there's plenty of defaulted virtuals already, so it conforms to the existing

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.

GetDescription/GetId may be a bit more generic, but you've probably got a better
grasp of renderers than me.

Just my 2c. Wait to see what others think.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20160407/80122e39/attachment.html>

More information about the mythtv-dev mailing list