engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | Protected 属性 | 所有成员列表
UMediaPlayer类 参考

Implements a media player asset that can play movies and other media sources. 更多...

#include <MediaPlayer.h>

+ 类 UMediaPlayer 继承关系图:

Public 成员函数

virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
bool CanPause () const
 Check whether media playback can be paused right now. 更多...
 
bool CanPlaySource (UMediaSource *MediaSource)
 Check whether the specified media source can be played by this player. 更多...
 
bool CanPlayUrl (const FString &Url)
 Check whether the specified URL can be played by this player. 更多...
 
void Close ()
 Close the currently open media, if any. 更多...
 
 DECLARE_EVENT_OneParam (UMediaPlayer, FOnMediaEvent, EMediaEvent) FOnMediaEvent &OnMediaEvent()
 Get an event delegate that is invoked when a media event occurred. 更多...
 
int32 GetAudioTrackChannels (int32 TrackIndex, int32 FormatIndex) const
 Get the number of channels in the specified audio track. 更多...
 
int32 GetAudioTrackSampleRate (int32 TrackIndex, int32 FormatIndex) const
 Get the sample rate of the specified audio track. 更多...
 
FString GetAudioTrackType (int32 TrackIndex, int32 FormatIndex) const
 Get the type of the specified audio track format. 更多...
 
virtual FString GetDesc () override
 Return a one line description of an object for viewing in the thumbnail view of the generic browser
 
FName GetDesiredPlayerName () const
 Get the name of the current desired native player. 更多...
 
FTimespan GetDuration () const
 Get the media's duration. 更多...
 
const FGuid & GetGuid ()
 Get the Guid associated with this media player 更多...
 
float GetHorizontalFieldOfView () const
 Get the current horizontal field of view (only for 360 videos). 更多...
 
virtual FText GetMediaName () const
 Get the human readable name of the currently loaded media source. 更多...
 
int32 GetNumTrackFormats (EMediaPlayerTrack TrackType, int32 TrackIndex) const
 Get the number of formats of the specified track. 更多...
 
int32 GetNumTracks (EMediaPlayerTrack TrackType) const
 Get the number of tracks of the given type. 更多...
 
TSharedRef< FMediaPlayerFacade, ESPMode::ThreadSafe > GetPlayerFacade () const
 Get the media player facade that manages low-level media players 更多...
 
FName GetPlayerName () const
 Get the name of the current native media player. 更多...
 
UMediaPlaylist * GetPlaylist () const
 Get the current play list. 更多...
 
int32 GetPlaylistIndex () const
 Get the current play list index. 更多...
 
UMediaPlaylist & GetPlaylistRef () const
 Get the current play list. 更多...
 
float GetRate () const
 Get the media's current playback rate. 更多...
 
int32 GetSelectedTrack (EMediaPlayerTrack TrackType) const
 Get the index of the currently selected track of the given type. 更多...
 
void GetSupportedRates (TArray< FFloatRange > &OutRates, bool Unthinned) const
 Get the supported playback rates. 更多...
 
FTimespan GetTime () const
 Get the media's current playback time. 更多...
 
FTimespan GetTimeDelay () const
 Delay of the player's time. 更多...
 
UMediaTimeStampInfo * GetTimeStamp () const
 Get the media's current playback timestamp. 更多...
 
FText GetTrackDisplayName (EMediaPlayerTrack TrackType, int32 TrackIndex) const
 Get the human readable name of the specified track. 更多...
 
int32 GetTrackFormat (EMediaPlayerTrack TrackType, int32 TrackIndex) const
 Get the index of the active format of the specified track type. 更多...
 
FString GetTrackLanguage (EMediaPlayerTrack TrackType, int32 TrackIndex) const
 Get the language tag of the specified track. 更多...
 
const FString & GetUrl () const
 Get the URL of the currently loaded media, if any. 更多...
 
float GetVerticalFieldOfView () const
 Get the current vertical field of view (only for 360 videos). 更多...
 
float GetVideoTrackAspectRatio (int32 TrackIndex, int32 FormatIndex) const
 Get the aspect ratio of the specified video track. 更多...
 
FIntPoint GetVideoTrackDimensions (int32 TrackIndex, int32 FormatIndex) const
 Get the current dimensions of the specified video track. 更多...
 
float GetVideoTrackFrameRate (int32 TrackIndex, int32 FormatIndex) const
 Get the frame rate of the specified video track. 更多...
 
FFloatRange GetVideoTrackFrameRates (int32 TrackIndex, int32 FormatIndex) const
 Get the supported range of frame rates of the specified video track. 更多...
 
FString GetVideoTrackType (int32 TrackIndex, int32 FormatIndex) const
 Get the type of the specified video track format. 更多...
 
FRotator GetViewRotation () const
 Get the current view rotation (only for 360 videos). 更多...
 
bool HasError () const
 Check whether the player is in an error state. 更多...
 
bool IsBuffering () const
 Check whether playback is buffering data. 更多...
 
bool IsClosed () const
 Whether media is currently closed. 更多...
 
bool IsConnecting () const
 Check whether the player is currently connecting to a media source. 更多...
 
bool IsLooping () const
 Check whether playback is looping. 更多...
 
bool IsPaused () const
 Check whether playback is currently paused. 更多...
 
bool IsPlaying () const
 Check whether playback has started. 更多...
 
bool IsPreparing () const
 Check whether the media is currently opening or buffering. 更多...
 
bool IsReady () const
 Check whether media is ready for playback. 更多...
 
bool Next ()
 Open the next item in the current play list. 更多...
 
bool OpenFile (const FString &FilePath)
 Opens the specified media file path. 更多...
 
bool OpenPlaylist (UMediaPlaylist *InPlaylist)
 Open the first media source in the specified play list. 更多...
 
bool OpenPlaylistIndex (UMediaPlaylist *InPlaylist, int32 Index)
 Open a particular media source in the specified play list. 更多...
 
bool OpenSource (UMediaSource *MediaSource)
 Open the specified media source. 更多...
 
void OpenSourceLatent (const UObject *WorldContextObject, struct FLatentActionInfo LatentInfo, UMediaSource *MediaSource, const FMediaPlayerOptions &Options, bool &bSuccess)
 Open the specified media source with options using a latent action. 更多...
 
bool OpenSourceWithOptions (UMediaSource *MediaSource, const FMediaPlayerOptions &Options)
 Open the specified media source with supplied options applied. 更多...
 
bool OpenUrl (const FString &Url)
 Opens the specified media URL. 更多...
 
bool Pause ()
 Pauses media playback. 更多...
 
bool Play ()
 Starts media playback. 更多...
 
void PlayAndSeek ()
 Starts playback from the media opened event, but can be used elsewhere.
 
virtual void PostDuplicate (bool bDuplicateForPIE) override
 Called after duplication & serialization and before PostLoad. 更多...
 
virtual void PostInitProperties () override
 Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多...
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
bool Previous ()
 Open the previous item in the current play list. 更多...
 
void RegisterWithMediaModule ()
 Register player with media module to be ticked 更多...
 
bool Reopen ()
 Reopens the currently opened media or play list. 更多...
 
bool Rewind ()
 Rewinds the media to the beginning. 更多...
 
bool Seek (const FTimespan &Time)
 Seeks to the specified playback time. 更多...
 
bool SelectTrack (EMediaPlayerTrack TrackType, int32 TrackIndex)
 Select the active track of the given type. 更多...
 
void SetBlockOnTime (const FTimespan &Time)
 Set the time on which to block. 更多...
 
void SetDesiredPlayerName (FName PlayerName)
 Set the name of the desired native player. 更多...
 
bool SetLooping (bool Looping)
 Enables or disables playback looping. 更多...
 
void SetMediaOptions (const UMediaSource *Options)
 Sets the media options used by the player. 更多...
 
bool SetNativeVolume (float Volume)
 Set the volume on the native player if not mixing with Sound Wave asset. 更多...
 
bool SetRate (float Rate)
 Changes the media's playback rate. 更多...
 
void SetTimeDelay (FTimespan TimeDelay)
 Delay of the player's time. 更多...
 
bool SetTrackFormat (EMediaPlayerTrack TrackType, int32 TrackIndex, int32 FormatIndex)
 Set the format on the specified track. 更多...
 
bool SetVideoTrackFrameRate (int32 TrackIndex, int32 FormatIndex, float FrameRate)
 Set the frame rate of the specified video track. 更多...
 
bool SetViewField (float Horizontal, float Vertical, bool Absolute)
 Set the field of view (only for 360 videos). 更多...
 
bool SetViewRotation (const FRotator &Rotation, bool Absolute)
 Set the view's rotation (only for 360 videos). 更多...
 
