video.go 750 B

1234567891011121314151617181920212223242526
  1. package dao
  2. import (
  3. "context"
  4. "time"
  5. "go-common/app/service/video/stream-mng/api/v1"
  6. "go-common/library/log"
  7. )
  8. //视频云接口调用
  9. //GetPicsByRoomId 根据房间id获取当前关键帧
  10. func (d *Dao) GetPicsByRoomId(c context.Context, roomId int64, startTime time.Time, endTime time.Time) (resp []string, err error) {
  11. reply, err := d.VideoApi.GetSingleScreeShot(c, &v1.GetSingleScreeShotReq{RoomId: roomId, StartTime: startTime.Format("2006-01-02 15:04:05"), EndTime: endTime.Format("2006-01-02 15:04:05")})
  12. if err != nil {
  13. log.Error("getPicsByRoomId_GetSingleScreeShot_error:reply:%v;err=%v", reply, err)
  14. return
  15. }
  16. if reply == nil {
  17. log.Error("getPicsByRoomId_GetSingleScreeShot_error")
  18. return
  19. }
  20. resp = reply.List
  21. return
  22. }