Search Results for

    Show / Hide Table of Contents

    Interface IMediaControl

    Namespace: RenderHeads.Media.AVProVideo
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IMediaControl

    Methods

    AddChunkToMediaBuffer(Byte[], UInt64, UInt64)

    Declaration
    bool AddChunkToMediaBuffer(byte[] chunk, ulong offset, ulong length)
    Parameters
    Type Name Description
    System.Byte[] chunk
    System.UInt64 offset
    System.UInt64 length
    Returns
    Type Description
    System.Boolean

    AudioConfigurationChanged(Boolean)

    Declaration
    void AudioConfigurationChanged(bool deviceChanged)
    Parameters
    Type Name Description
    System.Boolean deviceChanged

    CanPlay()

    Declaration
    bool CanPlay()
    Returns
    Type Description
    System.Boolean

    CloseMedia()

    Declaration
    void CloseMedia()

    EndOpenMediaFromBuffer()

    Declaration
    bool EndOpenMediaFromBuffer()
    Returns
    Type Description
    System.Boolean

    GetAudioBufferedSampleCount()

    Declaration
    int GetAudioBufferedSampleCount()
    Returns
    Type Description
    System.Int32

    GetAudioChannelCount()

    Declaration
    int GetAudioChannelCount()
    Returns
    Type Description
    System.Int32

    GetAudioChannelMask()

    Declaration
    AudioChannelMaskFlags GetAudioChannelMask()
    Returns
    Type Description
    AudioChannelMaskFlags

    GetBalance()

    Declaration
    float GetBalance()
    Returns
    Type Description
    System.Single

    GetBufferedTimes()

    Returns a range of time values that contain fully downloaded segments, which can be seeked to immediately without requiring additional downloading

    Declaration
    TimeRanges GetBufferedTimes()
    Returns
    Type Description
    TimeRanges

    GetCurrentTime()

    Returns the current video time in seconds

    Declaration
    double GetCurrentTime()
    Returns
    Type Description
    System.Double

    GetCurrentTimeFrames(Single)

    Returns the current video time in frames, range is [0, GetMaxFrameNumber()] NOTE: For best results the video should be encoded as keyframes only and have no audio track, or an audio track with the same length as the video track

    Declaration
    int GetCurrentTimeFrames(float overrideFrameRate = 0F)
    Parameters
    Type Name Description
    System.Single overrideFrameRate
    Returns
    Type Description
    System.Int32

    GetLastError()

    Declaration
    ErrorCode GetLastError()
    Returns
    Type Description
    ErrorCode

    GetLastExtendedErrorCode()

    Declaration
    long GetLastExtendedErrorCode()
    Returns
    Type Description
    System.Int64

    GetPlaybackRate()

    Declaration
    float GetPlaybackRate()
    Returns
    Type Description
    System.Single

    GetProgramDateTime()

    Returns the current video date and time usually from the EXT-X-PROGRAM-DATE-TIME tag on HLS streams Only supported on macOS, iOS, tvOS and Android (using ExoPlayer API) And Windows 10 using WinRT API

    Declaration
    DateTime GetProgramDateTime()
    Returns
    Type Description
    System.DateTime

    GetSeekableTimes()

    Returns a range of time values that can be seeked in seconds

    Declaration
    TimeRanges GetSeekableTimes()
    Returns
    Type Description
    TimeRanges

    GetTextureProperties(out FilterMode, out TextureWrapMode, out Int32)

    Declaration
    void GetTextureProperties(out FilterMode filterMode, out TextureWrapMode wrapMode, out int anisoLevel)
    Parameters
    Type Name Description
    FilterMode filterMode
    TextureWrapMode wrapMode
    System.Int32 anisoLevel

    GetVolume()

    Declaration
    float GetVolume()
    Returns
    Type Description
    System.Single

    GrabAudio(Single[], Int32, Int32)

    Copies the specified amount of audio into the buffer If the specified amount is not yet available then nothing no samples are copied The number of audio samples grabbed are returned

    Declaration
    int GrabAudio(float[] buffer, int sampleCount, int channelCount)
    Parameters
    Type Name Description
    System.Single[] buffer
    System.Int32 sampleCount
    System.Int32 channelCount
    Returns
    Type Description
    System.Int32

    HasMetaData()

    Declaration
    bool HasMetaData()
    Returns
    Type Description
    System.Boolean

    IsBuffering()

    Declaration
    bool IsBuffering()
    Returns
    Type Description
    System.Boolean

    IsExternalPlaybackActive()

    Check to see if external playback is currently active on the player.

    Declaration
    bool IsExternalPlaybackActive()
    Returns
    Type Description
    System.Boolean

    IsFinished()

    Declaration
    bool IsFinished()
    Returns
    Type Description
    System.Boolean

    IsLooping()

    Declaration
    bool IsLooping()
    Returns
    Type Description
    System.Boolean

    IsMuted()

    Declaration
    bool IsMuted()
    Returns
    Type Description
    System.Boolean

    IsPaused()

    Declaration
    bool IsPaused()
    Returns
    Type Description
    System.Boolean

    IsPlaying()

    Declaration
    bool IsPlaying()
    Returns
    Type Description
    System.Boolean

    IsSeeking()

    Declaration
    bool IsSeeking()
    Returns
    Type Description
    System.Boolean

    MuteAudio(Boolean)

    Declaration
    void MuteAudio(bool bMute)
    Parameters
    Type Name Description
    System.Boolean bMute

    OpenMedia(String, Int64, String, MediaHints, Int32, Boolean)

    Be careful using this method directly. It is best to instead use the OpenMedia() method in the MediaPlayer component as this will set up the events correctly and also perform other checks customHttpHeaders is in the format "key1:value1\r\nkey2:value2\r\n"=

    Declaration
    bool OpenMedia(string path, long offset, string customHttpHeaders, MediaHints mediahints, int forceFileFormat = 0, bool startWithHighestBitrate = false)
    Parameters
    Type Name Description
    System.String path
    System.Int64 offset
    System.String customHttpHeaders
    MediaHints mediahints
    System.Int32 forceFileFormat
    System.Boolean startWithHighestBitrate
    Returns
    Type Description
    System.Boolean

    OpenMediaFromBuffer(Byte[])

    Declaration
    bool OpenMediaFromBuffer(byte[] buffer)
    Parameters
    Type Name Description
    System.Byte[] buffer
    Returns
    Type Description
    System.Boolean

    Pause()

    Declaration
    void Pause()

    Play()

    Declaration
    void Play()

    ResetAudioFocus()

    Declaration
    void ResetAudioFocus()

    ResetAudioHeadRotation()

    Declaration
    void ResetAudioHeadRotation()

    Rewind()

    Declaration
    void Rewind()

    Seek(Double)

    The time in seconds seeked will be to the exact time This can take a long time is the keyframes are far apart Some platforms don't support this and instead seek to the closest keyframe

    Declaration
    void Seek(double time)
    Parameters
    Type Name Description
    System.Double time

    SeekFast(Double)

    The time in seconds seeked will be to the closest keyframe

    Declaration
    void SeekFast(double time)
    Parameters
    Type Name Description
    System.Double time

    SeekToFrame(Int32, Single)

    Seek to a specific frame, range is [0, GetMaxFrameNumber()] NOTE: For best results the video should be encoded as keyframes only and have no audio track, or an audio track with the same length as the video track

    Declaration
    void SeekToFrame(int frame, float overrideFrameRate = 0F)
    Parameters
    Type Name Description
    System.Int32 frame
    System.Single overrideFrameRate

    SeekToFrameRelative(Int32, Single)

    Seek forwards or backwards relative to the current frame NOTE: For best results the video should be encoded as keyframes only and have no audio track, or an audio track with the same length as the video track

    Declaration
    void SeekToFrameRelative(int frameOffset, float overrideFrameRate = 0F)
    Parameters
    Type Name Description
    System.Int32 frameOffset
    System.Single overrideFrameRate

    SeekWithTolerance(Double, Double, Double)

    The time in seconds seeked to will be within the range [time-timeDeltaBefore, time+timeDeltaAfter] for efficiency. Only supported on macOS, iOS and tvOS. Other platforms will automatically pass through to Seek()

    Declaration
    void SeekWithTolerance(double time, double timeDeltaBefore, double timeDeltaAfter)
    Parameters
    Type Name Description
    System.Double time
    System.Double timeDeltaBefore
    System.Double timeDeltaAfter

    SetAllowsExternalPlayback(Boolean)

    Set whether the player is allowed to switch to external playback, e.g. AirPlay.

    Declaration
    void SetAllowsExternalPlayback(bool enable)
    Parameters
    Type Name Description
    System.Boolean enable

    SetAudioChannelMode(Audio360ChannelMode)

    Declaration
    void SetAudioChannelMode(Audio360ChannelMode channelMode)
    Parameters
    Type Name Description
    Audio360ChannelMode channelMode

    SetAudioFocusEnabled(Boolean)

    Declaration
    void SetAudioFocusEnabled(bool enabled)
    Parameters
    Type Name Description
    System.Boolean enabled

    SetAudioFocusProperties(Single, Single)

    Declaration
    void SetAudioFocusProperties(float offFocusLevel, float widthDegrees)
    Parameters
    Type Name Description
    System.Single offFocusLevel
    System.Single widthDegrees

    SetAudioFocusRotation(Quaternion)

    Declaration
    void SetAudioFocusRotation(Quaternion q)
    Parameters
    Type Name Description
    Quaternion q

    SetAudioHeadRotation(Quaternion)

    Declaration
    void SetAudioHeadRotation(Quaternion q)
    Parameters
    Type Name Description
    Quaternion q

    SetBalance(Single)

    Declaration
    void SetBalance(float balance)
    Parameters
    Type Name Description
    System.Single balance

    SetExternalPlaybackVideoGravity(ExternalPlaybackVideoGravity)

    Sets the video gravity of the player for external playback only.

    Declaration
    void SetExternalPlaybackVideoGravity(ExternalPlaybackVideoGravity gravity)
    Parameters
    Type Name Description
    ExternalPlaybackVideoGravity gravity

    SetKeyServerAuthToken(String)

    Declaration
    void SetKeyServerAuthToken(string token)
    Parameters
    Type Name Description
    System.String token

    SetLooping(Boolean)

    Declaration
    void SetLooping(bool bLooping)
    Parameters
    Type Name Description
    System.Boolean bLooping

    SetOverrideDecryptionKey(Byte[])

    Declaration
    void SetOverrideDecryptionKey(byte[] key)
    Parameters
    Type Name Description
    System.Byte[] key

    SetPlaybackRate(Single)

    Declaration
    void SetPlaybackRate(float rate)
    Parameters
    Type Name Description
    System.Single rate

    SetPlayWithoutBuffering(Boolean)

    Declaration
    void SetPlayWithoutBuffering(bool playWithoutBuffering)
    Parameters
    Type Name Description
    System.Boolean playWithoutBuffering

    SetTextureProperties(FilterMode, TextureWrapMode, Int32)

    Declaration
    void SetTextureProperties(FilterMode filterMode = null, TextureWrapMode wrapMode = null, int anisoLevel = 1)
    Parameters
    Type Name Description
    FilterMode filterMode
    TextureWrapMode wrapMode
    System.Int32 anisoLevel

    SetVolume(Single)

    Declaration
    void SetVolume(float volume)
    Parameters
    Type Name Description
    System.Single volume

    StartOpenMediaFromBuffer(UInt64)

    Declaration
    bool StartOpenMediaFromBuffer(ulong length)
    Parameters
    Type Name Description
    System.UInt64 length
    Returns
    Type Description
    System.Boolean

    Stop()

    Declaration
    void Stop()

    WaitForNextFrame(Camera, Int32)

    Declaration
    bool WaitForNextFrame(Camera dummyCamera, int previousFrameCount)
    Parameters
    Type Name Description
    Camera dummyCamera
    System.Int32 previousFrameCount
    Returns
    Type Description
    System.Boolean
    In This Article