bool SupportsRate (float Rate, bool Unthinned) const
 Check whether the specified playback rate is supported. 更多...
 
bool SupportsScrubbing () const
 Check whether the currently loaded media supports scrubbing. 更多...
 
bool SupportsSeeking () const
 Check whether the currently loaded media can jump to a certain position. 更多...
 
- Public 成员函数 继承自 UObject
void AbortInsideMemberFunction () const
 Abort with a member function call at the top of the callstack, helping to ensure that most platforms will stuff this object's memory into the resulting minidump.
 
virtual bool AreNativePropertiesIdenticalTo (UObject *Other) const
 Returns whether native properties are identical to the one of the passed in component. 更多...
 
virtual void BeginDestroy ()
 Called before destroying the object. 更多...
 
virtual void BuildSubobjectMapping (UObject *OtherObject, TMap< UObject *, UObject * > &ObjectMapping) const
 Given OtherObject (which will be the same type as 'this'), recursively find any matching sub-objects from 'this' that also exist within OtherObject, and add the mappings to ObjectMapping. 更多...
 
void CallAddReferencedObjects (FReferenceCollector &Collector)
 Helper function to call AddReferencedObjects for this object's class. 更多...
 
void CallFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 Internal VM method for executing a function
 
bool CallFunctionByNameWithArguments (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor, bool bForceCallWithNonExec=false)
 Handle calling a function by name when executed from the console or a command line
 
virtual bool CallRemoteFunction (UFunction *Function, void *Parms, struct FOutParmRec *OutParms, FFrame *Stack)
 Call the actor's function remotely 更多...
 
bool CheckDefaultSubobjects (bool bForceCheck=false) const
 Checks default sub-object assumptions. 更多...
 
void CollectDefaultSubobjects (TArray< UObject * > &OutDefaultSubobjects, bool bIncludeNestedSubobjects=false) const
 Uses the TArchiveObjectReferenceCollector to build a list of all components referenced by this object which have this object as the outer 更多...
 
bool ConditionalBeginDestroy ()
 Called before destroying the object. 更多...
 
bool ConditionalFinishDestroy ()
 Called when an object is actually destroyed, memory should never be accessed again
 
void ConditionalPostLoad ()
 PostLoad if needed.
 
void ConditionalPostLoadSubobjects (struct FObjectInstancingGraph *OuterInstanceGraph=NULL)
 Instances subobjects and components for objects being loaded from disk, if necessary. 更多...
 
 DECLARE_FUNCTION (execBreakpoint)
 Breakpoint; only observed in the editor; executing it at any other time is a NOP
 
 DECLARE_FUNCTION (execInstrumentation)
 Instrumentation event for profiling; only observed in the builds with blueprint instrumentation
 
 DECLARE_FUNCTION (execPopExecutionFlow)
 Pops a code offset from the execution flow stack and starts execution there. 更多...
 
 DECLARE_FUNCTION (execPopExecutionFlowIfNot)
 Pops a code offset from the execution flow stack and starts execution there, if a condition is not true. 更多...
 
 DECLARE_FUNCTION (execPushExecutionFlow)
 Push a code offset onto the execution flow stack for future execution. 更多...
 
 DECLARE_FUNCTION (execReturnNothing)
 failsafe for functions that return a value - returns the zero value for a property and logs that control reached the end of a non-void function
 
 DECLARE_FUNCTION (execTracepoint)
 Tracepoint; only observed in the editor; executing it at any other time is a NOP
 
 DECLARE_FUNCTION (ProcessInternal)
 Internal function call processing. 更多...
 
void DestroyNonNativeProperties ()
 Destroy properties that won't be destroyed by the native destructor
 
void ExecuteUbergraph (int32 EntryPoint)
 Execute the ubergraph from a specific entry point
 
virtual void ExportCustomProperties (FOutputDevice &Out, uint32 Indent)
 Exports the property values for the specified object as text to the output device. 更多...
 
UFunction * FindFunction (FName InName) const
 Returns a UFunction with the specified name, wrapper for UClass::FindFunctionByName()
 
UFunction * FindFunctionChecked (FName InName) const
 Version of FindFunction() that will assert if the function was not found
 
virtual void FinishDestroy ()
 Called to finish destroying the object. 更多...
 
UObject * GetArchetype () const
 Return the template this object is based on. 更多...
 
void GetArchetypeInstances (TArray< UObject * > &Instances)
 Builds a list of objects which have this object in their archetype chain. 更多...
 
virtual void GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const
 Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects 更多...
 
virtual const TCHAR * GetConfigOverridePlatform () const
 Returns the override config hierarchy platform (if NDAd platforms need defaults to not be in Base*.ini but still want editor to load them)
 
FString GetDefaultConfigFilename () const
 Get the default config filename for the specified UObject
 
virtual FString GetDesc ()
 Return a one line description of an object for viewing in the thumbnail view of the generic browser
 
FString GetDetailedInfo () const
 This will return detail info about this specific object. 更多...
 
virtual FName GetExporterName (void)
 Returns the name of the exporter factory used to export this object Used when multiple factories have the same extension
 
virtual int32 GetFunctionCallspace (UFunction *Function, FFrame *Stack)
 Return the space this function should be called. 更多...
 
FString GetGlobalUserConfigFilename () const
 Get the global user override config filename for the specified UObject
 
virtual void GetLifetimeReplicatedProps (TArray< class FLifetimeProperty > &OutLifetimeProps) const
 Returns properties that are replicated for the lifetime of the actor channel
 
virtual bool GetNativePropertyValues (TMap< FString, FString > &out_PropertyValues, uint32 ExportFlags=0) const
 Callback for retrieving a textual representation of natively serialized properties. 更多...
 
virtual int32 GetNetPushIdDynamic () const
 Should only ever be used by internal systems.
 
virtual void GetPreloadDependencies (TArray< UObject * > &OutDeps)
 Called during cooking. 更多...
 
virtual void GetPrestreamPackages (TArray< UObject * > &OutPrestream)
 Called during cooking. 更多...
 
virtual FPrimaryAssetId GetPrimaryAssetId () const
 Returns an Type:Name pair representing the PrimaryAssetId for this object. 更多...
 
FString GetProjectUserConfigFilename () const
 Get the project user override config filename for the specified UObject
 
SIZE_T GetResourceSizeBytes (EResourceSizeMode::Type Mode)
 Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the simple version which just returns the total number of bytes used by this object. 更多...
 
virtual void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize)
 Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). 更多...
 
virtual FRestoreForUObjectOverwrite * GetRestoreForUObjectOverwrite ()
 Save information for StaticAllocateObject in the case of overwriting an existing object. 更多...
 
virtual UScriptStruct * GetSparseClassDataStruct () const
 Return the UStruct corresponding to the sidecar data structure that stores data that is constant for all instances of this class.
 
virtual void GetSubobjectsWithStableNamesForNetworking (TArray< UObject * > &ObjList)
 Returns a list of sub-objects that have stable names for networking
 
template<class T >
FORCEINLINE bool Implements () const
 Returns true if this object implements the interface T, false otherwise.
 
template<class T >
bool Implements () const
 Returns true if this object implements the interface T, false otherwise.
 
virtual void ImportCustomProperties (const TCHAR *SourceText, FFeedbackContext *Warn)
 Exports the property values for the specified object as text to the output device. 更多...
 
void InstanceSubobjectTemplates (struct FObjectInstancingGraph *InstanceGraph=NULL)
 Wrapper for calling UClass::InstanceSubobjectTemplates() for this object.
 
virtual bool IsAsset () const
 Returns true if this object is considered an asset.
 
bool IsBasedOnArchetype (const UObject *const SomeObject) const
 Determine if this object has SomeObject in its archetype chain.
 
virtual bool IsDestructionThreadSafe () const
 Called during garbage collection to determine if an object can have its destructor called on a worker thread. 更多...
 
virtual bool IsEditorOnly () const
 Called during saving to determine if the object is forced to be editor only or not 更多...
 
virtual bool IsFullNameStableForNetworking () const
 IsFullNameStableForNetworking means an object can be referred to its full path name over the network
 
bool IsInBlueprint () const
 Returns whether this object is contained in or part of a blueprint object
 
virtual bool IsLocalizedResource () const
 Returns true if this object is considered a localized resource.
 
virtual bool IsNameStableForNetworking () const
 IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network
 
virtual bool IsPostLoadThreadSafe () const
 Called during async load to determine if PostLoad can be called on the loading thread. 更多...
 
virtual bool IsReadyForAsyncPostLoad () const
 Called before calling PostLoad() in FAsyncPackage::PostLoadObjects(). 更多...
 
