beautypg.com

Acquiring audio data from vn-e4 via http, Basic procedures – JVC 4ch Network Encoder VN-E4 User Manual

Page 10

background image

10

2. Acquiring Audio Data from VN-E4 via HTTP _

2.1. Basic Procedures

1) The client establishes a TCP connection to port number 8009.

2) The client sends out API.

Example

GET /api/audio?assured=1&lowdelay=0 HTTP/1.1

Host: 138.198.34.250

3) VN-E4 returns a response.

Example

HTTP/1.1 200 OK

Connection: Keep-Alive

Content-Type: audio/ulaw

Date: Fri, 13 MAY 2005 07:33:12 GMT

Server: VN-E4 Jpeg & Audio Server/1.0.0

Keep-Alive: timeout=5, max=5

x-vne4_response: assured=0&lowdelay=0

4) VN-E4 sends out audio data after returning the response.

A 512-byte u-Law data with a 12-byte header will be sent out repeatedly. Responses and u-Law data sent out
by VN-E4 are as follows.

Format of the 12-byte header is as follows. The header is made up of 3 4-byte data. The first 4 bytes
(0x00000080) indicate that the payload is an audio data.

5) The client disconnects TCP8009 to end the audio transmission.

New APIs that are sent without disconnecting TCP will not be valid. To change the parameters, disconnect the
current TCP to stop data distribution, followed by sending API upon establishing a new TCP connection.

2.1. Basic Procedures

2. Acq

Responses

header (12-byte)

u-law (512-byte)

header (12-byte)

u-law (512-byte)

0x00000080

No. of bytes of audio data (fixed as 512)

Time stamp (Unit: 8 kHz)