Raise MSRP success report
This commit is contained in:
parent
5bef56ad5e
commit
522506121d
|
@ -26,49 +26,49 @@
|
|||
|
||||
/* ======================== MsrpMessage ========================*/
|
||||
MsrpMessage::MsrpMessage()
|
||||
:message(tsk_null)
|
||||
:m_pMessage(tsk_null)
|
||||
{
|
||||
}
|
||||
|
||||
MsrpMessage::MsrpMessage(tmsrp_message_t *_message)
|
||||
{
|
||||
this->message = (tmsrp_message_t *)tsk_object_ref(_message);
|
||||
m_pMessage = (tmsrp_message_t *)tsk_object_ref(_message);
|
||||
}
|
||||
|
||||
MsrpMessage::~MsrpMessage()
|
||||
{
|
||||
TSK_OBJECT_SAFE_FREE(this->message);
|
||||
TSK_OBJECT_SAFE_FREE(m_pMessage);
|
||||
}
|
||||
|
||||
bool MsrpMessage::isRequest()
|
||||
{
|
||||
return (this->message->type == tmsrp_request);
|
||||
return (m_pMessage->type == tmsrp_request);
|
||||
}
|
||||
|
||||
short MsrpMessage::getCode()
|
||||
{
|
||||
return TMSRP_RESPONSE_CODE(this->message);
|
||||
return TMSRP_RESPONSE_CODE(m_pMessage);
|
||||
}
|
||||
|
||||
const char* MsrpMessage::getPhrase()
|
||||
{
|
||||
return TMSRP_RESPONSE_PHRASE(this->message);
|
||||
return TMSRP_RESPONSE_PHRASE(m_pMessage);
|
||||
}
|
||||
|
||||
tmsrp_request_type_t MsrpMessage::getRequestType()
|
||||
{
|
||||
if(TMSRP_MESSAGE_IS_REQUEST(this->message)){
|
||||
return this->message->line.request.type;
|
||||
if(TMSRP_MESSAGE_IS_REQUEST(m_pMessage)){
|
||||
return m_pMessage->line.request.type;
|
||||
}
|
||||
return tmsrp_NONE;
|
||||
}
|
||||
|
||||
void MsrpMessage::getByteRange(int64_t* start, int64_t* end, int64_t* total)
|
||||
{
|
||||
if(this->message->ByteRange){
|
||||
*start = this->message->ByteRange->start;
|
||||
*end = this->message->ByteRange->end;
|
||||
*total = this->message->ByteRange->total;
|
||||
if(m_pMessage->ByteRange){
|
||||
*start = m_pMessage->ByteRange->start;
|
||||
*end = m_pMessage->ByteRange->end;
|
||||
*total = m_pMessage->ByteRange->total;
|
||||
}
|
||||
else{
|
||||
*start = *end = *total = -1;
|
||||
|
@ -77,12 +77,22 @@ void MsrpMessage::getByteRange(int64_t* start, int64_t* end, int64_t* total)
|
|||
|
||||
bool MsrpMessage::isLastChunck()
|
||||
{
|
||||
if(TMSRP_MESSAGE_IS_REQUEST(this->message)){
|
||||
return (this->message->end_line.cflag == '$');
|
||||
if(TMSRP_MESSAGE_IS_REQUEST(m_pMessage)){
|
||||
return (m_pMessage->end_line.cflag == '$');
|
||||
}
|
||||
else{
|
||||
if(this->message->ByteRange){
|
||||
return (this->message->ByteRange->end >= this->message->ByteRange->total);
|
||||
if(m_pMessage->ByteRange){
|
||||
return (m_pMessage->ByteRange->end >= m_pMessage->ByteRange->total);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MsrpMessage::isSuccessReport()
|
||||
{
|
||||
if(TMSRP_REQUEST_IS_REPORT(m_pMessage)){
|
||||
if(m_pMessage->Status){
|
||||
return m_pMessage->Status->code >= 200 && m_pMessage->Status->code <= 299;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -90,7 +100,7 @@ bool MsrpMessage::isLastChunck()
|
|||
|
||||
bool MsrpMessage::isFirstChunck()
|
||||
{
|
||||
return (this->message && this->message->ByteRange->start == 1);
|
||||
return (m_pMessage && m_pMessage->ByteRange->start == 1);
|
||||
}
|
||||
|
||||
char* MsrpMessage::getMsrpHeaderValue(const char* name)
|
||||
|
@ -109,11 +119,11 @@ char* MsrpMessage::getMsrpHeaderParamValue(const char* name, const char* param)
|
|||
|
||||
unsigned MsrpMessage::getMsrpContentLength()
|
||||
{
|
||||
if(this->message &&
|
||||
this->message->Content &&
|
||||
this->message->Content->data &&
|
||||
this->message->Content->size){
|
||||
return this->message->Content->size;
|
||||
if(m_pMessage &&
|
||||
m_pMessage->Content &&
|
||||
m_pMessage->Content->data &&
|
||||
m_pMessage->Content->size){
|
||||
return m_pMessage->Content->size;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -122,16 +132,16 @@ unsigned MsrpMessage::getMsrpContent(void* output, unsigned maxsize)
|
|||
{
|
||||
unsigned retsize = 0;
|
||||
if(!output ||
|
||||
!this->message ||
|
||||
!this->message->Content ||
|
||||
!this->message->Content->data ||
|
||||
!this->message->Content->size){
|
||||
!m_pMessage ||
|
||||
!m_pMessage->Content ||
|
||||
!m_pMessage->Content->data ||
|
||||
!m_pMessage->Content->size){
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
retsize = (this->message->Content->size > maxsize) ? maxsize : this->message->Content->size;
|
||||
memcpy(output, this->message->Content->data, retsize);
|
||||
retsize = (m_pMessage->Content->size > maxsize) ? maxsize : m_pMessage->Content->size;
|
||||
memcpy(output, m_pMessage->Content->data, retsize);
|
||||
return retsize;
|
||||
}
|
||||
|
||||
|
@ -142,54 +152,54 @@ const tmsrp_header_t* MsrpMessage::getMsrpHeader(const char* name, unsigned inde
|
|||
const tsk_list_item_t *item;
|
||||
|
||||
/* From tmsrp_message_get_headerAt() */
|
||||
if(!this->message || !name){
|
||||
if(!m_pMessage || !name){
|
||||
return tsk_null;
|
||||
}
|
||||
|
||||
if(tsk_striequals(name, "To-Path")){
|
||||
if(index == 0){
|
||||
hdr = (const tmsrp_header_t*)this->message->To;
|
||||
hdr = (const tmsrp_header_t*)m_pMessage->To;
|
||||
goto bail;
|
||||
}else pos++; }
|
||||
if(tsk_striequals(name, "From-Path")){
|
||||
if(index == 0){
|
||||
hdr = (const tmsrp_header_t*)this->message->From;
|
||||
hdr = (const tmsrp_header_t*)m_pMessage->From;
|
||||
goto bail;
|
||||
}else pos++; }
|
||||
if(tsk_striequals(name, "Message-ID")){
|
||||
if(index == 0){
|
||||
hdr = (const tmsrp_header_t*)this->message->MessageID;
|
||||
hdr = (const tmsrp_header_t*)m_pMessage->MessageID;
|
||||
goto bail;
|
||||
}else pos++; }
|
||||
if(tsk_striequals(name, "Byte-Range")){
|
||||
if(index == 0){
|
||||
hdr = (const tmsrp_header_t*)this->message->ByteRange;
|
||||
hdr = (const tmsrp_header_t*)m_pMessage->ByteRange;
|
||||
goto bail;
|
||||
}else pos++; }
|
||||
if(tsk_striequals(name, "Failure-Report")){
|
||||
if(index == 0){
|
||||
hdr = (const tmsrp_header_t*)this->message->FailureReport;
|
||||
hdr = (const tmsrp_header_t*)m_pMessage->FailureReport;
|
||||
goto bail;
|
||||
}else pos++; }
|
||||
if(tsk_striequals(name, "Success-Report")){
|
||||
if(index == 0){
|
||||
hdr = (const tmsrp_header_t*)this->message->SuccessReport;
|
||||
hdr = (const tmsrp_header_t*)m_pMessage->SuccessReport;
|
||||
goto bail;
|
||||
}else pos++; }
|
||||
if(tsk_striequals(name, "Status")){
|
||||
if(index == 0){
|
||||
hdr = (const tmsrp_header_t*)this->message->Status;
|
||||
hdr = (const tmsrp_header_t*)m_pMessage->Status;
|
||||
goto bail;
|
||||
}else pos++; }
|
||||
if(tsk_striequals(name, "Content-Type")){
|
||||
if(index == 0){
|
||||
hdr = (const tmsrp_header_t*)this->message->ContentType;
|
||||
hdr = (const tmsrp_header_t*)m_pMessage->ContentType;
|
||||
goto bail;
|
||||
}else pos++; }
|
||||
|
||||
|
||||
/* All other headers */
|
||||
tsk_list_foreach(item, this->message->headers){
|
||||
tsk_list_foreach(item, m_pMessage->headers){
|
||||
if(tsk_striequals(tmsrp_header_get_nameex(TMSRP_HEADER(item->data)), name)){
|
||||
if(pos++ >= index){
|
||||
hdr = (const tmsrp_header_t*)item->data;
|
||||
|
@ -211,17 +221,17 @@ MsrpEvent::MsrpEvent(const tmsrp_event_t *_msrpevent)
|
|||
{
|
||||
this->_event = _msrpevent;
|
||||
if(this->_event && this->_event->message){
|
||||
this->message = new MsrpMessage((tmsrp_message_t *)this->_event->message);
|
||||
m_pMessage = new MsrpMessage((tmsrp_message_t *)this->_event->message);
|
||||
}
|
||||
else{
|
||||
this->message = tsk_null;
|
||||
m_pMessage = tsk_null;
|
||||
}
|
||||
}
|
||||
|
||||
MsrpEvent::~MsrpEvent()
|
||||
{
|
||||
if(this->message){
|
||||
delete this->message;
|
||||
if(m_pMessage){
|
||||
delete m_pMessage;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,7 +253,7 @@ const MsrpSession* MsrpEvent::getSipSession()
|
|||
|
||||
const MsrpMessage* MsrpEvent::getMessage() const
|
||||
{
|
||||
return this->message;
|
||||
return m_pMessage;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ public:
|
|||
#endif
|
||||
bool isLastChunck();
|
||||
bool isFirstChunck();
|
||||
bool isSuccessReport();
|
||||
char* getMsrpHeaderValue(const char* name);
|
||||
char* getMsrpHeaderParamValue(const char* name, const char* param);
|
||||
unsigned getMsrpContentLength();
|
||||
|
@ -55,7 +56,7 @@ private:
|
|||
const tmsrp_header_t* getMsrpHeader(const char* name, unsigned index = 0);
|
||||
|
||||
private:
|
||||
tmsrp_message_t *message;
|
||||
tmsrp_message_t *m_pMessage;
|
||||
};
|
||||
|
||||
class MsrpEvent
|
||||
|
@ -72,7 +73,7 @@ public:
|
|||
|
||||
protected:
|
||||
const tmsrp_event_t *_event;
|
||||
MsrpMessage* message;
|
||||
MsrpMessage* m_pMessage;
|
||||
};
|
||||
|
||||
class MsrpCallback
|
||||
|
|
|
@ -76,6 +76,11 @@ public class MsrpMessage : IDisposable {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public bool isSuccessReport() {
|
||||
bool ret = tinyWRAPPINVOKE.MsrpMessage_isSuccessReport(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public string getMsrpHeaderValue(string name) {
|
||||
string ret = tinyWRAPPINVOKE.MsrpMessage_getMsrpHeaderValue(swigCPtr, name);
|
||||
return ret;
|
||||
|
|
|
@ -1655,6 +1655,9 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_MsrpMessage_isFirstChunck")]
|
||||
public static extern bool MsrpMessage_isFirstChunck(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_MsrpMessage_isSuccessReport")]
|
||||
public static extern bool MsrpMessage_isSuccessReport(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_MsrpMessage_getMsrpHeaderValue")]
|
||||
public static extern string MsrpMessage_getMsrpHeaderValue(HandleRef jarg1, string jarg2);
|
||||
|
||||
|
|
|
@ -7380,6 +7380,18 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MsrpMessage_isFirstChunck(void * jarg
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MsrpMessage_isSuccessReport(void * jarg1) {
|
||||
unsigned int jresult ;
|
||||
MsrpMessage *arg1 = (MsrpMessage *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (MsrpMessage *)jarg1;
|
||||
result = (bool)(arg1)->isSuccessReport();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_MsrpMessage_getMsrpHeaderValue(void * jarg1, char * jarg2) {
|
||||
char * jresult ;
|
||||
MsrpMessage *arg1 = (MsrpMessage *) 0 ;
|
||||
|
|
|
@ -65,6 +65,10 @@ public class MsrpMessage {
|
|||
return tinyWRAPJNI.MsrpMessage_isFirstChunck(swigCPtr, this);
|
||||
}
|
||||
|
||||
public boolean isSuccessReport() {
|
||||
return tinyWRAPJNI.MsrpMessage_isSuccessReport(swigCPtr, this);
|
||||
}
|
||||
|
||||
public String getMsrpHeaderValue(String name) {
|
||||
return tinyWRAPJNI.MsrpMessage_getMsrpHeaderValue(swigCPtr, this, name);
|
||||
}
|
||||
|
|
|
@ -492,6 +492,7 @@ class tinyWRAPJNI {
|
|||
public final static native void MsrpMessage_getByteRange(long jarg1, MsrpMessage jarg1_, long[] jarg2, long[] jarg3, long[] jarg4);
|
||||
public final static native boolean MsrpMessage_isLastChunck(long jarg1, MsrpMessage jarg1_);
|
||||
public final static native boolean MsrpMessage_isFirstChunck(long jarg1, MsrpMessage jarg1_);
|
||||
public final static native boolean MsrpMessage_isSuccessReport(long jarg1, MsrpMessage jarg1_);
|
||||
public final static native String MsrpMessage_getMsrpHeaderValue(long jarg1, MsrpMessage jarg1_, String jarg2);
|
||||
public final static native String MsrpMessage_getMsrpHeaderParamValue(long jarg1, MsrpMessage jarg1_, String jarg2, String jarg3);
|
||||
public final static native long MsrpMessage_getMsrpContentLength(long jarg1, MsrpMessage jarg1_);
|
||||
|
|
|
@ -10515,6 +10515,21 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpMessage_1
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpMessage_1isSuccessReport(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jboolean jresult = 0 ;
|
||||
MsrpMessage *arg1 = (MsrpMessage *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(MsrpMessage **)&jarg1;
|
||||
result = (bool)(arg1)->isSuccessReport();
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpMessage_1getMsrpHeaderValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
|
||||
jstring jresult = 0 ;
|
||||
MsrpMessage *arg1 = (MsrpMessage *) 0 ;
|
||||
|
|
|
@ -2107,6 +2107,7 @@ sub DESTROY {
|
|||
*getByteRange = *tinyWRAPc::MsrpMessage_getByteRange;
|
||||
*isLastChunck = *tinyWRAPc::MsrpMessage_isLastChunck;
|
||||
*isFirstChunck = *tinyWRAPc::MsrpMessage_isFirstChunck;
|
||||
*isSuccessReport = *tinyWRAPc::MsrpMessage_isSuccessReport;
|
||||
*getMsrpHeaderValue = *tinyWRAPc::MsrpMessage_getMsrpHeaderValue;
|
||||
*getMsrpHeaderParamValue = *tinyWRAPc::MsrpMessage_getMsrpHeaderParamValue;
|
||||
*getMsrpContentLength = *tinyWRAPc::MsrpMessage_getMsrpContentLength;
|
||||
|
|
|
@ -20784,6 +20784,34 @@ XS(_wrap_MsrpMessage_isFirstChunck) {
|
|||
}
|
||||
|
||||
|
||||
XS(_wrap_MsrpMessage_isSuccessReport) {
|
||||
{
|
||||
MsrpMessage *arg1 = (MsrpMessage *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
bool result;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: MsrpMessage_isSuccessReport(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MsrpMessage, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MsrpMessage_isSuccessReport" "', argument " "1"" of type '" "MsrpMessage *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< MsrpMessage * >(argp1);
|
||||
result = (bool)(arg1)->isSuccessReport();
|
||||
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_MsrpMessage_getMsrpHeaderValue) {
|
||||
{
|
||||
MsrpMessage *arg1 = (MsrpMessage *) 0 ;
|
||||
|
@ -21957,6 +21985,7 @@ static swig_command_info swig_commands[] = {
|
|||
{"tinyWRAPc::MsrpMessage_getByteRange", _wrap_MsrpMessage_getByteRange},
|
||||
{"tinyWRAPc::MsrpMessage_isLastChunck", _wrap_MsrpMessage_isLastChunck},
|
||||
{"tinyWRAPc::MsrpMessage_isFirstChunck", _wrap_MsrpMessage_isFirstChunck},
|
||||
{"tinyWRAPc::MsrpMessage_isSuccessReport", _wrap_MsrpMessage_isSuccessReport},
|
||||
{"tinyWRAPc::MsrpMessage_getMsrpHeaderValue", _wrap_MsrpMessage_getMsrpHeaderValue},
|
||||
{"tinyWRAPc::MsrpMessage_getMsrpHeaderParamValue", _wrap_MsrpMessage_getMsrpHeaderParamValue},
|
||||
{"tinyWRAPc::MsrpMessage_getMsrpContentLength", _wrap_MsrpMessage_getMsrpContentLength},
|
||||
|
|
|
@ -1535,6 +1535,7 @@ class MsrpMessage(_object):
|
|||
def getByteRange(self): return _tinyWRAP.MsrpMessage_getByteRange(self)
|
||||
def isLastChunck(self): return _tinyWRAP.MsrpMessage_isLastChunck(self)
|
||||
def isFirstChunck(self): return _tinyWRAP.MsrpMessage_isFirstChunck(self)
|
||||
def isSuccessReport(self): return _tinyWRAP.MsrpMessage_isSuccessReport(self)
|
||||
def getMsrpHeaderValue(self, *args): return _tinyWRAP.MsrpMessage_getMsrpHeaderValue(self, *args)
|
||||
def getMsrpHeaderParamValue(self, *args): return _tinyWRAP.MsrpMessage_getMsrpHeaderParamValue(self, *args)
|
||||
def getMsrpContentLength(self): return _tinyWRAP.MsrpMessage_getMsrpContentLength(self)
|
||||
|
|
|
@ -20629,6 +20629,28 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_MsrpMessage_isSuccessReport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
MsrpMessage *arg1 = (MsrpMessage *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
bool result;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"O:MsrpMessage_isSuccessReport",&obj0)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MsrpMessage, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MsrpMessage_isSuccessReport" "', argument " "1"" of type '" "MsrpMessage *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< MsrpMessage * >(argp1);
|
||||
result = (bool)(arg1)->isSuccessReport();
|
||||
resultobj = SWIG_From_bool(static_cast< bool >(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_MsrpMessage_getMsrpHeaderValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
MsrpMessage *arg1 = (MsrpMessage *) 0 ;
|
||||
|
@ -21440,6 +21462,7 @@ static PyMethodDef SwigMethods[] = {
|
|||
{ (char *)"MsrpMessage_getByteRange", _wrap_MsrpMessage_getByteRange, METH_VARARGS, NULL},
|
||||
{ (char *)"MsrpMessage_isLastChunck", _wrap_MsrpMessage_isLastChunck, METH_VARARGS, NULL},
|
||||
{ (char *)"MsrpMessage_isFirstChunck", _wrap_MsrpMessage_isFirstChunck, METH_VARARGS, NULL},
|
||||
{ (char *)"MsrpMessage_isSuccessReport", _wrap_MsrpMessage_isSuccessReport, METH_VARARGS, NULL},
|
||||
{ (char *)"MsrpMessage_getMsrpHeaderValue", _wrap_MsrpMessage_getMsrpHeaderValue, METH_VARARGS, NULL},
|
||||
{ (char *)"MsrpMessage_getMsrpHeaderParamValue", _wrap_MsrpMessage_getMsrpHeaderParamValue, METH_VARARGS, NULL},
|
||||
{ (char *)"MsrpMessage_getMsrpContentLength", _wrap_MsrpMessage_getMsrpContentLength, METH_VARARGS, NULL},
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
EXPORTS
|
||||
|
||||
Init_Decod_ld8a
|
||||
Init_Post_Filter
|
||||
Init_Post_Process
|
||||
Decod_ld8a
|
||||
Check_Parity_Pitch
|
||||
bits2prm_ld8k
|
||||
|
||||
Init_Pre_Process
|
||||
Init_Coder_ld8a
|
||||
Set_zero
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)\$(ProjectName).a"
|
||||
OutputFile="..\thirdparties\win32\lib\g729b\$(ProjectName).a"
|
||||
ModuleDefinitionFile=""
|
||||
/>
|
||||
<Tool
|
||||
|
|
|
@ -50,15 +50,15 @@ static const int tdav_codec_amr_nb_sizes[] = { 12, 13, 15, 17, 19, 20, 26, 31, 5
|
|||
static const int tdav_codec_amr_wb_sizes[] = { 17, 23, 32, 36, 40, 46, 50, 58, 60, 5, -1, -1, -1, -1, -1, -1 };
|
||||
|
||||
/* ============ Common ================= */
|
||||
int tdav_codec_amr_init(tdav_codec_amr_t* self, tdav_codec_amr_type_t type, tdav_codec_amr_mode_t mode);
|
||||
int tdav_codec_amr_deinit(tdav_codec_amr_t* self);
|
||||
tdav_codec_amr_mode_t tdav_codec_amr_get_mode(const char* fmtp);
|
||||
int tdav_codec_amr_parse_fmtp(tdav_codec_amr_t* self, const char* fmtp);
|
||||
tsk_size_t tdav_codec_amr_oa_decode(tdav_codec_amr_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr);
|
||||
tsk_size_t tdav_codec_amr_be_decode(tdav_codec_amr_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr);
|
||||
tsk_size_t tdav_codec_amr_be_encode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size);
|
||||
tsk_size_t tdav_codec_amr_oa_encode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size);
|
||||
uint8_t tdav_codec_amr_bitbuffer_read(const void* bits, tsk_size_t size, tsk_size_t start, tsk_size_t count);
|
||||
static int tdav_codec_amr_init(tdav_codec_amr_t* self, tdav_codec_amr_type_t type, tdav_codec_amr_mode_t mode);
|
||||
static int tdav_codec_amr_deinit(tdav_codec_amr_t* self);
|
||||
static tdav_codec_amr_mode_t tdav_codec_amr_get_mode(const char* fmtp);
|
||||
static int tdav_codec_amr_parse_fmtp(tdav_codec_amr_t* self, const char* fmtp);
|
||||
static tsk_size_t tdav_codec_amr_oa_decode(tdav_codec_amr_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr);
|
||||
static tsk_size_t tdav_codec_amr_be_decode(tdav_codec_amr_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr);
|
||||
static tsk_size_t tdav_codec_amr_be_encode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size);
|
||||
static tsk_size_t tdav_codec_amr_oa_encode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size);
|
||||
static uint8_t tdav_codec_amr_bitbuffer_read(const void* bits, tsk_size_t size, tsk_size_t start, tsk_size_t count);
|
||||
|
||||
/* ============ AMR-NB Plugin interface =================
|
||||
The AMR codec was originally developed and standardized by the
|
||||
|
@ -327,7 +327,7 @@ const tmedia_codec_plugin_def_t *tdav_codec_amrnb_be_plugin_def_t = &tdav_codec_
|
|||
// Common functions
|
||||
//
|
||||
|
||||
int tdav_codec_amr_init(tdav_codec_amr_t* self, tdav_codec_amr_type_t type, tdav_codec_amr_mode_t mode)
|
||||
static int tdav_codec_amr_init(tdav_codec_amr_t* self, tdav_codec_amr_type_t type, tdav_codec_amr_mode_t mode)
|
||||
{
|
||||
if(self){
|
||||
self->type = type;
|
||||
|
@ -342,7 +342,7 @@ int tdav_codec_amr_init(tdav_codec_amr_t* self, tdav_codec_amr_type_t type, tdav
|
|||
}
|
||||
}
|
||||
|
||||
int tdav_codec_amr_deinit(tdav_codec_amr_t* self)
|
||||
static int tdav_codec_amr_deinit(tdav_codec_amr_t* self)
|
||||
{
|
||||
if(self){
|
||||
switch(self->type){
|
||||
|
@ -372,7 +372,7 @@ int tdav_codec_amr_deinit(tdav_codec_amr_t* self)
|
|||
}
|
||||
}
|
||||
|
||||
tdav_codec_amr_mode_t tdav_codec_amr_get_mode(const char* fmtp)
|
||||
static tdav_codec_amr_mode_t tdav_codec_amr_get_mode(const char* fmtp)
|
||||
{
|
||||
/* RFC 4867 - 8.1. AMR Media Type Registration
|
||||
octet-align: Permissible values are 0 and 1. If 1, octet-aligned
|
||||
|
@ -480,7 +480,7 @@ bail:
|
|||
*/
|
||||
|
||||
|
||||
tsk_size_t tdav_codec_amr_be_encode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size)
|
||||
static tsk_size_t tdav_codec_amr_be_encode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size)
|
||||
{
|
||||
tsk_size_t out_size = 0, i;
|
||||
int ret_size;
|
||||
|
@ -622,7 +622,7 @@ bail:
|
|||
return out_size;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_codec_amr_oa_encode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size)
|
||||
static tsk_size_t tdav_codec_amr_oa_encode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size)
|
||||
{
|
||||
tsk_size_t out_size = 0;
|
||||
int ret_size;
|
||||
|
@ -660,7 +660,7 @@ bail:
|
|||
return out_size;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_codec_amr_oa_decode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr)
|
||||
static tsk_size_t tdav_codec_amr_oa_decode(tdav_codec_amr_t* amr, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr)
|
||||
{
|
||||
tsk_size_t out_size = 0, pcm_frame_size = 0;
|
||||
const uint8_t* pdata = (const uint8_t*)in_data;
|
||||
|
@ -779,7 +779,7 @@ bail:
|
|||
}
|
||||
|
||||
|
||||
uint8_t tdav_codec_amr_bitbuffer_read(const void* bits, tsk_size_t size, tsk_size_t start, tsk_size_t count)
|
||||
static uint8_t tdav_codec_amr_bitbuffer_read(const void* bits, tsk_size_t size, tsk_size_t start, tsk_size_t count)
|
||||
{
|
||||
uint8_t byte, left, right, pad;
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Winmm.lib $(OutDir)\tinySAK.lib $(OutDir)\tinyNET.lib $(OutDir)\tinyRTP.lib $(OutDir)\tinyMSRP.lib $(OutDir)\tinySDP.lib $(OutDir)\tinyMEDIA.lib $(OutDir)\tinyDSHOW.lib "..\thirdparties\win32\lib\gsm\libgsm.a" "..\thirdparties\win32\lib\ilbc\libiLBC.a" "..\thirdparties\win32\lib\speex\libspeex.a" "..\thirdparties\win32\lib\speex\libspeexdsp.a" ..\thirdparties\win32\lib\libgcc.a ..\thirdparties\win32\lib\libmingwex.a "..\thirdparties\win32\lib\ffmpeg\libavcodec.a" "..\thirdparties\win32\lib\ffmpeg\libavutil.a" "..\thirdparties\win32\lib\ffmpeg\libswscale.a" "..\thirdparties\win32\lib\ffmpeg\libavcore.a" "..\thirdparties\win32\lib\ffmpeg\libx264.a" "..\thirdparties\win32\lib\ffmpeg\libtheora.a" "..\thirdparties\win32\lib\ffmpeg\libogg.a" "..\thirdparties\win32\lib\BroadVoice16\libbv16.a" "..\thirdparties\win32\lib\opencore\libopencore-amrnb.a" "..\thirdparties\win32\lib\webrtc\aec.lib" "..\thirdparties\win32\lib\webrtc\apm_util.lib" "..\thirdparties\win32\lib\webrtc\system_wrappers.lib" "..\thirdparties\win32\lib\webrtc\spl.lib" "..\thirdparties\win32\lib\webrtc\ns.lib" "..\thirdparties\win32\lib\vpx\vpxmd.lib""
|
||||
AdditionalDependencies="Winmm.lib $(OutDir)\tinySAK.lib $(OutDir)\tinyNET.lib $(OutDir)\tinyRTP.lib $(OutDir)\tinyMSRP.lib $(OutDir)\tinySDP.lib $(OutDir)\tinyMEDIA.lib $(OutDir)\tinyDSHOW.lib "..\thirdparties\win32\lib\gsm\libgsm.a" "..\thirdparties\win32\lib\ilbc\libiLBC.a" "..\thirdparties\win32\lib\speex\libspeex.a" "..\thirdparties\win32\lib\speex\libspeexdsp.a" ..\thirdparties\win32\lib\libgcc.a ..\thirdparties\win32\lib\libmingwex.a "..\thirdparties\win32\lib\ffmpeg\libavcodec.a" "..\thirdparties\win32\lib\ffmpeg\libavutil.a" "..\thirdparties\win32\lib\ffmpeg\libswscale.a" "..\thirdparties\win32\lib\ffmpeg\libavcore.a" "..\thirdparties\win32\lib\ffmpeg\libx264.a" "..\thirdparties\win32\lib\ffmpeg\libtheora.a" "..\thirdparties\win32\lib\ffmpeg\libogg.a" "..\thirdparties\win32\lib\BroadVoice16\libbv16.a" "..\thirdparties\win32\lib\webrtc\aec.lib" "..\thirdparties\win32\lib\webrtc\apm_util.lib" "..\thirdparties\win32\lib\webrtc\system_wrappers.lib" "..\thirdparties\win32\lib\webrtc\spl.lib" "..\thirdparties\win32\lib\webrtc\ns.lib" "..\thirdparties\win32\lib\vpx\vpxmd.lib""
|
||||
LinkIncremental="1"
|
||||
IgnoreDefaultLibraryNames="MSVCRTD;LIBCMT"
|
||||
GenerateDebugInformation="false"
|
||||
|
|
Loading…
Reference in New Issue