LiveVideoPusherCreator.cs 1.2 KB

1234567891011121314151617181920212223242526
  1. using System;
  2. using Vinno.vCloud.FIS.CrossPlatform.Common.Enum;
  3. using Vinno.vCloud.FIS.CrossPlatform.Common.LiveVideo.Interface;
  4. using Vinno.vCloud.FIS.CrossPlatform.Windows.LiveVideo.RTC;
  5. using Vinno.vCloud.FIS.CrossPlatform.Windows.LiveVideo.RTMP;
  6. namespace Vinno.vCloud.FIS.CrossPlatform.Windows.LiveVideo
  7. {
  8. internal class LiveVideoPusherCreator : ILiveVideoPusherCreator
  9. {
  10. public ILiveVideoPusher CreateRtcPusher(uint roomId, string terminalId, string userSign, EnumResolutionMode mode, EnumPushDataSourceType pushDataSourceType, int screenWidth, int screenHeight, Action<EnumLiveStates> updateLiveState)
  11. {
  12. return new RtcPusher(roomId, terminalId, userSign, screenWidth, screenHeight, mode, pushDataSourceType, updateLiveState);
  13. }
  14. /// <summary>
  15. /// Create rtmp pusher.
  16. /// </summary>
  17. /// <param name="updateState">The action to update live state.</param>
  18. /// <returns></returns>
  19. public ILiveVideoPusher CreateRtmpPusher(string terminalId, int screenWidth, int screenHeight, Action<EnumLiveStates> updateState)
  20. {
  21. return new RtmpPusher(terminalId, screenWidth, screenHeight, updateState);
  22. }
  23. }
  24. }