CRIWARE Unity Plugin Manual
Last Updated: 2024-07-12
|
A wrapper class for native player that controls the movie playback. More...
Inherits CriDisposable.
Public Types | |
enum | Status { Stop, Dechead, WaitPrep, Prep, Ready, Playing, PlayEnd, Error, StopProcessing, ReadyForRendering } |
A value indicating the player status. More... | |
enum | SetMode { New, Append, AppendRepeatedly } |
A mode for setting files. More... | |
enum | MovieEventSyncMode { FrameTime, PlayBackTime } |
Synchronization mode for movie events (Cue points, subtitles). More... | |
enum | AudioTrack { Off, Auto } |
A mode when setting the audio track. More... | |
enum | TimerType : int { None = 0, System = 1, Audio = 2, User = 3, Manual = 4 } |
Timer type. More... | |
Public Member Functions | |
delegate void | CuePointCallback (ref EventPoint eventPoint) |
A Cue point callback delegate type. More... | |
delegate void | StatusChangeCallback (Status status) |
A delegate type for the callback when the player status changes. More... | |
delegate void | SubtitleChangeCallback (IntPtr subtitleBuffer) |
Delegate type of subtitle information update callback More... | |
delegate UnityEngine.Shader | ShaderDispatchCallback (MovieInfo movieInfo, bool additiveMode) |
A shader selection delegate type. More... | |
override void | Dispose () |
Discards the player object More... | |
void | CreateRendererResource (int width, int height, bool alpha) |
Generates the resources required for movie rendering. More... | |
void | DisposeRendererResource () |
Discards the resources required for rendering movie. More... | |
void | Prepare () |
Prepares for playback. More... | |
void | PrepareForRendering () |
Prepares for playback. More... | |
void | Start () |
Start playback. More... | |
void | Stop () |
Requests to stop movie playback. More... | |
void | StopForSeek () |
Requests to stop movie playback. More... | |
void | Pause (bool sw) |
Pauses/unpauses the movie playback. More... | |
bool | IsPaused () |
Gets the pausing status of the movie playback. More... | |
bool | SetFile (CriFsBinder binder, string moviePath, SetMode setMode=SetMode.New) |
Sets the file path of the streaming playback. More... | |
bool | SetData (IntPtr data, System.Int64 dataSize, SetMode setMode=SetMode.New) |
Sets the data for memory playback. More... | |
bool | SetData (byte[] data, System.Int64 datasize, SetMode setMode=SetMode.New) |
bool | SetContentId (CriFsBinder binder, int contentId, SetMode setMode=SetMode.New) |
Specifies the movie file in the CPK file. (Specify content ID) More... | |
bool | SetFileRange (string filePath, System.UInt64 offset, System.Int64 range, SetMode setMode=SetMode.New) |
Specifies the movie file in the pack file. (File range specified) More... | |
void | Loop (bool sw) |
Switching on/off the movie playback loop. More... | |
void | SetAudioBaseConcatenation (bool enabled) |
Set the flag for the audio-based adjustment of the starting time when using concatenated playback. More... | |
void | SetMasterTimerType (TimerType timerType) |
Sets the master timer type. More... | |
void | SetSeekPosition (int frameNumber) |
Sets the seek position. More... | |
void | SetMovieEventSyncMode (MovieEventSyncMode mode) |
Sets the sync mode for movie events (Cue points, subtitles). More... | |
void | SetSpeed (float speed) |
Adjusts the movie playback speed. More... | |
void | SetMaxPictureDataSize (System.UInt32 maxDataSize) |
Specifies the maximum picture data size More... | |
void | SetBufferingTime (float sec) |
Specify the buffering time for the input data. More... | |
void | SetMinBufferSize (int min_buffer_size) |
Specify the minimum buffer size. More... | |
void | SetAudioTrack (int track) |
Sets the Main Audio Track number. More... | |
void | SetSubAudioTrack (int track) |
Sets the sub audio track number. More... | |
void | SetExtraAudioTrack (int track) |
Sets the extra audio track number. More... | |
void | SetVolume (float volume) |
Adjusts the sound volume for movie playback. (Main Audio Track) More... | |
float | GetVolume () |
Gets the volume of the movie playback. (Main audio track) More... | |
void | SetSubAudioVolume (float volume) |
Adjusts the sound volume for movie playback. (sub audio) More... | |
float | GetSubAudioVolume () |
Gets the volume of the movie playback. (Sub-audio track) More... | |
void | SetExtraAudioVolume (float volume) |
Adjusts the sound volume for movie playback. (extra audio) More... | |
float | GetExtraAudioVolume () |
Gets the volume of the movie playback. (Extra audio track) More... | |
void | SetBusSendLevel (string bus_name, float level) |
Adjusts the Bus Send Level of the Main Audio Track. More... | |
void | SetSubAudioBusSendLevel (string bus_name, float volume) |
Adjusts the Bus Send Level of the sub audio track. More... | |
void | SetExtraAudioBusSendLevel (string bus_name, float volume) |
Adjusts the Bus Send Level of the extra audio track. More... | |
void | SetSubtitleChannel (int channel) |
Sets the subtitle channel. More... | |
void | SetShaderDispatchCallback (ShaderDispatchCallback shaderDispatchCallback) |
Sets the shader selection delegate. More... | |
long | GetTime () |
Gets the playback time. More... | |
int | GetDisplayedFrameNo () |
Gets the frame number being displayed. More... | |
bool | HasRenderedNewFrame () |
Checks whether a new frame was rendered. More... | |
void | SetAsrRackId (int asrRackId) |
Configures the ASR Rack. More... | |
void | SetTimeStretchQuality (float quality) |
Adjust the quality of the audio time-stretch. More... | |
void | UpdateWithUserTime (ulong timeCount, ulong timeUnit) |
Updates the status by specifying the user time. More... | |
void | SetManualTimerUnit (ulong timeUnitN, ulong timeUnitD) |
Sets the unit by which the time of the manual timer advances. More... | |
void | UpdateWithManualTimeAdvanced () |
Updates while advancing the time of the manual timer. More... | |
void | Update () |
Updates the status. More... | |
void | SyncMasterTimer () |
Synchronize the time to the master timer. More... | |
bool | UpdateMaterial (UnityEngine.Material material) |
Sets up the Material to display the current frame. More... | |
void | PauseOnApplicationPause (bool sw) |
Assign pause status based on the changes in the application status. More... | |
Public Attributes | |
CuePointCallback | cuePointCallback |
A Cue point callback delegate. More... | |
StatusChangeCallback | statusChangeCallback |
A delegate for the callback when the player status changes. More... | |
Properties | |
bool | additiveMode [get, set] |
Sets the blend mode to additive composition mode. More... | |
int | maxFrameDrop [get, set] |
Sets the maximum number of frame drops. More... | |
bool | applyTargetAlpha [get, set] |
Sets whether to apply the object transparency. More... | |
bool | uiRenderMode [get, set] |
Specifies whether shader settings for UI components are applied. More... | |
bool | isFrameAvailable [get] |
Whether a valid frame is held More... | |
MovieInfo | movieInfo [get] |
Gets the information on the movie being played. More... | |
FrameInfo | frameInfo [get] |
Gets the frame information of the movie being played. More... | |
Status | status [get] |
Gets the player status. More... | |
Status | nativeStatus [get] |
Gets the status of the internal handle. More... | |
System.Int32 | numberOfEntries [get] |
Gets the number of seamless playback entries. More... | |
System.IntPtr | subtitleBuffer [get] |
Gets the pointer to the subtitle data buffer. More... | |
int | subtitleSize [get] |
Gets the size of the subtitle data buffer. More... | |
CriAtomExPlayer | atomExPlayer [get] |
Gets the CriAtomExPlayer handle. More... | |
CriAtomExPlayer | subAtomExPlayer [get] |
Get the CriAtomExPlayer handle (sub audio track) More... | |
CriAtomExPlayer | extraAtomExPlayer [get] |
Get the CriAtomExPlayer handle (extra track) More... | |
CriManaMoviePlayerHolder | playerHolder [get, set] |
Object to hold the player. More... | |
Events | |
SubtitleChangeCallback | OnSubtitleChanged |
Callback function for subtitle information update More... | |
A wrapper class for native player that controls the movie playback.
|
strong |
A value indicating the player status.
|
strong |
|
strong |
Synchronization mode for movie events (Cue points, subtitles).
Enumerator | |
---|---|
FrameTime |
Synchronizes to the frame time |
PlayBackTime |
Synchronizes to the playback time based on the timer type |
|
strong |
|
strong |
Timer type.
Enumerator | |
---|---|
None |
No time synchronization |
System |
System time |
Audio |
Audio time of the Main Audio Track |
User |
User-specific timer |
Manual |
Manual timer |
delegate void CuePointCallback | ( | ref EventPoint | eventPoint | ) |
A Cue point callback delegate type.
eventPoint | Event point information |
delegate void StatusChangeCallback | ( | Status | status | ) |
A delegate type for the callback when the player status changes.
status | Player state after change |
delegate void SubtitleChangeCallback | ( | IntPtr | subtitleBuffer | ) |
Delegate type of subtitle information update callback
subtitleBuffer | Pointer to the subtitle string |
delegate UnityEngine.Shader ShaderDispatchCallback | ( | MovieInfo | movieInfo, |
bool | additiveMode | ||
) |
A shader selection delegate type.
movieInfo | Movie information |
additiveMode | Whether to do additive composition |
|
inline |
Discards the player object
|
inline |
Generates the resources required for movie rendering.
width | Movie width |
height | Movie height |
alpha | Whether it is an alpha movie |
|
inline |
Discards the resources required for rendering movie.
|
inline |
Prepares for playback.
|
inline |
Prepares for playback.
|
inline |
Start playback.
|
inline |
Requests to stop movie playback.
|
inline |
Requests to stop movie playback.
|
inline |
Pauses/unpauses the movie playback.
sw | Pause switch (true: pause, false: resume) |
|
inline |
Gets the pausing status of the movie playback.
|
inline |
Sets the file path of the streaming playback.
binder | Binder with CPK file bound |
moviePath | Content path in a CPK file |
setMode | Movie addition mode |
|
inline |
Sets the data for memory playback.
data | Movie data on the memory |
dataSize | Data size |
setMode | Movie addition mode |
|
inline |
|
inline |
Specifies the movie file in the CPK file. (Specify content ID)
binder | Binder with CPK file bound |
contentId | Content ID in the CPK file |
setMode | Movie addition mode |
|
inline |
Specifies the movie file in the pack file. (File range specified)
filePath | Path to the pack file |
offset | Data start position of movie file in the pack file |
range | Data range of the movie file in pack file |
setMode | Movie addition mode |
|
inline |
Switching on/off the movie playback loop.
sw | Loop switch (True: loop mode, False: non-loop mode) |
|
inline |
Set the flag for the audio-based adjustment of the starting time when using concatenated playback.
enabled | Enable flag |
|
inline |
Sets the master timer type.
timerType | Master timer type |
|
inline |
Sets the seek position.
frameNumber | Seek frame number |
|
inline |
Sets the sync mode for movie events (Cue points, subtitles).
mode | Movie event synchronization mode |
|
inline |
Adjusts the movie playback speed.
speed | Playback speed |
|
inline |
Specifies the maximum picture data size
maxDataSize | Maximum picture data size |
|
inline |
Specify the buffering time for the input data.
sec | Buffering time [sec] |
|
inline |
Specify the minimum buffer size.
min_buffer_size | Minimum buffer size [byte] |
|
inline |
Sets the Main Audio Track number.
track | Track number |
|
inline |
Sets the sub audio track number.
track | Track number |
|
inline |
Sets the extra audio track number.
track | Track number |
|
inline |
Adjusts the sound volume for movie playback. (Main Audio Track)
volume | Volume |
|
inline |
Gets the volume of the movie playback. (Main audio track)
|
inline |
Adjusts the sound volume for movie playback. (sub audio)
volume | Volume |
|
inline |
Gets the volume of the movie playback. (Sub-audio track)
|
inline |
Adjusts the sound volume for movie playback. (extra audio)
volume | Volume |
|
inline |
Gets the volume of the movie playback. (Extra audio track)
|
inline |
Adjusts the Bus Send Level of the Main Audio Track.
bus_name | Bus name |
level | Bus Send Level |
|
inline |
Adjusts the Bus Send Level of the sub audio track.
bus_name | Bus name |
volume | Bus Send Level |
|
inline |
Adjusts the Bus Send Level of the extra audio track.
bus_name | Bus name |
volume | Bus Send Level |
|
inline |
Sets the subtitle channel.
channel | Subtitle channel number |
|
inline |
Sets the shader selection delegate.
shaderDispatchCallback | Shader selection delegate |
|
inline |
Gets the playback time.
|
inline |
Gets the frame number being displayed.
|
inline |
Checks whether a new frame was rendered.
|
inline |
Configures the ASR Rack.
asrRackId | ASR Rack ID |
|
inline |
Adjust the quality of the audio time-stretch.
quality | Quality |
|
inline |
Updates the status by specifying the user time.
|
inline |
Sets the unit by which the time of the manual timer advances.
timeUnitN | Numerator of the unit in which time progresses |
timeUnitD | Denominator of the unit in which time progresses |
|
inline |
Updates while advancing the time of the manual timer.
|
inline |
Updates the status.
|
inline |
Synchronize the time to the master timer.
|
inline |
Sets up the Material to display the current frame.
material | Material to be set |
|
inline |
Assign pause status based on the changes in the application status.
sw | Pause switch (true: pause, false: resume) |
CuePointCallback cuePointCallback |
A Cue point callback delegate.
StatusChangeCallback statusChangeCallback |
A delegate for the callback when the player status changes.
|
getset |
Sets the blend mode to additive composition mode.
|
getset |
Sets the maximum number of frame drops.
|
getset |
Sets whether to apply the object transparency.
|
getset |
Specifies whether shader settings for UI components are applied.
|
get |
Whether a valid frame is held
|
get |
Gets the information on the movie being played.
movieInfo | Movie information |
|
get |
Gets the frame information of the movie being played.
frameInfo | Frame information |
|
get |
Gets the player status.
|
get |
Gets the status of the internal handle.
|
get |
Gets the number of seamless playback entries.
|
get |
Gets the pointer to the subtitle data buffer.
|
get |
Gets the size of the subtitle data buffer.
|
get |
Gets the CriAtomExPlayer handle.
|
get |
Get the CriAtomExPlayer handle (sub audio track)
|
get |
Get the CriAtomExPlayer handle (extra track)
|
getset |
Object to hold the player.
SubtitleChangeCallback OnSubtitleChanged |
Callback function for subtitle information update