我有以下类定义:
class foo {
private:
bool m_active;
public:
const bool isActive() const // (btw do I need return type `const bool&` here?)
{
return m_active;
}
};
Run Code Online (Sandbox Code Playgroud)
具有constgetter(foo->isActive())的类是否更快foo->m_active(如果它是公共的)?我试着看看反汇编代码,但没有发现任何有趣的东西.
我在哪里可以阅读有关const吸气剂和二传手的信息?我需要深入了解这些方法的使用地点和原因.
我使用新API将图像从相机推送到videoToolBox编码器,并从编码器回调中获取编码的CMSampleBufferRef
我需要这些sps和pts用于CMVideoFormatDescriptionCreateFromH264ParameterSets来配置解码器
任何人都可以帮助/指导我吗?) 谢谢