Comments (10)
The RTSP standard is for video. It does not have fields for Event ID, EndOfEvent, EventDuration etc.
Can you tell us more about what you are trying to do please and the server you are trying to connect to.
from sharprtsp.
actually i will be working for RTSP shortly, as of now trying to detect the DTMF in RTP packet and i saw the dissection in "private void Rtsp_client_DataReceived", we can add functionality to get the Event ID, EndOfEvent, EventDuration etc.... like this might be ...
// the DTMF key pressed or released.
DTMF_Event = DtmfPayload >> 24;
// the "end" bit.
DTMF_E = (DtmfPayload >> 23) & 0x01;
// reserved bit - not used.
DTMF_R = (DtmfPayload >> 22) & 0x01;
// the DTMF power level (volume).
DTMF_Volume = (DtmfPayload >> 16) & 0x3f;
// tone duration.
DTMF_Duration = DtmfPayload & 0xffff;
from sharprtsp.
The 'payload start' tells you where in the RTP packet the DtmfPayload is located.
That should be where the RFC 4733 DTMF data is located and then you can use the shifting and AND functions.
from sharprtsp.
can you tell me what codes need to be added after this to get the ` int rtp_version = (e.Message.Data[0] >> 6);
int rtp_padding = (e.Message.Data[0] >> 5) & 0x01;
int rtp_extension = (e.Message.Data[0] >> 4) & 0x01;
int rtp_csrc_count = (e.Message.Data[0] >> 0) & 0x0F;
int rtp_marker = (e.Message.Data[1] >> 7) & 0x01;
int rtp_payload_type = (e.Message.Data[1] >> 0) & 0x7F;
uint rtp_sequence_number = ((uint)e.Message.Data[2] << 8) + (uint)(e.Message.Data[3]);
uint rtp_timestamp = ((uint)e.Message.Data[4] <<24) + (uint)(e.Message.Data[5] << 16) + (uint)(e.Message.Data[6] << 8) + (uint)(e.Message.Data[7]);
uint rtp_ssrc = ((uint)e.Message.Data[8] << 24) + (uint)(e.Message.Data[9] << 16) + (uint)(e.Message.Data[10] << 8) + (uint)(e.Message.Data[11]);
int rtp_payload_start = 4 // V,P,M,SEQ
+ 4 // time stamp
+ 4 // ssrc
+ (4 * rtp_csrc_count); // zero or more csrcs
uint rtp_extension_id = 0;
uint rtp_extension_size = 0;
if (rtp_extension == 1)
{
rtp_extension_id = ((uint)e.Message.Data[rtp_payload_start + 0] << 8) + (uint)(e.Message.Data[rtp_payload_start + 1] << 0);
rtp_extension_size = ((uint)e.Message.Data[rtp_payload_start + 2] << 8) + (uint)(e.Message.Data[rtp_payload_start + 3] << 0);
rtp_payload_start += 4 + (int)rtp_extension_size; // extension header and extension payload
}`
DTMF event and end of event etc
from sharprtsp.
So
uint DtmfPayload = e.Message.Data[rtp_payload_start];
Then you will use the bitwise operations eg >> and & from your code.
from sharprtsp.
Hey i was not able to get the DTMF event using my code, if you know, how to get it using the bitwise operation, can you provide me the code.
// the payload data is 4 bytes as per RFC 2833 (see section 3.5)
//
// 0 1 2 3
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | event |E|R| volume | duration |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Figure 1: Payload Format for Named Events
//
from sharprtsp.
None of us have written code to process RTP packets containing DTMF data.
So we cannot help.
Could you post a dump of the RTP Packet in Hex and the code do carry out the bitwise operations and I can see if I can spot something.
from sharprtsp.
can you share your mail id? or mail me on [email protected]
I hope that works
from sharprtsp.
Actually the easiest place is to post it here on github. You can attach files to the post too.
from sharprtsp.
thread has gone dormant so closing
from sharprtsp.
Related Issues (20)
- How to replace YUV Image with Web Camera? HOT 1
- RTSPS Support HOT 1
- RTP Metadata Stream HOT 5
- RTSP Server -Send image 720p HOT 4
- Recording Format HOT 1
- Multiplexer, how it actually works?
- Add H265 and MJPEG support HOT 5
- Android Port Conflict (.NET issue)
- Connection Close with bigger frame size and Unity HOT 3
- Simple H264 Encoder doesn't work with hardware decoders? HOT 2
- feed aac raw data to rtspserver HOT 1
- Android camera server HOT 8
- Could not write header for output file #0 (incorrect codec parameters ?): Server returned 400 Bad Request HOT 6
- TestCard MJPG example HOT 1
- AAC RTP packets with multiple AU units per packet HOT 4
- h265payload question HOT 3
- RtspCameraExample issue when client is Hikvision NVR HOT 1
- Artifacts in H.264 video stream HOT 7
- README File: Spelling Mistakes Correction HOT 2
- repo is behind NuGet package HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharprtsp.