Description:low latency

Match-id-d71f0036ecf2ee584e4100319a50844ee715d81b
This commit is contained in:
xxxx
2022-07-19 19:12:50 +08:00
parent 8f029d5521
commit 1a4ffdd3e3
14 changed files with 214 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef DINPUT_LOW_LATENCY_UTILS_H
#define DINPUT_LOW_LATENCY_UTILS_H
#include <cstring>
#include <mutex>
#include "single_instance.h"
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
class DInputLowLatencyUtils {
DECLARE_SINGLE_INSTANCE_BASE(DInputLowLatencyUtils);
public:
void EnableSourceLowLatency();
void DisableSourceLowLatency();
void EnableSinkLowLatency();
void DisableSinkLowLatency();
private:
DInputLowLatencyUtils() = default;
~DInputLowLatencyUtils();
int32_t LoadLibrary();
void CloseLibrary();
private:
void *handler_ { nullptr };
std::mutex mutex_;
};
} // namespace DistributedInput
} // namespace DistributedHardware
} // namespace OHOS
#endif // DINPUT_LOW_LATENCY_UTILS_H