Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/KSAH-42/RabbitOM
Browse files Browse the repository at this point in the history
  • Loading branch information
KSAH-42 committed Mar 16, 2024
2 parents 0db85e8 + 4d77358 commit 0095cbe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ A .net library for receiving raw audio/video streams using [RTSP](https://www.rf
* Handle large streams with a high bitrate like 50 MBits/seconds
* Force the creation of ports used for receiving packets in case if the ports are temporaly used by some others applications

➡️ The current implementation used the .net Framework 4.8 and not .net core

➡️ The full rtp layer (rtp payload parsers, etc...) which already exists and not present in this repository. A new implementation is actually in progress.

➡️ The Classes used for decoding was already implemented but here, in this repository, new implementation is in progress.
Expand Down Expand Up @@ -49,8 +51,8 @@ using ( var client = new RTSPClient() )
if ( interleavedPacket != null && interleavedPacket.Channel > 0 )
return;

if ( RTPPacket.TryParse( e.Packet.Data , out RtpPacket packet ) )
Console.WriteLine( "DataReceived {0}" , packet.Data.Count );
if ( RTPPacket.TryParse( e.Packet.Data , out RTPPacket packet ) )
Console.WriteLine( "DataReceived {0}" , packet.Payload.Length );
};

client.Configuration.Uri = Constants.LocalServer;
Expand Down Expand Up @@ -142,7 +144,7 @@ You will be able to decorate each request by adding customs headers, because som

# About Session Description Protocol layer

The actual [SDP](https://www.rfc-editor.org/rfc/rfc4566) implementation is strong.
That an exemple of how to use this .net implementation of [SDP](https://www.rfc-editor.org/rfc/rfc4566), please not that is implementation provide custom validation classes which are not explain in this example.

~~~~C#

Expand Down
8 changes: 7 additions & 1 deletion RabbitOM.Net.Rtp/H264/H264NalUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ public static bool TryParse( byte[] buffer , out H264NalUnit result )
{
return false;
}

// this statement can be remove, because the payload rtp for nalunit must not include start code prefix
// It's unnecessary normally...
// According to some sources, it seems that start code are not necessary, from my previous implementation
// i not agree with that thing
// so don't FORGET to add some tests , and even if it's true add a slice detector class to be sure

var prefix = StartPrefix.StartsWith( buffer , StartPrefix.StartPrefixS4 ) ? StartPrefix.StartPrefixS4
: StartPrefix.StartsWith( buffer , StartPrefix.StartPrefixS3 ) ? StartPrefix.StartPrefixS3
Expand Down Expand Up @@ -152,4 +158,4 @@ public static bool TryParse( byte[] buffer , out H264NalUnit result )
return true;
}
}
}
}

0 comments on commit 0095cbe

Please sign in to comment.