本文整理汇总了C++中ChannelList::findChannel方法的典型用法代码示例。如果您正苦于以下问题:C++ ChannelList::findChannel方法的具体用法?C++ ChannelList::findChannel怎么用?C++ ChannelList::findChannel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChannelList
的用法示例。
在下文中一共展示了ChannelList::findChannel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getQuality
JPEGCodec::JPEGCodec(const Header &header, const ChannelList &channels) :
VideoCodec(header, channels),
_descriptor(header.frameRate(), header.width(), header.height(), MoxMxf::VideoDescriptor::VideoCodecJPEG)
{
setWindows(_descriptor, header);
assert(channels.size() == 3);
const Channel *r_channel = channels.findChannel("R");
if(r_channel)
{
assert(r_channel->type == UINT8);
}
else
assert(false);
MoxMxf::RGBADescriptor::RGBALayout layout;
layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('R', 8));
layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('G', 8));
layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('B', 8));
_descriptor.setPixelLayout(layout);
_quality = (isLossless(header) ? 100 : getQuality(header));
}
示例2: ArgExc
DPXCodec::DPXCodec(const Header &header, const ChannelList &channels) :
VideoCodec(header, channels),
_descriptor(header.frameRate(), header.width(), header.height(), MoxMxf::VideoDescriptor::VideoCodecDPX),
_pixelAspectRatio(header.pixelAspectRatio()),
_frameRate(header.frameRate())
{
setWindows(_descriptor, header);
const Channel *r_channel = channels.findChannel("R");
const Channel *a_channel = channels.findChannel("A");
if(r_channel == NULL)
throw MoxMxf::ArgExc("Expected RGB(A) channels");
_channels = (a_channel != NULL ? DPX_RGBA : DPX_RGB);
const unsigned int bit_depth = PixelBits(r_channel->type);
_depth = (bit_depth == 8 ? DPX_8 :
bit_depth == 10 ? DPX_10 :
bit_depth == 12 ? DPX_12 :
bit_depth == 16 ? DPX_16 :
DPX_10);
MoxMxf::RGBADescriptor::RGBALayout layout;
layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('R', bit_depth));
layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('G', bit_depth));
layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('B', bit_depth));
if(_channels == DPX_RGBA)
layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('A', bit_depth));
_descriptor.setPixelLayout(layout);
}