IMetadataObserver.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. namespace Agora.Rtc
  2. {
  3. ///
  4. /// <summary>
  5. /// The metadata observer.
  6. /// </summary>
  7. ///
  8. public abstract class IMetadataObserver
  9. {
  10. ///
  11. /// <summary>
  12. /// Occurs when the SDK requests the maximum size of the metadata.
  13. /// After successfully complete the registration by calling RegisterMediaMetadataObserver , the SDK triggers this Callback once every video frame is sent. You need to specify the maximum size of the metadata in the return value of this Callback.
  14. /// </summary>
  15. ///
  16. /// <returns>
  17. /// The maximum size of the buffer of the metadata that you want to use. The highest value is 1024 bytes. Ensure that you set the return value.
  18. /// </returns>
  19. ///
  20. public virtual int GetMaxMetadataSize()
  21. {
  22. return 0;
  23. }
  24. ///
  25. /// <summary>
  26. /// Occurs when the SDK is ready to send metadata.
  27. /// This Callback is triggered when the SDK is ready to send metadata.
  28. /// </summary>
  29. ///
  30. /// <param name="source_type"> Video data type. See VIDEO_SOURCE_TYPE .</param>
  31. ///
  32. /// <param name="metadata"> The metadata the user wants to send. See Metadata .</param>
  33. ///
  34. /// <returns>
  35. /// true: Send it.false: Do not send it.
  36. /// </returns>
  37. ///
  38. public virtual bool OnReadyToSendMetadata(ref Metadata metadata, VIDEO_SOURCE_TYPE source_type)
  39. {
  40. return false;
  41. }
  42. ///
  43. /// <summary>
  44. /// Occurs when the local user receives the metadata.
  45. /// </summary>
  46. ///
  47. /// <param name="metadata"> The metadata received, see Metadata .</param>
  48. ///
  49. public virtual void OnMetadataReceived(Metadata metadata)
  50. {
  51. }
  52. }
  53. }