virtual bool IsReadyForFinishDestroy ()
 Called to check if the object is ready for FinishDestroy. 更多...
 
virtual bool IsSafeForRootSet () const
 Returns true if this object is safe to add to the root set.
 
bool IsSelected () const
 Test the selection state of a UObject 更多...
 
virtual bool IsSupportedForNetworking () const
 IsSupportedForNetworking means an object can be referenced over the network
 
void LoadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL)
 Imports property values from an .ini file. 更多...
 
virtual void MarkAsEditorOnlySubobject ()
 Called during subobject creation to mark this component as editor only, which causes it to get stripped in packaged builds
 
FORCEINLINE bool Modify (bool bAlwaysMarkDirty=true)
 Note that the object will be modified. 更多...
 
virtual bool NeedsLoadForClient () const
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForEditorGame () const
 Called during saving to include this object in client/servers running in editor builds, even if they wouldn't normally be. 更多...
 
virtual bool NeedsLoadForServer () const
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForTargetPlatform (const class ITargetPlatform *TargetPlatform) const
 Called during saving to determine the load flags to save with the object. 更多...
 
void OutputReferencers (FOutputDevice &Ar, FReferencerInformationList *Referencers=NULL)
 Outputs a string to an arbitrary output device, describing the list of objects which are holding references to this one. 更多...
 
virtual void OverridePerObjectConfigSection (FString &SectionName)
 Allows PerObjectConfig classes, to override the ini section name used for the PerObjectConfig object. 更多...
 
void ParseParms (const TCHAR *Parms)
 Import an object from a file.
 
virtual void PostCDOContruct ()
 Called after the C++ constructor has run on the CDO for a class. 更多...
 
virtual void PostDuplicate (bool bDuplicateForPIE)
 Called after duplication & serialization and before PostLoad. 更多...
 
virtual void PostEditImport ()
 Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization
 
virtual void PostInitProperties ()
 Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多...
 
virtual void PostInterpChange (FProperty *PropertyThatChanged)
 This is called when property is modified by InterpPropertyTracks 更多...
 
virtual void PostLoad ()
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostLoadSubobjects (FObjectInstancingGraph *OuterInstanceGraph)
 Instances components for objects being loaded from disk, if necessary. 更多...
 
virtual void PostNetReceive ()
 Called right after receiving a bunch
 
virtual void PostReloadConfig (class FProperty *PropertyThatWasLoaded)
 Called from ReloadConfig after the object has reloaded its configuration data.
 
virtual void PostRename (UObject *OldOuter, const FName OldName)
 Called at the end of Rename(), but only if the rename was actually carried out
 
virtual void PostRepNotifies ()
 Called right after calling all OnRep notifies (called even when there are no notifies)
 
virtual void PostSaveRoot (bool bCleanupIsRequired)
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual void PreDestroyFromReplication ()
 Called right before being marked for destruction due to network replication
 
virtual void PreDuplicate (FObjectDuplicationParameters &DupParams)
 Called before duplication. 更多...
 
virtual void PreNetReceive ()
 Called right before receiving a bunch
 
virtual void PreSave (const class ITargetPlatform *TargetPlatform)
 Presave function. 更多...
 
virtual bool PreSaveRoot (const TCHAR *Filename)
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual bool ProcessConsoleExec (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor)
 This function handles a console exec sent to the object; it is virtual so 'nexus' objects like a player controller can reroute the command to several different objects.
 
virtual void ProcessEvent (UFunction *Function, void *Parms)
 Called by VM to execute a UFunction with a filled in UStruct of parameters
 
virtual UClass * RegenerateClass (UClass *ClassToRegenerate, UObject *PreviousCDO)
 Called on the target when a class is loaded with ClassGeneratedBy is loaded. 更多...
 
void ReinitializeProperties (UObject *SourceObject=NULL, struct FObjectInstancingGraph *InstanceGraph=NULL)
 Wrapper function for InitProperties() which handles safely tearing down this object before re-initializing it from the specified source object. 更多...
 
void ReloadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL)
 Wrapper method for LoadConfig that is used when reloading the config data for objects at runtime which have already loaded their config data at least once. 更多...
 
virtual bool Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None)
 Rename this object to a unique name, or change its outer. 更多...
 
void RetrieveReferencers (TArray< FReferencerInformation > *OutInternalReferencers, TArray< FReferencerInformation > *OutExternalReferencers)
 Called by OutputReferencers() to get the internal list of referencers to write
 
void SaveConfig (uint64 Flags=CPF_Config, const TCHAR *Filename=NULL, FConfigCacheIni *Config=GConfig, bool bAllowCopyToDefaultObject=true)
 Save configuration out to ini files 更多...
 
virtual void Serialize (FArchive &Ar)
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
void SerializeScriptProperties (FArchive &Ar) const
 Serializes the script property data located at Data. 更多...
 
void SerializeScriptProperties (FStructuredArchive::FSlot Slot) const
 Serializes the script property data located at Data. 更多...
 
void SetLinker (FLinkerLoad *LinkerLoad, int32 LinkerIndex, bool bShouldDetachExisting=true)
 Changes the linker and linker index to the passed in one. 更多...
 
virtual void ShutdownAfterError ()
 After a critical error, perform any mission-critical cleanup, such as restoring the video mode orreleasing hardware resources.
 
void SkipFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 advances Stack's code past the parameters to the given Function and if the function has a return value, copies the zero value for that property to the memory for the return value 更多...
 
virtual void TagSubobjects (EObjectFlags NewFlags)
 Tags objects that are part of the same asset with the specified object flag, used for GC checking 更多...
 
void UpdateDefaultConfigFile (const FString &SpecificFileLocation="")
 Saves just the section(s) for this class into the default ini file for the class (with just the changes from base)
 
void UpdateGlobalUserConfigFile ()
 Saves just the section(s) for this class into the global user ini file for the class (with just the changes from base)
 
void UpdateProjectUserConfigFile ()
 Saves just the section(s) for this class into the project user ini file for the class (with just the changes from base)
 
void UpdateSinglePropertyInConfigFile (const FProperty *InProperty, const FString &InConfigIniName)
 Saves just the property into the global user ini file for the class (with just the changes from base)
 
- Public 成员函数 继承自 UObjectBaseUtility
void AddToCluster (UObjectBaseUtility *ClusterRootOrObjectFromCluster, bool bAddAsMutableObject=false)
 Adds this objects to a GC cluster that already exists 更多...
 
FORCEINLINE void AddToRoot ()
 Add an object to the root set. 更多...
 
FORCEINLINE void AppendName (FString &ResultString) const
 Optimized version of GetName that appends to an existing string
 
FORCEINLINE bool AtomicallyClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 Atomically clears passed in internal flags. 更多...
 
virtual bool CanBeClusterRoot () const
 Called after load to determine if the object can be a cluster root 更多...
 
virtual bool CanBeInCluster () const
 Called during cluster construction if the object can be added to a cluster 更多...
 
FORCEINLINE void ClearFlags (EObjectFlags NewFlags)
 Clears subset of flags for a specific object
 
FORCEINLINE void ClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 Clears passed in internal flags. 更多...
 
FORCEINLINE void ClearPendingKill ()
 Unmarks this object as PendingKill.
 
virtual void CreateCluster ()
 Called after PostLoad to create UObject cluster
 
void DetachExternalPackage ()
 Utility function to temporarily detach the object external package, if any GetPackage will report the outer's package once detached
 
const UClass * FindNearestCommonBaseClass (const UClass *TestClass) const
 Finds the most-derived class which is a parent of both TestClass and this object's class. 更多...
 
FORCEINLINE EObjectMark GetAllMarks () const
 Returns all of the object marks on a specific object 更多...
 
FString GetFullGroupName (bool bStartWithOuter) const
 Walks up the chain of packages until it reaches the top level, which it ignores. 更多...
 
