Remove the useless dummy state parameter to WebRtcG711_*
R=henrik.lundin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/27029004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7609 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -12,16 +12,12 @@
|
||||
#include "g711_interface.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
int16_t WebRtcG711_EncodeA(void* state,
|
||||
int16_t* speechIn,
|
||||
int16_t WebRtcG711_EncodeA(int16_t* speechIn,
|
||||
int16_t len,
|
||||
int16_t* encoded) {
|
||||
int n;
|
||||
uint16_t tempVal, tempVal2;
|
||||
|
||||
// Set and discard to avoid getting warnings
|
||||
(void)(state = NULL);
|
||||
|
||||
// Sanity check of input length
|
||||
if (len < 0) {
|
||||
return (-1);
|
||||
@ -50,16 +46,12 @@ int16_t WebRtcG711_EncodeA(void* state,
|
||||
return (len);
|
||||
}
|
||||
|
||||
int16_t WebRtcG711_EncodeU(void* state,
|
||||
int16_t* speechIn,
|
||||
int16_t WebRtcG711_EncodeU(int16_t* speechIn,
|
||||
int16_t len,
|
||||
int16_t* encoded) {
|
||||
int n;
|
||||
uint16_t tempVal;
|
||||
|
||||
// Set and discard to avoid getting warnings
|
||||
(void)(state = NULL);
|
||||
|
||||
// Sanity check of input length
|
||||
if (len < 0) {
|
||||
return (-1);
|
||||
@ -86,17 +78,13 @@ int16_t WebRtcG711_EncodeU(void* state,
|
||||
return (len);
|
||||
}
|
||||
|
||||
int16_t WebRtcG711_DecodeA(void* state,
|
||||
int16_t* encoded,
|
||||
int16_t WebRtcG711_DecodeA(int16_t* encoded,
|
||||
int16_t len,
|
||||
int16_t* decoded,
|
||||
int16_t* speechType) {
|
||||
int n;
|
||||
uint16_t tempVal;
|
||||
|
||||
// Set and discard to avoid getting warnings
|
||||
(void)(state = NULL);
|
||||
|
||||
// Sanity check of input length
|
||||
if (len < 0) {
|
||||
return (-1);
|
||||
@ -123,17 +111,13 @@ int16_t WebRtcG711_DecodeA(void* state,
|
||||
return (len);
|
||||
}
|
||||
|
||||
int16_t WebRtcG711_DecodeU(void* state,
|
||||
int16_t* encoded,
|
||||
int16_t WebRtcG711_DecodeU(int16_t* encoded,
|
||||
int16_t len,
|
||||
int16_t* decoded,
|
||||
int16_t* speechType) {
|
||||
int n;
|
||||
uint16_t tempVal;
|
||||
|
||||
// Set and discard to avoid getting warnings
|
||||
(void)(state = NULL);
|
||||
|
||||
// Sanity check of input length
|
||||
if (len < 0) {
|
||||
return (-1);
|
||||
@ -160,10 +144,8 @@ int16_t WebRtcG711_DecodeU(void* state,
|
||||
return (len);
|
||||
}
|
||||
|
||||
int WebRtcG711_DurationEst(void* state,
|
||||
const uint8_t* payload,
|
||||
int WebRtcG711_DurationEst(const uint8_t* payload,
|
||||
int payload_length_bytes) {
|
||||
(void) state;
|
||||
(void) payload;
|
||||
/* G.711 is one byte per sample, so we can just return the number of bytes. */
|
||||
return payload_length_bytes;
|
||||
|
||||
Reference in New Issue
Block a user