|
| 1 | +11. Audio |
| 2 | + |
| 3 | +11.1 Audio MIME type |
| 4 | + |
| 5 | +MIME Description |
| 6 | +Audio/PCM |
| 7 | +Audio/ADPCM |
| 8 | +Audio/G.711A |
| 9 | +Audio/G.711Mu |
| 10 | +Audio/G.726 |
| 11 | +Audio/G.729 |
| 12 | + |
| 13 | + 92 |
| 14 | +Audio/MPEG2 |
| 15 | +Audio/AMR |
| 16 | +Audio/AAC |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +11.2 Post Audio |
| 21 | + |
| 22 | +URL Syntax http://<ip>/cgi-bin/audio.cgi?action=postAudio&<paramName>=<paramValue>[&<paramName>=<paramValue>...] |
| 23 | +Comment paramValue as below table. |
| 24 | +Response OK or ERROR |
| 25 | + |
| 26 | + |
| 27 | +ParamName ParamValue type Description |
| 28 | +httptype string singlepart:HTTP content is a continuous flow of audio |
| 29 | + packets |
| 30 | + multipart:HTTP content type is |
| 31 | + multipart/x-mixed-replace,and each audio packet ends |
| 32 | + with a boundary string |
| 33 | +channel integer The audio channel |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +11.2.1 Example for singlepart |
| 38 | + |
| 39 | +The RUL of transmit a singlepart、channel 1 audio stream(encoded with G.711 A-law) is: |
| 40 | +http: //<ip>/cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1 |
| 41 | + |
| 42 | + |
| 43 | +example: |
| 44 | +POST /cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1 HTTP/1.1 |
| 45 | +Content-Type: Audio/G.711A |
| 46 | +Content-Length:9999999 |
| 47 | + |
| 48 | + |
| 49 | +<Audio data> |
| 50 | +<Audio data> |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +11.2.2 Example for multipart |
| 55 | + |
| 56 | +The RUL of transmit a multipart、channel 1 audio stream(encoded with G.711 A-law) is: |
| 57 | +http: //<ip>/cgi-bin/audio.cgi?action=postAudio&httptype= multipart &channel=1 |
| 58 | + |
| 59 | + |
| 60 | +example: |
| 61 | +POST /cgi-bin/audio.cgi?action=postAudio&httptype= multipart &channel=1 HTTP/1.1 |
| 62 | + Content-Type: multipart/x-mixed-replace; boundary=<boundary> |
| 63 | +--<boundary> |
| 64 | +Content-Type: Audio/G.711A |
| 65 | + |
| 66 | + 93 |
| 67 | +Content-Length: 800 |
| 68 | + |
| 69 | + |
| 70 | +<Audio data> |
| 71 | +--<boundary> |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +11.3 Get Audio |
| 76 | + |
| 77 | +URL Syntax http://<ip>/cgi-bin/audio.cgi?action=getAudio&<paramName>=<paramValue>[&<paramName>=<paramValue>...] |
| 78 | +Comment paramValue as below table. |
| 79 | +Response OK or ERROR |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +ParamName ParamValue type Description |
| 85 | +httptype string singlepart:HTTP content is a continuous flow of audio |
| 86 | + packets |
| 87 | + multipart:HTTP content type is |
| 88 | + multipart/x-mixed-replace,and each audio packet ends |
| 89 | + with a boundary string |
| 90 | +channel integer The audio channel |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +11.3.1 Example for singlepart |
| 96 | + |
| 97 | +The RUL of Request a singlepart、channel 1 audio stream(encoded with G.711 A-law) is: |
| 98 | +http: //<ip>/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=1 |
| 99 | + |
| 100 | + |
| 101 | +If the request was successful, the server returns a continuous flow of audio packets.The content type is only set at the beginning of the |
| 102 | +connection. |
| 103 | +Return: |
| 104 | +HTTP Code: 200 OK |
| 105 | +Content-Type: Audio/G.711A |
| 106 | +Body: |
| 107 | +<Audio data> |
| 108 | +<Audio data> |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | +11.3.2 Example for multipart |
| 113 | + |
| 114 | +The RUL of Request a multipart、channel 1 audio stream(encoded with G.711 A-law) is: |
| 115 | +http: //<ip>/cgi-bin/audio.cgi?action=getAudio&httptype=multipart&channel=1 |
| 116 | + |
| 117 | + |
| 118 | +If the request was successful, the server returns a continuous flow of audio packets. The content type is “multipart/x-mixed-replace” and each |
| 119 | +audio packet ends with a boundary string. |
| 120 | + 94 |
| 121 | +Return: |
| 122 | +HTTP Code: 200 OK |
| 123 | +Content-Type: multipart/x-mixed-replace; boundary=<boundary> |
| 124 | +--<boundary> |
| 125 | +Content-Type: Audio/G.711A |
| 126 | +Content-Length: 800 |
| 127 | + |
| 128 | + |
| 129 | +<Audio data> |
| 130 | +--<boundary> |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | +11.4 Audio Input |
| 136 | + |
| 137 | +11.4.1 getCollect |
| 138 | + |
| 139 | +URL Syntax http://<ip>/cgi-bin/devAudioInput.cgi?action=getCollect |
| 140 | +Comment Get Audio input channel number. |
| 141 | + Below response means there are 2 audio input channels. |
| 142 | +Response result=2 |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | +11.5 Audio Output |
| 148 | + |
| 149 | +11.5.1 getCollect |
| 150 | + |
| 151 | +URL Syntax http://<ip>/cgi-bin/devAudioOutput.cgi?action=getCollect |
| 152 | +Comment Get Audio output channel number. |
| 153 | + Below response means there are 2 audio output channels. |
| 154 | +Response result=2 |
0 commit comments