Skip to content

Commit

Permalink
ONNXINFER:Revise codes - Revise onnxinfer interface add getInfo() for…
Browse files Browse the repository at this point in the history
… debug

ONNXINFER:Revise codes - Revise onnxinfer interface add getInfo() for debug
  • Loading branch information
Shaoguang Mao authored and cp5555 committed Apr 28, 2020
1 parent 790dba2 commit 4d54475
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
5 changes: 4 additions & 1 deletion modules/remote_bitrate_estimator/remote_estimator_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ void RemoteEstimatorProxy::IncomingPacket(int64_t arrival_time_ms,
//--- ONNXInfer: Input the per-packet info to ONNXInfer module ---
uint32_t send_time_ms =
GetTtimeFromAbsSendtime(header.extension.absoluteSendTime);

// lossCound and RTT field for onnxinfer::OnReceived() are set to -1 since
// no available lossCound and RTT in webrtc
onnxinfer::OnReceived(onnx_infer_, header.payloadType, header.sequenceNumber,
send_time_ms, header.ssrc, header.paddingLength,
header.headerLength, arrival_time_ms, payload_size, 0);
header.headerLength, arrival_time_ms, payload_size, -1, -1);

//--- BandWidthControl: Send back bandwidth estimation into to sender ---
bool time_to_send_bew_message = TimeToSendBweMessage();
Expand Down
Binary file modified modules/third_party/onnxinfer/bin/ONNXInferCore.dll
Binary file not shown.
Binary file modified modules/third_party/onnxinfer/bin/onnxinfer.dll
Binary file not shown.
27 changes: 16 additions & 11 deletions modules/third_party/onnxinfer/include/ONNXInferInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,23 @@ extern "C" {

ONNXInferInterface_DLL_EXPORT_IMPORT_
void OnReceived(
void* onnx_infer_interface,
unsigned char payloadType,
unsigned short sequenceNumber,
unsigned int sendTimestamp,
unsigned int ssrc,
unsigned long paddingLength,
unsigned long headerLength,
unsigned long long arrivalTimeMs,
unsigned long payloadSize,
float lossRate);
void* onnx_infer_interface,
unsigned char payloadType,
unsigned short sequenceNumber,
unsigned int sendTimestamp, // ms
unsigned int ssrc,
unsigned long paddingLength,
unsigned long headerLength,
unsigned long long arrivalTimestamp, // ms
unsigned long payloadSize, // bytes
int lossCount, // packet, -1 indicates no valid lossCount from RTC
float rtt); // sec, -1 indicates no valid rtt from RTC

ONNXInferInterface_DLL_EXPORT_IMPORT_
float GetBweEstimate(void* onnx_infer_interface); // bps

ONNXInferInterface_DLL_EXPORT_IMPORT_
float GetBweEstimate(void* onnx_infer_interface);
const char* GetInfo(void* onnx_infer_interface);

ONNXInferInterface_DLL_EXPORT_IMPORT_
bool IsReady(void* onnx_infer_interface);
Expand Down
Binary file modified modules/third_party/onnxinfer/lib/onnxinfer.lib
Binary file not shown.

0 comments on commit 4d54475

Please sign in to comment.