IMediaControl.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. using System;
  2. using UnityEngine;
  3. namespace RenderHeads.Media.AVProVideo
  4. {
  5. public interface IMediaControl
  6. {
  7. bool OpenVideoFromFile(string path, long offset, string httpHeaderJson);
  8. bool OpenVideoFromBuffer(byte[] buffer);
  9. void CloseVideo();
  10. void SetLooping(bool bLooping);
  11. bool IsLooping();
  12. bool HasMetaData();
  13. bool CanPlay();
  14. bool IsPlaying();
  15. bool IsSeeking();
  16. bool IsPaused();
  17. bool IsFinished();
  18. bool IsBuffering();
  19. void Play();
  20. void Pause();
  21. void Stop();
  22. void Rewind();
  23. void Seek(float timeMs);
  24. void SeekFast(float timeMs);
  25. float GetCurrentTimeMs();
  26. float GetPlaybackRate();
  27. void SetPlaybackRate(float rate);
  28. void MuteAudio(bool bMute);
  29. bool IsMuted();
  30. void SetVolume(float volume);
  31. void SetBalance(float balance);
  32. float GetVolume();
  33. float GetBalance();
  34. int GetCurrentAudioTrack();
  35. void SetAudioTrack(int index);
  36. int GetCurrentVideoTrack();
  37. void SetVideoTrack(int index);
  38. float GetBufferingProgress();
  39. int GetBufferedTimeRangeCount();
  40. bool GetBufferedTimeRange(int index, ref float startTimeMs, ref float endTimeMs);
  41. ErrorCode GetLastError();
  42. void SetTextureProperties(FilterMode filterMode = FilterMode.Bilinear, TextureWrapMode wrapMode = TextureWrapMode.Clamp, int anisoLevel = 1);
  43. void GrabAudio(float[] buffer, int floatCount, int channelCount);
  44. int GetNumAudioChannels();
  45. void SetAudioHeadRotation(Quaternion q);
  46. void ResetAudioHeadRotation();
  47. void SetAudioChannelMode(Audio360ChannelMode channelMode);
  48. void SetAudioFocusEnabled(bool enabled);
  49. void SetAudioFocusProperties(float offFocusLevel, float widthDegrees);
  50. void SetAudioFocusRotation(Quaternion q);
  51. void ResetAudioFocus();
  52. bool WaitForNextFrame(Camera dummyCamera, int previousFrameCount);
  53. }
  54. }