mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
Refactor code
This commit is contained in:
parent
e972ec5a22
commit
49ddde28c0
@ -14,14 +14,6 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace toolkit;
|
using namespace toolkit;
|
||||||
|
|
||||||
#define CHECK_RET(...) \
|
|
||||||
try { \
|
|
||||||
CHECK(__VA_ARGS__); \
|
|
||||||
} catch (AssertFailedException & ex) { \
|
|
||||||
WarnL << ex.what(); \
|
|
||||||
return; \
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace mediakit {
|
namespace mediakit {
|
||||||
|
|
||||||
void H264RtmpDecoder::inputRtmp(const RtmpPacket::Ptr &pkt) {
|
void H264RtmpDecoder::inputRtmp(const RtmpPacket::Ptr &pkt) {
|
||||||
|
@ -18,14 +18,6 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace toolkit;
|
using namespace toolkit;
|
||||||
|
|
||||||
#define CHECK_RET(...) \
|
|
||||||
try { \
|
|
||||||
CHECK(__VA_ARGS__); \
|
|
||||||
} catch (AssertFailedException & ex) { \
|
|
||||||
WarnL << ex.what(); \
|
|
||||||
return; \
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace mediakit {
|
namespace mediakit {
|
||||||
|
|
||||||
void H265RtmpDecoder::inputRtmp(const RtmpPacket::Ptr &pkt) {
|
void H265RtmpDecoder::inputRtmp(const RtmpPacket::Ptr &pkt) {
|
||||||
|
@ -36,6 +36,16 @@
|
|||||||
#define CHECK(exp, ...) ::mediakit::Assert_ThrowCpp(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__)
|
#define CHECK(exp, ...) ::mediakit::Assert_ThrowCpp(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__)
|
||||||
#endif // CHECK
|
#endif // CHECK
|
||||||
|
|
||||||
|
#ifndef CHECK_RET
|
||||||
|
#define CHECK_RET(...) \
|
||||||
|
try { \
|
||||||
|
CHECK(__VA_ARGS__); \
|
||||||
|
} catch (AssertFailedException & ex) { \
|
||||||
|
WarnL << ex.what(); \
|
||||||
|
return; \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef MAX
|
#ifndef MAX
|
||||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||||
#endif // MAX
|
#endif // MAX
|
||||||
|
Loading…
Reference in New Issue
Block a user