From 33c44604c41234df095f5149c10df596e5ad3d26 Mon Sep 17 00:00:00 2001 From: li-jianchao1993 Date: Thu, 6 Apr 2023 14:23:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E3=80=91=20=E5=88=A0=E9=99=A4av=5Flog.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-jianchao1993 --- services/utils/av_log.h | 98 ----------------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 services/utils/av_log.h diff --git a/services/utils/av_log.h b/services/utils/av_log.h deleted file mode 100644 index 8d6bc3a94..000000000 --- a/services/utils/av_log.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2023 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 AV_LOG_H -#define AV_LOG_H - -#include -#include - -namespace OHOS { -#undef LOG_DOMAIN -#define LOG_DOMAIN 0xD002B2B - -#define __FILENAME__ (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__) - -#define MEDIA_LOG(func, fmt, args...) \ - do { \ - (void)func(LABEL, "{%{public}s():%{public}d} " fmt, __FUNCTION__, __LINE__, ##args); \ - } while (0) - -#define MEDIA_LOGD(fmt, ...) MEDIA_LOG(::OHOS::HiviewDFX::HiLog::Debug, fmt, ##__VA_ARGS__) -#define MEDIA_LOGI(fmt, ...) MEDIA_LOG(::OHOS::HiviewDFX::HiLog::Info, fmt, ##__VA_ARGS__) -#define MEDIA_LOGW(fmt, ...) MEDIA_LOG(::OHOS::HiviewDFX::HiLog::Warn, fmt, ##__VA_ARGS__) -#define MEDIA_LOGE(fmt, ...) MEDIA_LOG(::OHOS::HiviewDFX::HiLog::Error, fmt, ##__VA_ARGS__) -#define MEDIA_LOGF(fmt, ...) MEDIA_LOG(::OHOS::HiviewDFX::HiLog::Fatal, fmt, ##__VA_ARGS__) - -#define CHECK_AND_RETURN(cond) \ - do { \ - if (!(cond)) { \ - MEDIA_LOGE("%{public}s, check failed!", #cond); \ - return; \ - } \ - } while (0) - -#define CHECK_AND_RETURN_RET(cond, ret) \ - do { \ - if (!(cond)) { \ - MEDIA_LOGE("%{public}s, check failed! ret = %{public}s", #cond, #ret); \ - return ret; \ - } \ - } while (0) - -#define CHECK_AND_RETURN_RET_LOG(cond, ret, fmt, ...) \ - do { \ - if (!(cond)) { \ - MEDIA_LOGE(fmt, ##__VA_ARGS__); \ - return ret; \ - } \ - } while (0); - -#define CHECK_AND_RETURN_LOG(cond, fmt, ...) \ - do { \ - if (!(cond)) { \ - MEDIA_LOGE(fmt, ##__VA_ARGS__); \ - return; \ - } \ - } while (0); - -#define CHECK_AND_BREAK_LOG(cond, fmt, ...) \ - if (1) { \ - if (!(cond)) { \ - MEDIA_LOGE(fmt, ##__VA_ARGS__); \ - break; \ - } \ - } else void (0) - -#define CHECK_AND_BREAK(cond) \ - if (1) { \ - if (!(cond)) { \ - MEDIA_LOGE("%{public}s, check failed!", #cond); \ - break; \ - } \ - } else void (0) - -#define CHECK_AND_CONTINUE(cond) \ - if (1) { \ - if (!(cond)) { \ - MEDIA_LOGE("%{public}s, check failed!", #cond); \ - continue; \ - } \ - } else void (0) - -#define POINTER_MASK 0x00FFFFFF -#define FAKE_POINTER(addr) (POINTER_MASK & reinterpret_cast(addr)) -} // namespace OHOS -#endif // AV_LOG_H