Audio receiving via rtp, Api for audio receiving by vn-e4 – JVC 4ch Network Encoder VN-E4 User Manual

Page 70

Advertising
background image

70

7. API for Audio Receiving by VN-E4 _

7.2. Audio Receiving via RTP

1) The client establishes a TCP connection to port number 80 and sends out API.

Refer to Section 4 on details of the Accept and Authorization lines.

The API format when specifying using GET is as follows.

/api/receive?from=network&from.ip=data1&from.protocol=udp&from.session_id

=data2&from.ip_translate=on&to=audio

Example

/api/receive?from=network&from.ip=10.0.0.100&from.protocol=udp&from.

session_id=12345678&from.ip_translate=on&to=audio

Specify the source IP address for ip=. Specify the client IP number for session_id=. VN-E4 will register this
number and accept the client with the same API (stop). VN-E4 will accept the API at all times when it is
specified as session_id=*.
When from.ip_translate is set to off, VN-E4 will standby to receive audio data from the IP address specified at
from.ip. When from.ip_translate is set to on, VN-E4 will ignore from.ip and standby to receive audio data from
the source IP address of this API.

2) VN-E4 returns a response.

HTTP/1.1 200 OK<CRLF>

Date: Fri, 13 MAY 2005 07:33:12 GMT<CRLF>

Server: VN-E4 API Server/1.0.0<CRLF>

Connection: Keep-Alive<CRLF>

content-type: text/plain<CRLF>

Connection: Keep-Alive<CRLF>

Keep-Alive: timeout=5, max=5<CRLF>

x-vne4_response:

from=network&from.ip=10.0.0.100&from.protocol=udp&from.session_id=1234567

8&from.ip_translate=on&to=audio<CRLF><CRLF>

200 OK<CRLF>

The client may disconnect TCP80 at this point of time.

3) The client continues to send 512 bytes of u-Law data with a 12-byte header to port number 49200.

The data's header format is as follows. The 12-byte RTP header is made up of 3 4-byte data. Refer to RFC1889
for details on the RTP header.

4) To end, send an API for stopping transmissions.

API Format

/api/stop?from.session_id=data

Example

/api/stop?from.session_id=*

Specify session_id= using the number that is specified via the send command. Ensure to stop audio reception
when session_id=* is specified.

Ⅵ Restrictions on Number of Clients

Only 1 client is allowed to send audio data to VN-E4. VN-E4 will return an error for this API and TCP will be
disconnected when this function is currently in use by another client. In addition, VN-E4 will also return an error for this
API and disconnect TCP when there exists a client that makes use of the audio reception feature at VN-E4 via RTP/UDP.

Ⅵ Timing of Data Sending

512 bytes, or in other words, 64 msec of audio data may be sent during each transmission. Send audio data at intervals
as evenly as possible. A part of the data may be lost if audio data exceeding 2 seconds are sent to VN-E4 at one time.

7.2. Audio Receiving via RTP

GET

Space

API Character String

Space

HTTP/1.1

0x0D 0x0A

Accept

Space

text/plain or text/html

0x0D 0x0A

Host:

Space

IP Address of VN-E4

0x0D 0x0A

Authorization: Basic

Space

User Name and Password

0x0D 0x0A 0x0D 0x0A

0x8000

Sequence No.

Time stamp (Unit: 8 kHz)

SSRC

512 bytes of u-Law data

Advertising