Skip to content

Commit

Permalink
Add macros to distinguish between the Windows platform and other plat…
Browse files Browse the repository at this point in the history
…forms
  • Loading branch information
[email protected] committed Jun 3, 2024
1 parent 0523bcb commit e876109
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/rtc/rtppacketizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ class RTC_CPP_EXPORT RtpPacketizer : public MediaHandler {
template <uint32_t DEFAULT_CLOCK_RATE>
class RTC_CPP_EXPORT AudioRtpPacketizer final : public RtpPacketizer {
public:
#ifdef _WIN32
static const uint32_t DefaultClockRate = DEFAULT_CLOCK_RATE;
static const uint32_t defaultClockRate [[deprecated("Use DefaultClockRate")]] =
static const uint32_t defaultClockRate[[deprecated("Use DefaultClockRate")]] =
DEFAULT_CLOCK_RATE; // for backward compatibility
#else // not WIN32
inline static const uint32_t DefaultClockRate = DEFAULT_CLOCK_RATE;
inline static const uint32_t defaultClockRate[[deprecated("Use DefaultClockRate")]] =
DEFAULT_CLOCK_RATE; // for backward compatibility
#endif


AudioRtpPacketizer(shared_ptr<RtpPacketizationConfig> rtpConfig)
: RtpPacketizer(std::move(rtpConfig)) {}
Expand Down

0 comments on commit e876109

Please sign in to comment.