import request from '@/config/axios'

export function getDevRecord(deviceId,channelId,query) {
  return request.get({
    url: '/rq/sip/record/devquery/' + deviceId + "/" + channelId,
 
    params: query
  })
}

export function getRecord(channelId,sn) {
  return request.get({
    url: '/sip/record/query/' + channelId + "/" + sn,
   
  })
}

export function getServerRecord(query) {
  return request.get({
    url: '/sip/record/serverRecord/list',
  
    params: query
  })
}

export function getServerRecordByDate(query) {
  return request.get({
    url: '/sip/record/serverRecord/date/list',
 
    params: query
  })
}

export function getServerRecordByStream(query) {
  return request.get({
    url: '/sip/record/serverRecord/stream/list',
   
    params: query
  })
}

export function getServerRecordByApp(query) {
  return request.get({
    url: '/sip/record/serverRecord/app/list',
   
    params: query
  })
}

export function getServerRecordByFile(query) {
  return request.get({
    url: '/sip/record/serverRecord/file/list',
   
    params: query
  })
}

export function getServerRecordByDevice(query) {
  return request.get({
    url: '/sip/record/serverRecord/device/list',
   
    params: query
  })
}

export function startPlayRecord(deviceId, channelId) {
  return request.get({
    url: '/rq/sip/record/play/' + deviceId + "/" + channelId,
   
  })
}

export function startDownloadRecord(deviceId, channelId, query) {
  return request.get({
    url: '/rq/sip/record/download/' + deviceId + "/" + channelId,
 
    params: query
  })
}


export function uploadRecord(query) {
  return request.get({
    url: '/sip/record/upload',
    
    params: query
  })
}
