IAudioEncodedFrameObserver.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System;
  2. namespace Agora.Rtc
  3. {
  4. ///
  5. /// <summary>
  6. /// The encoded audio observer.
  7. /// </summary>
  8. ///
  9. public abstract class IAudioEncodedFrameObserver
  10. {
  11. ///
  12. /// <summary>
  13. /// Gets the encoded audio data of the local user.
  14. /// After calling RegisterAudioEncodedFrameObserver and setting the encoded audio as AUDIO_ENCODED_FRAME_OBSERVER_POSITION_RECORD, you can get the encoded audio data of the local user from this callback.
  15. /// </summary>
  16. ///
  17. /// <param name="frameBufferPtr"> The audio buffer.</param>
  18. ///
  19. /// <param name="length"> The data length (byte).</param>
  20. ///
  21. /// <param name="audioEncodedFrameInfo"> Audio information after encoding. See EncodedAudioFrameInfo .</param>
  22. ///
  23. public virtual void OnRecordAudioEncodedFrame(IntPtr frameBufferPtr, int length,
  24. EncodedAudioFrameInfo audioEncodedFrameInfo)
  25. {
  26. }
  27. ///
  28. /// <summary>
  29. /// Gets the encoded audio data of all remote users.
  30. /// After calling RegisterAudioEncodedFrameObserver and setting the encoded audio as AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK, you can get encoded audio data of all remote users through this callback.
  31. /// </summary>
  32. ///
  33. /// <param name="frameBufferPtr"> The audio buffer.</param>
  34. ///
  35. /// <param name="length"> The data length (byte).</param>
  36. ///
  37. /// <param name="audioEncodedFrameInfo"> Audio information after encoding. See EncodedAudioFrameInfo .</param>
  38. ///
  39. public virtual void OnPlaybackAudioEncodedFrame(IntPtr frameBufferPtr, int length,
  40. EncodedAudioFrameInfo audioEncodedFrameInfo)
  41. {
  42. }
  43. ///
  44. /// <summary>
  45. /// Gets the mixed and encoded audio data of the local and all remote users.
  46. /// After calling RegisterAudioEncodedFrameObserver and setting the audio profile as AUDIO_ENCODED_FRAME_OBSERVER_POSITION_MIXED, you can get the mixed and encoded audio data of the local and all remote users through this callback.
  47. /// </summary>
  48. ///
  49. /// <param name="frameBufferPtr"> The audio buffer.</param>
  50. ///
  51. /// <param name="length"> The data length (byte).</param>
  52. ///
  53. /// <param name="audioEncodedFrameInfo"> Audio information after encoding. See EncodedAudioFrameInfo .</param>
  54. ///
  55. public virtual void OnMixedAudioEncodedFrame(IntPtr frameBufferPtr, int length,
  56. EncodedAudioFrameInfo audioEncodedFrameInfo)
  57. {
  58. }
  59. };
  60. }