This class is used to get safe access to anIMediaOptionsinterface. When passingIMediaOptionsthrough media framework as a POD pointer there is the risk that it is actually from a derived class likeUMediaSourcewhich is subject to GC. Thus it is not safe to keep the PODIMediaOptionsaround. This class is intended to be derived and instantiated from and stored as aTSharedPtrin a derivedUMediaSourceclass. Then, as the media player is opened and the PODIMediaOptionsis passed along, a GetMediaOption("GetSafeMediaOptions") query will be made on it to get this instance. If future access to theIMediaOptionsis needed it will be made through this class by first locking, getting and using theIMediaOptionspointer returned here if it not null and unlocking afterwards.