1
0
mirror of https://github.com/danog/php-libtgvoip.git synced 2024-11-26 20:04:48 +01:00

Added setBitrate method

This commit is contained in:
Daniil Gentili 2017-08-03 17:30:54 +02:00
parent 83e05e5f25
commit fc03f8547b
2 changed files with 11 additions and 3 deletions

View File

@ -392,9 +392,15 @@ Php::Value VoIP::setMicMute(Php::Parameters &params)
} }
void VoIP::debugCtl(Php::Parameters &params) Php::Value VoIP::debugCtl(Php::Parameters &params)
{ {
inst->DebugCtl(params[0], params[1]); inst->DebugCtl((int) params[0], (int) params[1]);
return this;
}
Php::Value VoIP::setBitrate(Php::Parameters &params)
{
inst->DebugCtl(1, (int) params[0]);
return this;
} }
Php::Value VoIP::getDebugLog() Php::Value VoIP::getDebugLog()
@ -563,6 +569,7 @@ extern "C" {
voip.method<&VoIP::setOutputFile>("setOutputFile", Php::Public | Php::Final, {Php::ByVal("file", Php::Type::String)}); voip.method<&VoIP::setOutputFile>("setOutputFile", Php::Public | Php::Final, {Php::ByVal("file", Php::Type::String)});
voip.method<&VoIP::unsetOutputFile>("unsetOutputFile", Php::Public | Php::Final); voip.method<&VoIP::unsetOutputFile>("unsetOutputFile", Php::Public | Php::Final);
voip.method<&VoIP::setBitrate>("setBitrate", Php::Public | Php::Final, {Php::ByVal("bitrate", Php::Type::Numeric)});
voip.property("configuration", 0, Php::Public); voip.property("configuration", 0, Php::Public);
voip.property("storage", 0, Php::Public); voip.property("storage", 0, Php::Public);

3
main.h
View File

@ -72,7 +72,8 @@ public:
Php::Value getStats(); Php::Value getStats();
Php::Value getDebugLog(); Php::Value getDebugLog();
Php::Value getDebugString(); Php::Value getDebugString();
void debugCtl(Php::Parameters &params); Php::Value debugCtl(Php::Parameters &params);
Php::Value setBitrate(Php::Parameters &params);
void setOutputLevel(Php::Parameters &params); void setOutputLevel(Php::Parameters &params);
Php::Value setMicMute(Php::Parameters &params); Php::Value setMicMute(Php::Parameters &params);