예제 #1
0
/*----------------------------------------------------------------------
|    BtPlayerServer::OnStreamInfoNotification
+---------------------------------------------------------------------*/
void 
BtPlayerServer::OnStreamInfoNotification(BLT_Mask update_mask, BLT_StreamInfo& info)
{       
    NPT_AutoLock lock(m_Lock);
    unsigned int mask = m_StreamInfo.mask|update_mask;
    ATX_DESTROY_CSTRING(m_StreamInfo.data_type);
    m_StreamInfo = info;
    m_StreamInfo.mask = mask;
    m_StreamInfo.data_type = NULL;
    ATX_SET_CSTRING(m_StreamInfo.data_type, info.data_type);
}
예제 #2
0
/*----------------------------------------------------------------------
|    BtPlayerServer::OnStreamInfoNotification
+---------------------------------------------------------------------*/
void 
BtPlayerServer::OnStreamInfoNotification(BLT_Mask update_mask, BLT_StreamInfo& info)
{       
    NPT_AutoLock lock(m_Lock);
    m_StreamInfo.mask |= update_mask;
    if (update_mask & BLT_STREAM_INFO_MASK_AVERAGE_BITRATE) {
        m_StreamInfo.average_bitrate = info.average_bitrate;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_INSTANT_BITRATE) {
        m_StreamInfo.instant_bitrate = info.instant_bitrate;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_NOMINAL_BITRATE) {
        m_StreamInfo.nominal_bitrate = info.nominal_bitrate;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_CHANNEL_COUNT) {
        m_StreamInfo.channel_count = info.channel_count;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_SAMPLE_RATE) {
        m_StreamInfo.sample_rate = info.sample_rate;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_DURATION) {
        m_StreamInfo.duration = info.duration;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_SIZE) {
        m_StreamInfo.size = info.size;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_WIDTH) {
        m_StreamInfo.width = info.width;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_HEIGHT) {
        m_StreamInfo.height = info.height;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_ID) {
        m_StreamInfo.id = info.id;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_TYPE) {
        m_StreamInfo.type = info.type;
    }
    if (update_mask & BLT_STREAM_INFO_MASK_DATA_TYPE) {
        ATX_DESTROY_CSTRING(m_StreamInfo.data_type);
        ATX_SET_CSTRING(m_StreamInfo.data_type, info.data_type);
    }
}