mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
Merge branch 'master' of https://github.com/lyg1949/ZLMediaKit
This commit is contained in:
commit
575b84beee
@ -101,6 +101,13 @@ API_EXPORT void API_CALL mk_env_init1(int thread_num,
|
||||
*/
|
||||
API_EXPORT void API_CALL mk_set_option(const char *key, const char *val);
|
||||
|
||||
/**
|
||||
* 获取配置项的值
|
||||
* @param key 配置项名
|
||||
*/
|
||||
API_EXPORT const char * API_CALL mk_get_option(const char *key);
|
||||
|
||||
|
||||
/**
|
||||
* 创建http[s]服务器
|
||||
* @param port htt监听端口,推荐80,传入0则随机分配
|
||||
|
@ -98,6 +98,16 @@ API_EXPORT void API_CALL mk_media_input_h265(mk_media ctx, void *data, int len,
|
||||
*/
|
||||
API_EXPORT void API_CALL mk_media_input_aac(mk_media ctx, void *data, int len, uint32_t dts, void *adts);
|
||||
|
||||
#ifdef ENABLE_FAAC
|
||||
/**
|
||||
* 输入单帧PCM音频
|
||||
* @param ctx 对象指针
|
||||
* @param data 单帧PCM数据
|
||||
* @param len 单帧PCM数据字节数
|
||||
* @param dts 时间戳,毫秒
|
||||
*/
|
||||
API_EXPORT void API_CALL mk_media_input_PCM(mk_media ctx, void *Data, int len, uint32_t pts);
|
||||
#endif //ENABLE_FAAC
|
||||
/**
|
||||
* 输入单帧G711音频
|
||||
* @param ctx 对象指针
|
||||
|
@ -119,6 +119,17 @@ API_EXPORT void API_CALL mk_set_option(const char *key, const char *val) {
|
||||
mINI::Instance()[key] = val;
|
||||
}
|
||||
|
||||
API_EXPORT const char * API_CALL mk_get_option(const char *key)
|
||||
{
|
||||
assert(key);
|
||||
if (mINI::Instance().find(key) == mINI::Instance().end()) {
|
||||
WarnL << "key:" << key << " not existed!";
|
||||
return nullptr;
|
||||
}
|
||||
return mINI::Instance()[key].data();
|
||||
}
|
||||
|
||||
|
||||
API_EXPORT uint16_t API_CALL mk_http_server_start(uint16_t port, int ssl) {
|
||||
ssl = MAX(0,MIN(ssl,1));
|
||||
try {
|
||||
|
@ -157,6 +157,15 @@ API_EXPORT void API_CALL mk_media_input_aac(mk_media ctx, void *data, int len, u
|
||||
(*obj)->getChannel()->inputAAC((char *) data, len, dts, (char *) adts);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FAAC
|
||||
API_EXPORT void API_CALL mk_media_input_PCM(mk_media ctx, void *data , int len, uint32_t pts)
|
||||
{
|
||||
assert(ctx && data && len > 0);
|
||||
MediaHelper::Ptr* obj = (MediaHelper::Ptr*) ctx;
|
||||
(*obj)->getChannel()->inputPCM((char*)data, len, pts);
|
||||
}
|
||||
#endif //ENABLE_FAAC
|
||||
|
||||
API_EXPORT void API_CALL mk_media_input_g711(mk_media ctx, void* data, int len, uint32_t dts){
|
||||
assert(ctx && data && len > 0);
|
||||
MediaHelper::Ptr* obj = (MediaHelper::Ptr*) ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user