void MP4Track::FinishWrite() { // write out any remaining samples in chunk buffer WriteChunkBuffer(); // record buffer size and bitrates MP4BitfieldProperty* pBufferSizeProperty; if (m_pTrakAtom->FindProperty( "trak.mdia.minf.stbl.stsd.*.esds.decConfigDescr.bufferSizeDB", (MP4Property**)&pBufferSizeProperty)) { pBufferSizeProperty->SetValue(GetMaxSampleSize()); } MP4Integer32Property* pBitrateProperty; if (m_pTrakAtom->FindProperty( "trak.mdia.minf.stbl.stsd.*.esds.decConfigDescr.maxBitrate", (MP4Property**)&pBitrateProperty)) { pBitrateProperty->SetValue(GetMaxBitrate()); } if (m_pTrakAtom->FindProperty( "trak.mdia.minf.stbl.stsd.*.esds.decConfigDescr.avgBitrate", (MP4Property**)&pBitrateProperty)) { pBitrateProperty->SetValue(GetAvgBitrate()); } }
void CEncoderLameDllDlg::GetControls(CEncoder* pEncoder) { // Get data out of Controls UpdateData( TRUE ); // Set items pEncoder->SetOnTheFlyEncoding( m_bEncDuringRead ); pEncoder->SetPrivate( m_bPrivate ); pEncoder->SetOriginal( m_bOriginal ); pEncoder->SetCopyRight( m_bCopyRight ); pEncoder->SetMode( m_nMode ); pEncoder->SetVersion( m_Version.GetCurSel() ); // USE CRC TO PACK ADDITIONAL INFO // First 4 bits are reserved for mode, // 2nd 4 bits for g_Psycho, // third nible for Quality // fifth nible for VBR Method int nVBR = m_VBR.GetCurSel(); int nVbrMethod = m_VbrMethod.GetCurSel(); int nCRC=(m_bCRC&0x01)+((m_Quality.GetCurSel()&0x0F)<<8)+((nVBR&0x0F)<<12)+ ((nVbrMethod&0x0F)<<16); pEncoder->SetCRC(nCRC); // Set bitrate selection pEncoder->SetBitrate( GetMinBitrate() ); // Set MAX bitrate selection pEncoder->SetMaxBitrate( GetMaxBitrate() ); // Set ABR setting pEncoder->SetUserN1( m_nABR ); // Set OutputSampleRate if ( 0 == m_OutSampleRate.GetCurSel() ) { pEncoder->SetOutSampleRate( m_OutSampleRate.GetCurSel() ); } else { pEncoder->SetOutSampleRate( MP3SampleRates[ m_Version.GetCurSel() ][ m_OutSampleRate.GetCurSel() - 1 ] ); } }
H223ChannelParam::H223ChannelParam(TPVChannelId id, PS_H223LogicalChannelParameters lcp, PS_DataType dt) : pH223Lcp(NULL), pDataType(NULL) { lcn = id; if (lcp) { pH223Lcp = Copy_H223LogicalChannelParameters(lcp); } if (dt) { pDataType = Copy_DataType(dt); } bitrate = GetMaxBitrate(pDataType); sample_interval = 0; unsigned fr = GetMaxFrameRate(pDataType); if (fr) sample_interval = (unsigned)((double)1000 / (double)fr); }