OSCL_EXPORT_REF void PvmfPortBaseImpl::LogMediaDataInfo(PVMFSharedMediaDataPtr aMediaData, const char* msg, int32 qsize)
//log media data info, description, and associated q-depth.
{
    OSCL_UNUSED_ARG(aMediaData);
    OSCL_UNUSED_ARG(msg);
    OSCL_UNUSED_ARG(qsize);

    if (!iDatapathLogger)
        return;

    LOGDATAPATH(
        (0, "PORT %s %s MediaData SeqNum %d, SId %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
         , msg
         , aMediaData->getSeqNum()
         , aMediaData->getStreamID()
         , aMediaData->getTimestamp()
         , qsize
        ));

}
OSCL_EXPORT_REF void PvmfPortBaseImpl::LogMediaMsgInfo(PVMFSharedMediaMsgPtr aMediaMsg, const char* msg, int32 qsize)
//log media msg info, description, and associated q-depth.
{
    OSCL_UNUSED_ARG(msg);
    OSCL_UNUSED_ARG(qsize);

    if (!iDatapathLogger)
        return;

    switch (aMediaMsg->getFormatID())
    {
        case PVMF_MEDIA_CMD_BOS_FORMAT_ID:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %s, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , "BOS"
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , qsize
                ));
        }
        break;
        case PVMF_MEDIA_CMD_EOS_FORMAT_ID:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %s, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , "EOS"
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , qsize
                ));
        }
        break;
        case PVMF_MEDIA_CMD_BOC_FORMAT_ID:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %s, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , "BOC"
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , qsize
                ));
        }
        break;
        case PVMF_MEDIA_CMD_EOC_FORMAT_ID:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %s, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , "EOC"
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , qsize
                ));
        }
        break;
        case PVMF_MEDIA_MSG_DATA_FORMAT_ID:
        {
            PVMFSharedMediaDataPtr mediaData;
            convertToPVMFMediaData(mediaData, aMediaMsg);
            LOGDATAPATH(
                (0, "PORT %s %s MediaData SeqNum %d, SId %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , mediaData->getSeqNum()
                 , mediaData->getStreamID()
                 , mediaData->getTimestamp()
                 , qsize
                ));
        }
        break;
        default:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %d, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , aMediaMsg->getFormatID()
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , qsize
                ));
        }
        break;
    }
}
void PvmfPortBaseImpl::LogMediaMsgInfo(PVMFSharedMediaMsgPtr aMediaMsg, const char* msg, PvmfPortBaseImplQueue&q)
//log media msg info, description, and associated q-depth.
{
    // to avoid compiler warnings when logger is not available
    OSCL_UNUSED_ARG(msg);
    OSCL_UNUSED_ARG(q);

    switch (aMediaMsg->getFormatID())
    {
        case PVMF_MEDIA_CMD_BOS_FORMAT_ID:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %s, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , "BOS"
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , q.iQ.size()
                 , q.iCapacity
                ));
        }
        break;
        case PVMF_MEDIA_CMD_EOS_FORMAT_ID:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %s, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , "EOS"
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , q.iQ.size()
                 , q.iCapacity
                ));
        }
        break;
        case PVMF_MEDIA_CMD_BOC_FORMAT_ID:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %s, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , "BOC"
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , q.iQ.size()
                 , q.iCapacity
                ));
        }
        break;
        case PVMF_MEDIA_CMD_EOC_FORMAT_ID:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %s, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , "EOC"
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , q.iQ.size()
                 , q.iCapacity
                ));
        }
        break;
        case PVMF_MEDIA_MSG_DATA_FORMAT_ID:
        {
            PVMFSharedMediaDataPtr mediaData;
            convertToPVMFMediaData(mediaData, aMediaMsg);
            LOGDATAPATH(
                (0, "PORT %s %s MediaData SeqNum %d, SId %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , mediaData->getSeqNum()
                 , mediaData->getStreamID()
                 , mediaData->getTimestamp()
                 , q.iQ.size()
                 , q.iCapacity
                ));
        }
        break;
        default:
        {
            LOGDATAPATH(
                (0, "PORT %s %s MediaCmd FmtId %d, SeqNum %d, SId %d, ClipID %d, TS %d, Q-depth %d/%d", iPortName.get_cstr()
                 , msg
                 , aMediaMsg->getFormatID()
                 , aMediaMsg->getSeqNum()
                 , aMediaMsg->getStreamID()
                 , aMediaMsg->getClipID()
                 , aMediaMsg->getTimestamp()
                 , q.iQ.size()
                 , q.iCapacity
                ));
        }
        break;
    }
}