

#include <ortc/internal/ortc_RTPSenderChannelMediaBase.h>
#include <ortc/internal/ortc_RTPSenderChannelAudio.h>
#include <ortc/internal/ortc_RTPSenderChannelVideo.h>
#include <ortc/internal/ortc_RTPSenderChannel.h>
#include <ortc/internal/ortc_MediaStreamTrack.h>
#include <ortc/internal/ortc_RTCPPacket.h>
#include <ortc/internal/ortc_ORTC.h>
#include <ortc/internal/platform.h>

//#include <ortc/services/ISettings.h>
//#include <ortc/services/IHelper.h>
//#include <ortc/services/IHTTP.h>
//
//#include <zsLib/Stringize.h>
//#include <zsLib/Log.h>
//#include <zsLib/XML.h>
//
//#include <cryptopp/sha.h>


#ifdef _DEBUG
#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x))
#else
#define ASSERT(x)
#endif //_DEBUG


namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpsender) }

namespace ortc
{
//  ZS_DECLARE_TYPEDEF_PTR(ortc::services::ISettings, UseSettings)
//  ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHelper, UseServicesHelper)
//  ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP)
//
//  typedef ortc::services::Hasher<CryptoPP::SHA1> SHA1Hasher;

  namespace internal
  {
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    #pragma mark
    #pragma mark (helpers)
    #pragma mark

    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    #pragma mark
    #pragma mark IRTPSenderChannelMediaBaseForRTPSenderChannel
    #pragma mark

    //-------------------------------------------------------------------------
    ElementPtr IRTPSenderChannelMediaBaseForRTPSenderChannel::toDebug(ForRTPSenderChannelPtr object)
    {
      if (!object) return ElementPtr();

      {
        auto pThis = RTPSenderChannelAudio::convert(object);
        if (pThis) return pThis->toDebug();
      }
      {
        auto pThis = RTPSenderChannelVideo::convert(object);
        if (pThis) return pThis->toDebug();
      }

      return ElementPtr();
    }

    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    #pragma mark
    #pragma mark IRTPSenderChannelMediaBaseForMediaStreamTrack
    #pragma mark

    //-------------------------------------------------------------------------
    ElementPtr IRTPSenderChannelMediaBaseForMediaStreamTrack::toDebug(ForMediaStreamTrackPtr object)
    {
      if (!object) return ElementPtr();

      {
        auto pThis = RTPSenderChannelAudio::convert(object);
        if (pThis) return pThis->toDebug();
      }
      {
        auto pThis = RTPSenderChannelVideo::convert(object);
        if (pThis) return pThis->toDebug();
      }

      return ElementPtr();
    }

  } // internal namespace

}
