void TrackConfig::Update(sp<MetaData>& aMetaData, const char* aMimeType) { // aMimeType points to a string from MediaDefs.cpp so we don't need to copy it mime_type = aMimeType; duration = FindInt64(aMetaData, kKeyDuration); media_time = FindInt64(aMetaData, kKeyMediaTime); mTrackId = FindInt32(aMetaData, kKeyTrackID); crypto.Update(aMetaData); }
static void UpdateTrackInfo(mozilla::TrackInfo& aConfig, const MetaData* aMetaData, const char* aMimeType) { mozilla::CryptoTrack& crypto = aConfig.mCrypto; aConfig.mMimeType = aMimeType; aConfig.mDuration = FindInt64(aMetaData, kKeyDuration); aConfig.mMediaTime = FindInt64(aMetaData, kKeyMediaTime); aConfig.mTrackId = FindInt32(aMetaData, kKeyTrackID); aConfig.mCrypto.mValid = aMetaData->findInt32(kKeyCryptoMode, &crypto.mMode) && aMetaData->findInt32(kKeyCryptoDefaultIVSize, &crypto.mIVSize) && FindData(aMetaData, kKeyCryptoKey, &crypto.mKeyId); }
void MP4Sample::Update(int64_t& aMediaTime) { sp<MetaData> m = mMediaBuffer->meta_data(); decode_timestamp = FindInt64(m, kKeyDecodingTime); composition_timestamp = FindInt64(m, kKeyTime) - aMediaTime; duration = FindInt64(m, kKeyDuration); byte_offset = FindInt64(m, kKey64BitFileOffset); is_sync_point = FindInt32(m, kKeyIsSyncFrame); data = reinterpret_cast<uint8_t*>(mMediaBuffer->data()); size = mMediaBuffer->range_length(); crypto.Update(m); }
void MP4Sample::Update(int64_t& aMediaTime) { sp<MetaData> m = mMediaBuffer->meta_data(); // XXXbholley - Why don't we adjust decode_timestamp for aMediaTime? // According to k17e, this code path is no longer used - we should probably remove it. decode_timestamp = FindInt64(m, kKeyDecodingTime); composition_timestamp = FindInt64(m, kKeyTime) - aMediaTime; duration = FindInt64(m, kKeyDuration); byte_offset = FindInt64(m, kKey64BitFileOffset); is_sync_point = FindInt32(m, kKeyIsSyncFrame); data = reinterpret_cast<uint8_t*>(mMediaBuffer->data()); size = mMediaBuffer->range_length(); crypto.Update(m); }
int64 AttributeMessage::GetAttribute(const char* name, int64 defaultValue) const { int64 value; if (FindInt64(name, &value) != B_OK) return defaultValue; return value; }
myinline int64 ArpMessage::GetInt64(const char *name, int64 def, int32 index) const { if( this ) { int64 res; if( FindInt64(name, index, &res) != B_NO_ERROR ) return def; return res; } return def; }
int32 Message::FindInt64(const char *name, int64 *anInt64) const { return FindInt64( name, 0, anInt64 ); }