Skip to content

Commit

Permalink
[WebRTC] Add debug log (#6256)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsgwon authored Aug 8, 2024
1 parent 8488756 commit 149fe2f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ private void RegisterBufferStatusChangedCallback()

private void UnregisterBufferStatusChangedCallback()
{
Log.Info(WebRTCLog.Tag, "Enter");

NativeWebRTC.UnsetBufferStateChangedCb(Handle, SourceId).
ThrowIfFailed("Failed to unset buffer status changed callback.");

Log.Info(WebRTCLog.Tag, "Leave");
}
}
}
12 changes: 12 additions & 0 deletions src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ public void Start()
/// <since_tizen> 9 </since_tizen>
public async Task StartAsync()
{
Log.Info(WebRTCLog.Tag, "Enter");

ValidateWebRTCState(WebRTCState.Idle);

var tcs = new TaskCompletionSource<bool>();
Expand Down Expand Up @@ -203,6 +205,8 @@ public async Task StartAsync()
StateChanged -= stateChangedEventHandler;
ErrorOccurred -= errorEventHandler;
}

Log.Info(WebRTCLog.Tag, "Leave");
}

/// <summary>
Expand Down Expand Up @@ -236,6 +240,8 @@ public void Stop()
/// <since_tizen> 9 </since_tizen>
public async Task<string> CreateOfferAsync()
{
Log.Info(WebRTCLog.Tag, "Enter");

ValidateWebRTCState(WebRTCState.Negotiating, WebRTCState.Playing);

var tcsSdpCreated = new TaskCompletionSource<string>();
Expand All @@ -255,6 +261,8 @@ public async Task<string> CreateOfferAsync()
await Task.Yield();
}

Log.Info(WebRTCLog.Tag, "Leave");

return offer;
}

Expand All @@ -271,6 +279,8 @@ public async Task<string> CreateOfferAsync()
/// <since_tizen> 9 </since_tizen>
public async Task<string> CreateAnswerAsync()
{
Log.Info(WebRTCLog.Tag, "Enter");

ValidateWebRTCState(WebRTCState.Negotiating, WebRTCState.Playing);

var tcsSdpCreated = new TaskCompletionSource<string>();
Expand All @@ -290,6 +300,8 @@ public async Task<string> CreateAnswerAsync()
await Task.Yield();
}

Log.Info(WebRTCLog.Tag, "Leave");

return answer;
}

Expand Down

0 comments on commit 149fe2f

Please sign in to comment.