JVC VN-E4U API Guide - Page 69
Audio Receiving via HTTP
![]() |
UPC - 046838021015
View all JVC VN-E4U manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 69 highlights
7. API for Audio Receiving by VN-E4 _ 7.1. Audio Receiving via HTTP This section describes APIs for audio receiving by VN-E4. Make use of the APIs explained in this section in the way as mentioned in Section 4. 7.1. Audio Receiving via HTTP 1) The client establishes a TCP connection to port number 80 and sends out API. GET Space Accept Space Host: Space Authorization: Basic API Character String Space HTTP/1.1 0x0D 0x0A text/plain or text/html 0x0D 0x0A IP Address of VN-E4 0x0D 0x0A Space User Name and Password 0x0D 0x0A 0x0D 0x0A 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=tcp_passive&from. session_id=data2&from.ip_translate=on&to=audio Example /api/receive?from=network&from.ip=10.0.0.100&from.protocol=tcp_passive&frmo. 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 Date: Fri, 13 MAY 2005 07:33:12 GMT Server: VN-E4 API Server/1.0.0 Connection: Keep-Alive content-type: text/plain Connection: Keep-Alive Keep-Alive: timeout=5, max=5 x-vne4_response: from=network&from.ip=10.0.0.100&from.protocol=tcp_passive&frmo.session_id =12345678&from.ip_translate=on&to=audio 200 OK The client may disconnect TCP80 at this point of time. 3) The client establishes a TCP connection to port number 49298. 4) The client continues to send 512 bytes of u-Law data with a 12-byte header. The data's header format is as follows. The 12-byte header is made up of 3 4-byte data. 0x00000080 No. of bytes of audio data (fixed as 512) Time stamp (Unit: 8 kHz) 512 bytes of u-Law data 5) To end, disconnect TCP49298. Ⅵ 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. 69
![](/manual_guide/products/jvc-vne4u-api-guide-62db8e7/69.png)