void GetFullName (const UObject *StopOuter, FString &ResultString, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 Version of GetFullName() that eliminates unnecessary copies.
 
FString GetFullName (const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 Returns the fully qualified pathname for this object as well as the name of the class, in the format: 'ClassName Outermost[.Outer].Name'. 更多...
 
void * GetInterfaceAddress (UClass *InterfaceClass)
 Returns a pointer to this object safely converted to a pointer of the specified interface class. 更多...
 
FORCEINLINE EInternalObjectFlags GetInternalFlags () const
 Gets internal flags. 更多...
 
class FLinkerLoad * GetLinker () const
 Returns the linker for this object. 更多...
 
int32 GetLinkerCustomVersion (FGuid CustomVersionKey) const
 Returns the custom version of the linker for this object corresponding to the given custom version key. 更多...
 
int32 GetLinkerIndex () const
 Returns this object's LinkerIndex. 更多...
 
int32 GetLinkerLicenseeUE4Version () const
 Returns the licensee version of the linker for this object. 更多...
 
int32 GetLinkerUE4Version () const
 Returns the UE4 version of the linker for this object. 更多...
 
FORCEINLINE EObjectFlags GetMaskedFlags (EObjectFlags Mask=RF_AllFlags) const
 Returns object flags that are both in the mask and set on the object. 更多...
 
FORCEINLINE FString GetName () const
 Returns the name of this object (with no path information) 更多...
 
FORCEINLINE void GetName (FString &ResultString) const
 Optimized version of GetName that overwrites an existing string
 
void * GetNativeInterfaceAddress (UClass *InterfaceClass)
 Returns a pointer to the I* native interface object that this object implements. 更多...
 
const void * GetNativeInterfaceAddress (UClass *InterfaceClass) const
 Returns a pointer to the const I* native interface object that this object implements. 更多...
 
UPackage * GetOutermost () const
 Legacy function, has the same behavior as GetPackage use GetPackage instead. 更多...
 
UObject * GetOutermostObject () const
 Walks up the list of outers until it finds the top-level one that isn't a package. 更多...
 
UPackage * GetPackage () const
 Walks up the list of outers until it finds a package directly associated with the object. 更多...
 
void GetPathName (const UObject *StopOuter, FString &ResultString) const
 Versions of GetPathName() that eliminates unnecessary copies and allocations.
 
FString GetPathName (const UObject *StopOuter=NULL) const
 Returns the fully qualified pathname for this object, in the format: 'Outermost[.Outer].Name' 更多...
 
FORCEINLINE TStatId GetStatID (bool bForDeferredUse=false) const
 Returns the stat ID of the object, used for profiling. 更多...
 
template<typename T >
T * GetTypedOuter () const
 Traverses the outer chain searching for the next object of a certain type. 更多...
 
UObject * GetTypedOuter (UClass *Target) const
 Traverses the outer chain searching for the next object of a certain type. 更多...
 
FORCEINLINE bool HasAllFlags (EObjectFlags FlagsToCheck) const
 Used to safely check whether all of the passed in flags are set. 更多...
 
FORCEINLINE bool HasAllMarks (EObjectMark Marks) const
 Tests an object for having ALL of a set of marks 更多...
 
FORCEINLINE bool HasAnyFlags (EObjectFlags FlagsToCheck) const
 Used to safely check whether any of the passed in flags are set. 更多...
 
FORCEINLINE bool HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const
 Used to safely check whether any of the passed in internal flags are set. 更多...
 
FORCEINLINE bool HasAnyMarks (EObjectMark Marks) const
 Tests an object for having ANY of a set of marks 更多...
 
template<class T >
bool IsA () const
 Returns true if this object is of the template type.
 
template<typename OtherClassType >
FORCEINLINE bool IsA (OtherClassType SomeBase) const
 Returns true if this object is of the specified type.
 
bool IsDefaultSubobject () const
 Returns whether this component was instanced from a component/subobject template, or if it is a component/subobject template. 更多...
 
bool IsIn (const UObject *SomeOuter) const
 Return the dispatch to IsInOuter or IsInPackage depending on SomeOuter's class. 更多...
 
bool IsIn (const UPackage *SomePackage) const
 Overload to determine if an object is in the specified package which can now be different than its outer chain. 更多...
 
bool IsInA (const UClass *SomeBaseClass) const
 Find out if this object is inside (has an outer) that is of the specified class 更多...
 
bool IsInOuter (const UObject *SomeOuter) const
 Returns true if the object is contained in the specified outer.
 
bool IsInPackage (const UPackage *SomePackage) const
 Returns true if the object is contained in the specified package.
 
FORCEINLINE bool IsNative () const
 Checks if the object is native.
 
FORCEINLINE bool IsPendingKill () const
 Checks the PendingKill flag to see if it is dead but memory still valid
 
FORCEINLINE bool IsPendingKillOrUnreachable () const
 Checks if the object is pending kill or unreachable.
 
FORCEINLINE bool IsRooted () const
 Returns true if this object is explicitly rooted 更多...
 
bool IsTemplate (EObjectFlags TemplateTypes=RF_ArchetypeObject|RF_ClassDefaultObject) const
 Determines whether this object is a template object 更多...
 
FORCEINLINE bool IsUnreachable () const
 Checks if the object is unreachable.
 
FORCEINLINE void Mark (EObjectMark Marks) const
 Adds marks to an object 更多...
 
bool MarkPackageDirty () const
 Finds the outermost package and marks it dirty. 更多...
 
FORCEINLINE void MarkPendingKill ()
 Marks this object as RF_PendingKill.
 
virtual void OnClusterMarkedAsPendingKill ()
 Called during Garbage Collection to perform additional cleanup when the cluster is about to be destroyed due to PendingKill flag being set on it.
 
FORCEINLINE bool operator< (const UObjectBaseUtility &Other) const
 Overloaded < operator. 更多...
 
void ReattachExternalPackage ()
 Utility function to reattach the object external package, if any GetPackage will report the object external package if set after this call
 
FORCEINLINE void RemoveFromRoot ()
 Remove an object from the root set.
 
bool RootPackageHasAnyFlags (uint32 CheckFlagMask) const
 Checks whether this object's top-most package has any of the specified flags 更多...
 
FORCEINLINE void SetFlags (EObjectFlags NewFlags)
 Modifies object flags for a specific object
 
FORCEINLINE void SetInternalFlags (EInternalObjectFlags FlagsToSet) const
 Clears passed in internal flags. 更多...
 
FORCEINLINE bool ThisThreadAtomicallyClearedRFUnreachable ()
 Atomically clear the unreachable flag 更多...
 
FORCEINLINE void UnMark (EObjectMark Marks) const
 Removes marks from and object 更多...
 
- Public 成员函数 继承自 UObjectBase
FORCENOINLINE void AtomicallyClearFlags (EObjectFlags FlagsToClear)
 Atomically clears the specified flags. 更多...
 
FORCENOINLINE void AtomicallySetFlags (EObjectFlags FlagsToAdd)
 Atomically adds the specified flags. 更多...
 
FORCEINLINE UClass * GetClass () const
 Returns the UClass that defines the fields of this object
 
UPackage * GetExternalPackage () const
 Returns the external UPackage associated with this object, if any
 
UPackage * GetExternalPackageInternal () const
 Returns the external UPackage for this object, if any, NOT THREAD SAFE, used by internal gc reference collecting.
 
FORCEINLINE EObjectFlags GetFlags () const
 Retrieve the object flags directly 更多...
 
FORCEINLINE FName GetFName () const
 Returns the logical name of this object
 
FORCEINLINE UObject * GetOuter () const
 Returns the UObject this object resides in
 
FORCEINLINE uint32 GetUniqueID () const
 Returns the unique ID of the object...these are reused so it is only unique while the object is alive. 更多...
 
bool IsValidLowLevel () const
 Checks to see if the object appears to be valid 更多...
 
bool IsValidLowLevelFast (bool bRecursive=true) const
 Faster version of IsValidLowLevel. 更多...
 
void SetExternalPackage (UPackage *InPackage)
 Associate an external package directly to this object.
 
 UObjectBase (UClass *InClass, EObjectFlags InFlags, EInternalObjectFlags InInternalFlags, UObject *InOuter, FName InName)
 Constructor used by StaticAllocateObject 更多...
 
virtual ~UObjectBase ()
 Final destructor, removes the object from the object array, and indirectly, from any annotations
 

Public 属性

FTimespan CacheAhead
 Duration of samples to cache ahead of the play head. 更多...
 
FTimespan CacheBehind
 Duration of samples to cache behind the play head (when not running as game). 更多...
 
FTimespan CacheBehindGame
 Duration of samples to cache behind the play head (when running as game). 更多...
 
bool NativeAudioOut
 Output any audio via the operating system's sound mixer instead of a Sound Wave asset. 更多...
 
FOnMediaPlayerMediaEvent OnEndReached
 A delegate that is invoked when playback has reached the end of the media.
 
FOnMediaPlayerMediaEvent OnMediaClosed
 A delegate that is invoked when a media source has been closed.
 
FOnMediaPlayerMediaOpened OnMediaOpened
 A delegate that is invoked when a media source has been opened. 更多...
 
FOnMediaPlayerMediaOpenFailed OnMediaOpenFailed
 A delegate that is invoked when a media source has failed to open. 更多...
 
FOnMediaPlayerMediaEvent OnPlaybackResumed
 A delegate that is invoked when media playback has been resumed. 更多...
 
FOnMediaPlayerMediaEvent OnPlaybackSuspended
 A delegate that is invoked when media playback has been suspended. 更多...
 
FOnMediaPlayerMediaEvent OnSeekCompleted
 A delegate that is invoked when a seek operation completed successfully. 更多...
 
FOnMediaPlayerMediaEvent OnTracksChanged
 A delegate that is invoked when the media track collection changed. 更多...
 
bool PlayOnOpen
 Automatically start playback after media opened successfully. 更多...
 
uint32 Shuffle: 1
 Whether playback should shuffle media sources in the play list. 更多...
 

Protected 属性

float HorizontalFieldOfView
 The initial horizontal field of view (in Euler degrees; default = 90). 更多...
 
uint32 Loop:1
 Whether the player should loop when media playback reaches the end. 更多...
 
UMediaPlaylist * Playlist
 The play list to use, if any. 更多...
 
int32 PlaylistIndex
 The current index of the source in the play list being played. 更多...
 
FTimespan TimeDelay
 Delay of the player's time. 更多...
 
float VerticalFieldOfView
 The initial vertical field of view (in Euler degrees; default = 60). 更多...
 
FRotator ViewRotation
 The initial view rotation. 更多...
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 UObject
static void AddReferencedObjects (UObject *InThis, FReferenceCollector &Collector)
 Callback used to allow object register its direct object references that are not already covered by the token stream. 更多...
 
static bool CanCreateInCurrentContext (UObject *Template)
 Determines if you can create an object from the supplied template in the current context (editor, client only, dedicated server, game/listen) This calls NeedsLoadForClient & NeedsLoadForServer
 
static UObject * GetArchetypeFromRequiredInfo (const UClass *Class, const UObject *Outer, FName Name, EObjectFlags ObjectFlags)
 Return the template that an object with this class, outer and name would be 更多...
 
static const FName & SourceFileTagName ()
 Get the common tag name used for all asset source file import paths
 
static void UpdateClassesExcludedFromDedicatedClient (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 Update the list of classes that we should exclude from dedicated client builds
 
static void UpdateClassesExcludedFromDedicatedServer (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 Update the list of classes that we should exclude from dedicated server builds
 
- 静态 Public 成员函数 继承自 UObjectBase
static void EmitBaseReferences (UClass *RootClass)
 Emit GC tokens for UObjectBase, this might be UObject::StaticClass or Default__Class
 
static FString RemoveClassPrefix (const TCHAR *ClassName)
 Removes the class prefix from the given string
 
- Protected 成员函数 继承自 UObject
bool CanCheckDefaultSubObjects (bool bForceCheck, bool &bResult) const
 Checks it's ok to perform subobjects check at this time.
 
virtual bool CheckDefaultSubobjectsInternal () const
 Checks default sub-object assumptions. 更多...
 
virtual FString GetDetailedInfoInternal () const
 This function actually does the work for the GetDetailedInfo() and is virtual. 更多...
 
- Protected 成员函数 继承自 UObjectBase
virtual void DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *Name)
 Convert a boot-strap registered class into a real one, add to uobject array, etc 更多...
 
void LowLevelRename (FName NewName, UObject *NewOuter=NULL)
 Just change the FName and Outer and rehash into name hash tables. 更多...
 
void Register (const TCHAR *PackageName, const TCHAR *Name)
 Enqueue the registration for this object.
 
virtual void RegisterDependencies ()
 Force any base classes to be registered first
 
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 Set the object flags directly 更多...
 
 UObjectBase (EObjectFlags InFlags)
 Constructor used for bootstrapping 更多...
 
- 静态 Protected 成员函数 继承自 UObjectBaseUtility
static void CreateClusterFromObject (UObjectBaseUtility *ClusterRootObject, UObjectBaseUtility *ReferencingObject)
 Helper function to create a cluster from UObject
 

详细描述

Implements a media player asset that can play movies and other media sources.

成员函数说明

◆ BeginDestroy()

virtual void UMediaPlayer::BeginDestroy ( )
overridevirtual

Called before destroying the object.

This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.

重载 UObject .

◆ CanPause()

bool UMediaPlayer::CanPause ( ) const

Check whether media playback can be paused right now.

Playback can be paused if the media supports pausing and if it is currently playing.

返回
true if pausing playback can be paused, false otherwise.
参见
CanPlay, Pause

◆ CanPlaySource()

bool UMediaPlayer::CanPlaySource ( UMediaSource *  MediaSource)

Check whether the specified media source can be played by this player.

If a desired player name is set for this player, it will only check whether that particular player type can play the specified source.

参数
MediaSourceThe media source to check.
返回
true if the media source can be opened, false otherwise.
参见
CanPlayUrl, SetDesiredPlayerName

◆ CanPlayUrl()

bool UMediaPlayer::CanPlayUrl ( const FString &  Url)

Check whether the specified URL can be played by this player.

If a desired player name is set for this player, it will only check whether that particular player type can play the specified URL.

参数
UrlThe URL to check.
参见
CanPlaySource, SetDesiredPlayerName

◆ Close()

void UMediaPlayer::Close ( )

Close the currently open media, if any.

参见
OnMediaClosed, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Pause, Play

◆ DECLARE_EVENT_OneParam()

UMediaPlayer::DECLARE_EVENT_OneParam ( UMediaPlayer  ,
FOnMediaEvent  ,
EMediaEvent   
) &
inline

Get an event delegate that is invoked when a media event occurred.

返回
The delegate.

◆ GetAudioTrackChannels()

int32 UMediaPlayer::GetAudioTrackChannels ( int32  TrackIndex,
int32  FormatIndex 
) const

Get the number of channels in the specified audio track.

参数
TrackIndexIndex of the audio track, or INDEX_NONE for the selected one.
FormatIndexIndex of the track format, or INDEX_NONE for the selected one.
返回
Number of channels.
参见
GetAudioTrackSampleRate, GetAudioTrackType

◆ GetAudioTrackSampleRate()

int32 UMediaPlayer::GetAudioTrackSampleRate ( int32  TrackIndex,
int32  FormatIndex 
) const

Get the sample rate of the specified audio track.

参数
TrackIndexIndex of the audio track, or INDEX_NONE for the selected one.
FormatIndexIndex of the track format, or INDEX_NONE for the selected one.
返回
Samples per second.
参见
GetAudioTrackChannels, GetAudioTrackType

◆ GetAudioTrackType()

FString UMediaPlayer::GetAudioTrackType ( int32  TrackIndex,
int32  FormatIndex 
) const

Get the type of the specified audio track format.

参数
TrackIndexThe index of the track, or INDEX_NONE for the selected one.
FormatIndexIndex of the track format, or INDEX_NONE for the selected one.
返回
Audio format type string.
参见
GetAudioTrackSampleRate, GetAudioTrackSampleRate

◆ GetDesiredPlayerName()

FName UMediaPlayer::GetDesiredPlayerName ( ) const

Get the name of the current desired native player.

返回
The name of the desired player, or NAME_None if not set.
参见
SetDesiredPlayerName

◆ GetDuration()

FTimespan UMediaPlayer::GetDuration ( ) const

Get the media's duration.

返回
A time span representing the duration.
参见
GetTime, Seek

◆ GetGuid()

const FGuid & UMediaPlayer::GetGuid ( )
inline

Get the Guid associated with this media player

返回
The Guid.

◆ GetHorizontalFieldOfView()

float UMediaPlayer::GetHorizontalFieldOfView ( ) const

Get the current horizontal field of view (only for 360 videos).

返回
Horizontal field of view (in Euler degrees).
参见
GetVerticalFieldOfView, GetViewRotation, SetHorizontalFieldOfView

◆ GetMediaName()

virtual FText UMediaPlayer::GetMediaName ( ) const
virtual

Get the human readable name of the currently loaded media source.

返回
Media source name, or empty text if no media is opened
参见
GetPlayerName, GetUrl

◆ GetNumTrackFormats()

int32 UMediaPlayer::GetNumTrackFormats ( EMediaPlayerTrack  TrackType,
int32  TrackIndex 
) const

Get the number of formats of the specified track.

参数
TrackTypeThe type of media tracks.
TrackIndexThe index of the track.
返回
Number of formats.
参见
GetNumTracks, GetSelectedTrack, SelectTrack

◆ GetNumTracks()

int32 UMediaPlayer::GetNumTracks ( EMediaPlayerTrack  TrackType) const

Get the number of tracks of the given type.

参数
TrackTypeThe type of media tracks.
返回
Number of tracks.
参见
GetNumTrackFormats, GetSelectedTrack, SelectTrack

◆ GetPlayerFacade()

TSharedRef< FMediaPlayerFacade, ESPMode::ThreadSafe > UMediaPlayer::GetPlayerFacade ( ) const

Get the media player facade that manages low-level media players

返回
The media player facade.

◆ GetPlayerName()

FName UMediaPlayer::GetPlayerName ( ) const

Get the name of the current native media player.

返回
Player name, or NAME_None if not available.
参见
GetMediaName

◆ GetPlaylist()

UMediaPlaylist * UMediaPlayer::GetPlaylist ( ) const
inline

Get the current play list.

Media players always have a valid play list. In C++ code you can use the GetPlaylistRef to get a reference instead of a pointer to it.

返回
The play list.
参见
GetPlaylistIndex, GetPlaylistRef

◆ GetPlaylistIndex()

int32 UMediaPlayer::GetPlaylistIndex ( ) const
inline

Get the current play list index.

返回
Play list index.
参见
GetPlaylist

◆ GetPlaylistRef()

UMediaPlaylist & UMediaPlayer::GetPlaylistRef ( ) const
inline

Get the current play list.

返回
The play list.
参见
GetPlaylistIndex, GetPlaylist

◆ GetRate()

float UMediaPlayer::GetRate ( ) const

Get the media's current playback rate.

返回
The playback rate.
参见
SetRate, SupportsRate

◆ GetSelectedTrack()

int32 UMediaPlayer::GetSelectedTrack ( EMediaPlayerTrack  TrackType) const

Get the index of the currently selected track of the given type.

参数
TrackTypeThe type of track to get.
返回
The index of the selected track, or INDEX_NONE if no track is active.
参见
GetNumTracks, GetTrackFormat, SelectTrack

◆ GetSupportedRates()

void UMediaPlayer::GetSupportedRates ( TArray< FFloatRange > &  OutRates,
bool  Unthinned 
) const

Get the supported playback rates.

参数
UnthinnedWhether the rates are for unthinned playback.
Willcontain the the ranges of supported rates.
参见
SetRate, SupportsRate

◆ GetTime()

FTimespan UMediaPlayer::GetTime ( ) const

Get the media's current playback time.

返回
Playback time.
参见
GetDuration, Seek

◆ GetTimeDelay()

FTimespan UMediaPlayer::GetTimeDelay ( ) const

Delay of the player's time.

返回
Delay added to the player's time used to manually sync multiple sources.
参见
SetTimeDelay

◆ GetTimeStamp()

UMediaTimeStampInfo * UMediaPlayer::GetTimeStamp ( ) const

Get the media's current playback timestamp.

返回
Playback timestamp.
参见
GetDuration, Seek

◆ GetTrackDisplayName()

FText UMediaPlayer::GetTrackDisplayName ( EMediaPlayerTrack  TrackType,
int32  TrackIndex 
) const

Get the human readable name of the specified track.

参数
TrackTypeThe type of track.
TrackIndexThe index of the track, or INDEX_NONE for the selected one.
返回
Display name.
参见
GetNumTracks, GetTrackLanguage

◆ GetTrackFormat()

int32 UMediaPlayer::GetTrackFormat ( EMediaPlayerTrack  TrackType,
int32  TrackIndex 
) const

Get the index of the active format of the specified track type.

参数
TrackTypeThe type of track.
TrackIndexThe index of the track, or INDEX_NONE for the selected one.
返回
The index of the selected format.
参见
GetNumTrackFormats, GetSelectedTrack, SetTrackFormat

◆ GetTrackLanguage()

FString UMediaPlayer::GetTrackLanguage ( EMediaPlayerTrack  TrackType,
int32  TrackIndex 
) const

Get the language tag of the specified track.

参数
TrackTypeThe type of track.
TrackIndexThe index of the track, or INDEX_NONE for the selected one.
返回
Language tag, i.e. "en-US" for English, or "und" for undefined.
参见
GetNumTracks, GetTrackDisplayName

◆ GetUrl()

const FString & UMediaPlayer::GetUrl ( ) const

Get the URL of the currently loaded media, if any.

返回
Media URL, or empty string if no media was loaded.
参见
OpenUrl

◆ GetVerticalFieldOfView()

float UMediaPlayer::GetVerticalFieldOfView ( ) const

Get the current vertical field of view (only for 360 videos).

返回
Vertical field of view (in Euler degrees), or 0.0 if not available.
参见
GetHorizontalFieldOfView, GetViewRotation, SetVerticalFieldOfView

◆ GetVideoTrackAspectRatio()

float UMediaPlayer::GetVideoTrackAspectRatio ( int32  TrackIndex,
int32  FormatIndex 
) const

Get the aspect ratio of the specified video track.

参数
TrackIndexIndex of the video track, or INDEX_NONE for the selected one.
FormatIndexIndex of the track format, or INDEX_NONE for the selected one.
返回
Aspect ratio.
参见
GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackFrameRates, GetVideoTrackType

◆ GetVideoTrackDimensions()

FIntPoint UMediaPlayer::GetVideoTrackDimensions ( int32  TrackIndex,
int32  FormatIndex 
) const

Get the current dimensions of the specified video track.

参数
TrackIndexThe index of the track, or INDEX_NONE for the selected one.
FormatIndexIndex of the track format, or INDEX_NONE for the selected one.
返回
Video dimensions (in pixels).
参见
GetVideoTrackAspectRatio, GetVideoTrackFrameRate, GetVideoTrackFrameRates, GetVideoTrackType

◆ GetVideoTrackFrameRate()

float UMediaPlayer::GetVideoTrackFrameRate ( int32  TrackIndex,
int32  FormatIndex 
) const

Get the frame rate of the specified video track.

参数
TrackIndexThe index of the track, or INDEX_NONE for the selected one.
FormatIndexIndex of the track format, or INDEX_NONE for the selected one.
返回
Frame rate (in frames per second).
参见
GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRates, GetVideoTrackType, SetVideoTrackFrameRate

◆ GetVideoTrackFrameRates()

FFloatRange UMediaPlayer::GetVideoTrackFrameRates ( int32  TrackIndex,
int32  FormatIndex 
) const

Get the supported range of frame rates of the specified video track.

参数
TrackIndexThe index of the track, or INDEX_NONE for the selected one.
FormatIndexIndex of the track format, or INDEX_NONE for the selected one.
返回
Frame rate range (in frames per second).
参见
GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackType

◆ GetVideoTrackType()

FString UMediaPlayer::GetVideoTrackType ( int32  TrackIndex,
int32  FormatIndex 
) const

Get the type of the specified video track format.

参数
TrackIndexThe index of the track, or INDEX_NONE for the selected one.
FormatIndexIndex of the track format, or INDEX_NONE for the selected one.
返回
Video format type string.
参见
GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackFrameRates

◆ GetViewRotation()

FRotator UMediaPlayer::GetViewRotation ( ) const

Get the current view rotation (only for 360 videos).

返回
View rotation, or zero rotator if not available.
参见
GetHorizontalFieldOfView, GetVerticalFieldOfView, SetViewRotation

◆ HasError()

bool UMediaPlayer::HasError ( ) const

Check whether the player is in an error state.

When the player is in an error state, no further operations are possible. The current media must be closed, and a new media source must be opened before the player can be used again. Errors are usually caused by faulty media files or interrupted network connections.

参见
IsReady

◆ IsBuffering()

bool UMediaPlayer::IsBuffering ( ) const

Check whether playback is buffering data.

返回
true if looping, false otherwise.
参见
IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady

◆ IsClosed()

bool UMediaPlayer::IsClosed ( ) const

Whether media is currently closed.

返回
true if media is closed, false otherwise.

◆ IsConnecting()

bool UMediaPlayer::IsConnecting ( ) const

Check whether the player is currently connecting to a media source.

返回
true if connecting, false otherwise.
参见
IsBuffering, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady

◆ IsLooping()

bool UMediaPlayer::IsLooping ( ) const

Check whether playback is looping.

返回
true if looping, false otherwise.
参见
IsBuffering, IsConnecting, IsPaused, IsPlaying, IsPreparing, IsReady, SetLooping

◆ IsPaused()

bool UMediaPlayer::IsPaused ( ) const

Check whether playback is currently paused.

返回
true if playback is paused, false otherwise.
参见
CanPause, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady, Pause

◆ IsPlaying()

bool UMediaPlayer::IsPlaying ( ) const

Check whether playback has started.

返回
true if playback has started, false otherwise.
参见
CanPlay, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing, IsReady, Play

◆ IsPreparing()

bool UMediaPlayer::IsPreparing ( ) const

Check whether the media is currently opening or buffering.

返回
true if playback is being prepared, false otherwise.
参见
CanPlay, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsReady, Play

◆ IsReady()

bool UMediaPlayer::IsReady ( ) const

Check whether media is ready for playback.

A player is ready for playback if it has a media source opened that finished preparing and is not in an error state.

返回
true if media is ready, false otherwise.
参见
HasError, IsBuffering, IsConnecting, IsLooping, IsPaused, IsPlaying, IsPreparing

◆ Next()

bool UMediaPlayer::Next ( )

Open the next item in the current play list.

The player will start playing the new media source if it was playing something previously, otherwise it will only open the media source.

返回
true on success, false otherwise.
参见
Close, OpenUrl, OpenSource, Play, Previous, SetPlaylist

◆ OpenFile()

bool UMediaPlayer::OpenFile ( const FString &  FilePath)

Opens the specified media file path.

A return value of true indicates that the player will attempt to open the media, but it may fail to do so later for other reasons, i.e. if a connection to the media server timed out. Use the OnMediaOpened and OnMediaOpenFailed delegates to detect if and when the media is ready!

参数
FilePathThe file path to open.
返回
true if the file path will be opened, false otherwise.
参见
GetUrl, Close, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Reopen

◆ OpenPlaylist()

bool UMediaPlayer::OpenPlaylist ( UMediaPlaylist *  InPlaylist)
inline

Open the first media source in the specified play list.

参数
InPlaylistThe play list to open.
返回
true if the source will be opened, false otherwise.
参见
Close, OpenFile, OpenPlaylistIndex, OpenSource, OpenUrl, Reopen

◆ OpenPlaylistIndex()

bool UMediaPlayer::OpenPlaylistIndex ( UMediaPlaylist *  InPlaylist,
int32  Index 
)

Open a particular media source in the specified play list.

参数
InPlaylistThe play list to open.
IndexThe index of the source to open.
返回
true if the source will be opened, false otherwise.
参见
Close, OpenFile, OpenPlaylist, OpenSource, OpenUrl, Reopen

◆ OpenSource()

bool UMediaPlayer::OpenSource ( UMediaSource *  MediaSource)

Open the specified media source.

A return value of true indicates that the player will attempt to open the media, but it may fail to do so later for other reasons, i.e. if a connection to the media server timed out. Use the OnMediaOpened and OnMediaOpenFailed delegates to detect if and when the media is ready!

参数
MediaSourceThe media source to open.
返回
true if the source will be opened, false otherwise.
参见
Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenUrl, Reopen

◆ OpenSourceLatent()

void UMediaPlayer::OpenSourceLatent ( const UObject *  WorldContextObject,
struct FLatentActionInfo  LatentInfo,
UMediaSource *  MediaSource,
const FMediaPlayerOptions &  Options,
bool &  bSuccess 
)

Open the specified media source with options using a latent action.

A result of true indicates that the player successfully completed all requested operations.

参数
MediaSourceThe media source to open.
OptionsThe media player options to apply.
bSuccessAll requested operations have completed successfully.
参见
Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenUrl, Reopen

◆ OpenSourceWithOptions()

bool UMediaPlayer::OpenSourceWithOptions ( UMediaSource *  MediaSource,
const FMediaPlayerOptions &  Options 
)

Open the specified media source with supplied options applied.

A return value of true indicates that the player will attempt to open the media, but it may fail to do so later for other reasons, i.e. if a connection to the media server timed out. Use the OnMediaOpened and OnMediaOpenFailed delegates to detect if and when the media is ready!

参数
MediaSourceThe media source to open.
OptionsThe media player options to apply.
返回
true if the source will be opened, false otherwise.
参见
Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenUrl, Reopen

◆ OpenUrl()

bool UMediaPlayer::OpenUrl ( const FString &  Url)

Opens the specified media URL.

A return value of true indicates that the player will attempt to open the media, but it may fail to do so later for other reasons, i.e. if a connection to the media server timed out. Use the OnMediaOpened and OnMediaOpenFailed delegates to detect if and when the media is ready!

参数
UrlThe URL to open.
返回
true if the URL will be opened, false otherwise.
参见
GetUrl, Close, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenSource, Reopen

◆ Pause()

bool UMediaPlayer::Pause ( )

Pauses media playback.

This is the same as setting the playback rate to 0.0.

返回
true if playback is being paused, false otherwise.
参见
CanPause, Close, Next, Play, Previous, Rewind, Seek

◆ Play()

bool UMediaPlayer::Play ( )

Starts media playback.

This is the same as setting the playback rate to 1.0.

返回
true if playback is starting, false otherwise.
参见
CanPlay, GetRate, Next, Pause, Previous, SetRate

◆ PostDuplicate()

virtual void UMediaPlayer::PostDuplicate ( bool  bDuplicateForPIE)
overridevirtual

Called after duplication & serialization and before PostLoad.

Used to e.g. make sure UStaticMesh's UModel gets copied as well. Note: NOT called on components on actor duplication (alt-drag or copy-paste). Use PostEditImport as well to cover that case.

重载 UObject .

◆ PostInitProperties()

virtual void UMediaPlayer::PostInitProperties ( )
overridevirtual

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

This is called before any serialization or other setup has happened.

重载 UObject .

◆ PostLoad()

virtual void UMediaPlayer::PostLoad ( )
overridevirtual

Do any object-specific cleanup required immediately after loading an object.

This is not called for newly-created objects, and by default will always execute on the game thread.

重载 UObject .

◆ Previous()

bool UMediaPlayer::Previous ( )

Open the previous item in the current play list.

The player will start playing the new media source if it was playing something previously, otherwise it will only open the media source.

返回
true on success, false otherwise.
参见
Close, Next, OpenUrl, OpenSource, Play, SetPlaylist

◆ RegisterWithMediaModule()

void UMediaPlayer::RegisterWithMediaModule ( )

Register player with media module to be ticked

◆ Reopen()

bool UMediaPlayer::Reopen ( )

Reopens the currently opened media or play list.

返回
true if the media will be opened, false otherwise.
参见
Close, Open, OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl

◆ Rewind()

bool UMediaPlayer::Rewind ( )

Rewinds the media to the beginning.

This is the same as seeking to zero time.

返回
true if rewinding, false otherwise.
参见
GetTime, Seek

◆ Seek()

bool UMediaPlayer::Seek ( const FTimespan &  Time)

Seeks to the specified playback time.

参数
TimeThe playback time to set.
返回
true on success, false otherwise.
参见
GetTime, Rewind

◆ SelectTrack()

bool UMediaPlayer::SelectTrack ( EMediaPlayerTrack  TrackType,
int32  TrackIndex 
)

Select the active track of the given type.

The selected track will use its currently active format. Active formats will be remembered on a per track basis. The first available format is active by default. To switch the track format, use SetTrackFormat instead.

参数
TrackTypeThe type of track to select.
TrackIndexThe index of the track to select, or INDEX_NONE to deselect.
返回
true if the track was selected, false otherwise.
参见
GetNumTracks, GetSelectedTrack, SetTrackFormat

◆ SetBlockOnTime()

void UMediaPlayer::SetBlockOnTime ( const FTimespan &  Time)

Set the time on which to block.

If set, this player will block in TickFetch until the video sample for the specified time are actually available.

参数
TimeThe time to block on, or FTimespan::MinValue to disable.

◆ SetDesiredPlayerName()

void UMediaPlayer::SetDesiredPlayerName ( FName  PlayerName)

Set the name of the desired native player.

参数
PlayerNameThe name of the player to set.
参见
GetDesiredPlayerName

◆ SetLooping()

bool UMediaPlayer::SetLooping ( bool  Looping)

Enables or disables playback looping.

参数
LoopingWhether playback should be looped.
返回
true on success, false otherwise.
参见
IsLooping

◆ SetMediaOptions()

void UMediaPlayer::SetMediaOptions ( const UMediaSource *  Options)

Sets the media options used by the player.

参数
OptionsOptions to pass to the player.

◆ SetNativeVolume()

bool UMediaPlayer::SetNativeVolume ( float  Volume)

Set the volume on the native player if not mixing with Sound Wave asset.

The SetNativeVolume can be used to change the audio output volume at runtime. Note that not all media player plug-ins may support native audio output on all platforms.

参数
VolumeThe volume to set.
返回
true on success, false otherwise.
参见
NativeAudioOut

◆ SetRate()

bool UMediaPlayer::SetRate ( float  Rate)

Changes the media's playback rate.

参数
RateThe playback rate to set.
返回
true on success, false otherwise.
参见
GetRate, SupportsRate

◆ SetTimeDelay()

void UMediaPlayer::SetTimeDelay ( FTimespan  TimeDelay)

Delay of the player's time.

This setting can be used to manually sync multiple sources. Set to 1 seconds, if you would like that Player to play 1 second behind his current time. If the value is too big, it is possible that the player would not hold that frame for that long.

返回
true on success, false otherwise.
参见
GetTimeDelay

◆ SetTrackFormat()

bool UMediaPlayer::SetTrackFormat ( EMediaPlayerTrack  TrackType,
int32  TrackIndex,
int32  FormatIndex 
)

Set the format on the specified track.

Selecting the format will not switch to the specified track. To switch tracks, use SelectTrack instead. If the track is already selected, the format change will be applied immediately.

参数
TrackTypeThe type of track to update.
TrackIndexThe index of the track to update.
FormatIndexThe index of the format to select (must be valid).
返回
true if the track was selected, false otherwise.
参见
GetNumTrackFormats, GetNumTracks, GetTrackFormat, SelectTrack

◆ SetVideoTrackFrameRate()

bool UMediaPlayer::SetVideoTrackFrameRate ( int32  TrackIndex,
int32  FormatIndex,
float  FrameRate 
)

Set the frame rate of the specified video track.

参数
TrackIndexThe index of the track, or INDEX_NONE for the selected one.
FormatIndexIndex of the track format, or INDEX_NONE for the selected one.
FrameRateThe frame rate to set (must be in range of format's supported frame rates).
返回
true on success, false otherwise.
参见
GetVideoTrackAspectRatio, GetVideoTrackDimensions, GetVideoTrackFrameRate, GetVideoTrackFrameRates, GetVideoTrackType

◆ SetViewField()

bool UMediaPlayer::SetViewField ( float  Horizontal,
float  Vertical,
bool  Absolute 
)

Set the field of view (only for 360 videos).

参数
HorizontalHorizontal field of view (in Euler degrees).
VerticalVertical field of view (in Euler degrees).
Whetherthe field of view change should be absolute (true) or relative (false).
返回
true on success, false otherwise.
参见
GetHorizontalFieldOfView, GetVerticalFieldOfView, SetViewRotation

◆ SetViewRotation()

bool UMediaPlayer::SetViewRotation ( const FRotator &  Rotation,
bool  Absolute 
)

Set the view's rotation (only for 360 videos).

参数
RotationThe desired view rotation.
Whetherthe rotation change should be absolute (true) or relative (false).
返回
true on success, false otherwise.
参见
GetViewRotation, SetViewField

◆ SupportsRate()

bool UMediaPlayer::SupportsRate ( float  Rate,
bool  Unthinned 
) const

Check whether the specified playback rate is supported.

参数
RateThe playback rate to check.
UnthinnedWhether no frames should be dropped at the given rate.
参见
SupportsScrubbing, SupportsSeeking

◆ SupportsScrubbing()

bool UMediaPlayer::SupportsScrubbing ( ) const

Check whether the currently loaded media supports scrubbing.

返回
true if scrubbing is supported, false otherwise.
参见
SupportsRate, SupportsSeeking

◆ SupportsSeeking()

bool UMediaPlayer::SupportsSeeking ( ) const

Check whether the currently loaded media can jump to a certain position.

返回
true if seeking is supported, false otherwise.
参见
SupportsRate, SupportsScrubbing

类成员变量说明

◆ CacheAhead

FTimespan UMediaPlayer::CacheAhead

Duration of samples to cache ahead of the play head.

参见
CacheBehind, CacheBehindGame

◆ CacheBehind

FTimespan UMediaPlayer::CacheBehind

Duration of samples to cache behind the play head (when not running as game).

参见
CacheAhead, CacheBehindGame

◆ CacheBehindGame

FTimespan UMediaPlayer::CacheBehindGame

Duration of samples to cache behind the play head (when running as game).

参见
CacheAhead, CacheBehind

◆ HorizontalFieldOfView

float UMediaPlayer::HorizontalFieldOfView
protected

The initial horizontal field of view (in Euler degrees; default = 90).

This setting is used only for 360 videos. It determines the portion of the video that is visible at a time. To modify the field of view at runtime in Blueprints, use the SetHorizontalFieldOfView function.

参见
GetHorizontalFieldOfView, SetHorizontalFieldOfView, VerticalFieldOfView, ViewRotation

◆ Loop

uint32 UMediaPlayer::Loop
protected

Whether the player should loop when media playback reaches the end.

Use the SetLooping function to change this value at runtime.

参见
IsLooping, SetLooping

◆ NativeAudioOut

bool UMediaPlayer::NativeAudioOut

Output any audio via the operating system's sound mixer instead of a Sound Wave asset.

If enabled, the assigned Sound Wave asset will be ignored. The SetNativeVolume function can then be used to change the audio output volume at runtime. Note that not all media player plug-ins may support native audio output on all platforms.

参见
SetNativeVolume

◆ OnMediaOpened

FOnMediaPlayerMediaOpened UMediaPlayer::OnMediaOpened

A delegate that is invoked when a media source has been opened.

Depending on whether the underlying player implementation opens the media synchronously or asynchronously, this event may be executed before or after the call to OpenSource / OpenUrl returns.

参见
OnMediaOpenFailed, OnTracksChanged

◆ OnMediaOpenFailed

FOnMediaPlayerMediaOpenFailed UMediaPlayer::OnMediaOpenFailed

A delegate that is invoked when a media source has failed to open.

This delegate is only executed if OpenSource / OpenUrl returned true and the media failed to open asynchronously later. It is not executed if OpenSource / OpenUrl returned false, indicating an immediate failure.

参见
OnMediaOpened

◆ OnPlaybackResumed

FOnMediaPlayerMediaEvent UMediaPlayer::OnPlaybackResumed

A delegate that is invoked when media playback has been resumed.

参见
OnPlaybackSuspended

◆ OnPlaybackSuspended

FOnMediaPlayerMediaEvent UMediaPlayer::OnPlaybackSuspended

A delegate that is invoked when media playback has been suspended.

参见
OnPlaybackResumed

◆ OnSeekCompleted

FOnMediaPlayerMediaEvent UMediaPlayer::OnSeekCompleted

A delegate that is invoked when a seek operation completed successfully.

Depending on whether the underlying player implementation performs seeks synchronously or asynchronously, this event may be executed before or after the call to Seek returns.

◆ OnTracksChanged

FOnMediaPlayerMediaEvent UMediaPlayer::OnTracksChanged

A delegate that is invoked when the media track collection changed.

参见
OnMediaOpened

◆ Playlist

UMediaPlaylist* UMediaPlayer::Playlist
protected

The play list to use, if any.

Use the OpenPlaylist or OpenPlaylistIndex function to change this value at runtime.

参见
OpenPlaylist, OpenPlaylistIndex

◆ PlaylistIndex

int32 UMediaPlayer::PlaylistIndex
protected

The current index of the source in the play list being played.

Use the Previous and Next methods to change this value at runtime.

参见
Next, Previous

◆ PlayOnOpen

bool UMediaPlayer::PlayOnOpen

Automatically start playback after media opened successfully.

If disabled, listen to the OnMediaOpened Blueprint event to detect when the media finished opening, and then start playback using the Play function.

参见
OpenFile, OpenPlaylist, OpenPlaylistIndex, OpenSource, OpenUrl, Play

◆ Shuffle

uint32 UMediaPlayer::Shuffle

Whether playback should shuffle media sources in the play list.

参见
OpenPlaylist, OpenPlaylistIndex

◆ TimeDelay

FTimespan UMediaPlayer::TimeDelay
protected

Delay of the player's time.

参见
SetTimeDelay, GetTimeDelay

◆ VerticalFieldOfView

float UMediaPlayer::VerticalFieldOfView
protected

The initial vertical field of view (in Euler degrees; default = 60).

This setting is used only for 360 videos. It determines the portion of the video that is visible at a time. To modify the field of view at runtime in Blueprints, use the SetHorizontalFieldOfView function.

Please note that some 360 video players may be able to change only the horizontal field of view, and this setting may be ignored.

参见
GetVerticalFieldOfView, SetVerticalFieldOfView, HorizontalFieldOfView, ViewRotation

◆ ViewRotation

FRotator UMediaPlayer::ViewRotation
protected

The initial view rotation.

This setting is used only for 360 videos. It determines the rotation of the video's view. To modify the view orientation at runtime in Blueprints, use the GetViewRotation and SetViewRotation functions.

Please note that not all players may support video view rotations.

参见
GetViewRotation, SetViewRotation, HorizontalFieldOfView, VerticalFieldOfView

该类的文档由以下文件生成: