JVC VN-E4U API Guide - Page 10

Acquiring Audio Data from VN-E4 via HTTP, 2.1. Basic Procedures

Page 10 highlights

2. Acquiring Audio Data from VN-E4 via HTTP 2. Acquiring Audio Data from VN-E4 via HTTP _ 2.1. Basic Procedures 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. Responses header (12-byte) u-law (512-byte) header (12-byte) u-law (512-byte) 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. 0x00000080 No. of bytes of audio data (fixed as 512) Time stamp (Unit: 8 kHz) 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. 10

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80

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<CRLF>
Host: 138.198.34.250<CRLF><CRLF>
3) VN-E4 returns a response.
Example
HTTP/1.1 200 OK<CRLF>
Connection: Keep-Alive<CRLF>
Content-Type: audio/ulaw<CRLF>
Date: Fri, 13 MAY 2005 07:33:12 GMT<CRLF>
Server: VN-E4 Jpeg & Audio Server/1.0.0<CRLF>
Keep-Alive: timeout=5, max=5<CRLF>
x-vne4_response: assured=0&lowdelay=0<CRLF><CRLF>
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
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)
2. Acquiring Audio Data from VN-E4 via HTTP