mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refactor macro SRS_AUTO_XXX to SRS_XXX.
This commit is contained in:
parent
2fe1874a87
commit
ed338f4c0a
31 changed files with 193 additions and 198 deletions
|
@ -40,7 +40,7 @@ using namespace std;
|
|||
#include <srs_kernel_utility.hpp>
|
||||
#include <srs_core_mem_watch.hpp>
|
||||
#include <srs_core_autofree.hpp>
|
||||
#ifdef SRS_AUTO_RTC
|
||||
#ifdef SRS_RTC
|
||||
#include <srs_kernel_rtp.hpp>
|
||||
#endif
|
||||
|
||||
|
@ -164,7 +164,7 @@ SrsCommonMessage::SrsCommonMessage()
|
|||
|
||||
SrsCommonMessage::~SrsCommonMessage()
|
||||
{
|
||||
#ifdef SRS_AUTO_MEM_WATCH
|
||||
#ifdef SRS_MEM_WATCH
|
||||
srs_memory_unwatch(payload);
|
||||
#endif
|
||||
srs_freepa(payload);
|
||||
|
@ -177,7 +177,7 @@ void SrsCommonMessage::create_payload(int size)
|
|||
payload = new char[size];
|
||||
srs_verbose("create payload for RTMP message. size=%d", size);
|
||||
|
||||
#ifdef SRS_AUTO_MEM_WATCH
|
||||
#ifdef SRS_MEM_WATCH
|
||||
srs_memory_watch(payload, "RTMP.msg.payload", size);
|
||||
#endif
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ SrsSharedPtrMessage::SrsSharedPtrPayload::SrsSharedPtrPayload()
|
|||
size = 0;
|
||||
shared_count = 0;
|
||||
|
||||
#ifdef SRS_AUTO_RTC
|
||||
#ifdef SRS_RTC
|
||||
samples = NULL;
|
||||
nn_samples = 0;
|
||||
has_idr = false;
|
||||
|
@ -224,12 +224,12 @@ SrsSharedPtrMessage::SrsSharedPtrPayload::SrsSharedPtrPayload()
|
|||
|
||||
SrsSharedPtrMessage::SrsSharedPtrPayload::~SrsSharedPtrPayload()
|
||||
{
|
||||
#ifdef SRS_AUTO_MEM_WATCH
|
||||
#ifdef SRS_MEM_WATCH
|
||||
srs_memory_unwatch(payload);
|
||||
#endif
|
||||
srs_freepa(payload);
|
||||
|
||||
#ifdef SRS_AUTO_RTC
|
||||
#ifdef SRS_RTC
|
||||
srs_freepa(samples);
|
||||
|
||||
for (int i = 0; i < nn_extra_payloads; i++) {
|
||||
|
@ -376,7 +376,7 @@ SrsSharedPtrMessage* SrsSharedPtrMessage::copy()
|
|||
return copy;
|
||||
}
|
||||
|
||||
#ifdef SRS_AUTO_RTC
|
||||
#ifdef SRS_RTC
|
||||
void SrsSharedPtrMessage::set_extra_payloads(SrsSample* payloads, int nn_payloads)
|
||||
{
|
||||
srs_assert(nn_payloads);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue