V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  yfqh  ›  全部回复第 1 页 / 共 1 页
回复总数  4
2022-11-24 20:15:58 +08:00
回复了 yfqh 创建的主题 程序员 C++代码问题咨询
@brucedone 下面是初始的代码段

auto start_type = media::Pipeline::StartType::kNormal;
if ((GetDemuxerType() != media::DemuxerType::kChunkDemuxer) &&
preload_ == media::DataSource::METADATA &&
!client_->CouldPlayIfEnoughData() && !IsStreaming()) {
start_type =
(has_poster_ ||
base::FeatureList::IsEnabled(media::kPreloadMetadataLazyLoad))
? media::Pipeline::StartType::kSuspendAfterMetadata
: media::Pipeline::StartType::kSuspendAfterMetadataForAudioOnly;
attempting_suspended_start_ = true;
}

这是我修改后的

auto start_type = media::Pipeline::StartType::kNormal;
if ((GetDemuxerType() != media::DemuxerType::kChunkDemuxer) &&
preload_ == media::DataSource::METADATA &&
!client_->CouldPlayIfEnoughData() && !IsStreaming()) {
start_type =
(has_poster_
? media::Pipeline::StartType::kSuspendAfterMetadata
: media::Pipeline::StartType::kSuspendAfterMetadataForAudioOnly);
attempting_suspended_start_ = true;
}

我现在要将 base::FeatureList::IsEnabled(media::kPreloadMetadataLazyLoad)删去,但删去后好像发现会存在其他问题,这是 Chromium 工程师给的回复,我暂时还没有其他的修改思路。

The original code was: start_type = (has_poster_ || true) ? kSuspendAfterMetadata : kSuspendAfterMetadataForAudioOnly;

Patchset 9 changed it to: start_type = (has_poster_) ? kSuspendAfterMetadata : kSuspendAfterMetadataForAudioOnly;

Patchset 11 changed it to: start_type = (has_poster_ ? kSuspendAfterMetadata : kSuspendAfterMetadataForAudioOnly);

Shouldn't the code be: start_type = kSuspendAfterMetadata; ?

There may be some additional cleanup of kSuspendAfterMetadataForAudioOnly.
2022-10-08 07:52:08 +08:00
回复了 SuperXX 创建的主题 YubiKey Cloudflare 用户: YubiKey 5 NFC $10, YubiKey 5C NFC $11.60
2022-10-07 23:45:21 +08:00
回复了 SuperXX 创建的主题 YubiKey Cloudflare 用户: YubiKey 5 NFC $10, YubiKey 5C NFC $11.60
打算开一个车,又想上车的吗,买 4 个出三个
2022-08-12 17:23:23 +08:00
回复了 zhengrt 创建的主题 宽带症候群 广东电信最新内部套餐表 包含最新大上传套餐!
图片看不了啊
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5212 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms · UTC 07:21 · PVG 15:21 · LAX 00:21 · JFK 03:21
Developed with CodeLauncher
♥ Do have faith in what you're doing.