Skip to content

Commit

Permalink
Show per packet.
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusfriedman committed Nov 18, 2023
1 parent 2f00223 commit a0f41ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions UnitTests/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,7 @@ static void TestServer()
var sources = new List<Rtsp.Server.MediaTypes.RtspSource>();
for(int i = 1; i <= 9; ++i)
{
var source = new Media.Rtsp.Server.MediaTypes.RtspSource($"R2_05{i}", $"rtsp://8.15.251.101:1935/rtplive/R2_05{i}", Rtsp.RtspClient.ClientProtocolType.Tcp, 0);
var source = new Media.Rtsp.Server.MediaTypes.RtspSource($"R2_05{i}", $"rtsp://8.15.251.101:1935/rtplive/R2_05{i}", Rtsp.RtspClient.ClientProtocolType.Tcp, 0, null, null, null, true);
source.RtpClient.ThreadEvents = true;
source.RtpClient.IListSockets = true;
source.RtspClient.DisableKeepAliveRequest = true;
Expand Down Expand Up @@ -2771,8 +2771,12 @@ static void TestServer()
compositeContext.SynchronizationSourceIdentifier = RFC3550.Random32(0);
compositeContext.RemoteSynchronizationSourceIdentifier = 0;

RtpClient.RtpPacketHandler sendPacket = (s, p, tc) => compositeSource.EnquePacket(p);

RtpClient.RtpPacketHandler sendPacket = (s, p, tc) =>
{
var f = new RtpFrame { p };
f.SynchronizationSourceIdentifier = compositeContext.SynchronizationSourceIdentifier;
compositeSource.Frames.Enqueue(f);
};
RtpClient.RtpFrameHandler sendFrame = (s, f, tc, final) =>
{
if (!final) return;
Expand Down

0 comments on commit a0f41ef

Please sign in to comment.