当前位置: 首页>>代码示例>>C++>>正文


C++ TrackInfo::IsVideo方法代码示例

本文整理汇总了C++中TrackInfo::IsVideo方法的典型用法代码示例。如果您正苦于以下问题:C++ TrackInfo::IsVideo方法的具体用法?C++ TrackInfo::IsVideo怎么用?C++ TrackInfo::IsVideo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TrackInfo的用法示例。


在下文中一共展示了TrackInfo::IsVideo方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CheckResult

 void
 AddMediaFormatChecker(const TrackInfo& aTrackConfig)
 {
   if (aTrackConfig.IsVideo()) {
     auto mimeType = aTrackConfig.GetAsVideoInfo()->mMimeType;
     RefPtr<MediaByteBuffer> extraData =
       aTrackConfig.GetAsVideoInfo()->mExtraData;
     AddToCheckList([mimeType, extraData]() {
       if (MP4Decoder::IsH264(mimeType)) {
         mp4_demuxer::SPSData spsdata;
         // WMF H.264 Video Decoder and Apple ATDecoder
         // do not support YUV444 format.
         // For consistency, all decoders should be checked.
         if (mp4_demuxer::H264::DecodeSPSFromExtraData(extraData, spsdata)
             && (spsdata.profile_idc == 244 /* Hi444PP */
                 || spsdata.chroma_format_idc == PDMFactory::kYUV444)) {
           return CheckResult(
             SupportChecker::Reason::kVideoFormatNotSupported,
             MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
                         RESULT_DETAIL("Decoder may not have the capability "
                                       "to handle the requested video format "
                                       "with YUV444 chroma subsampling.")));
         }
       }
       return CheckResult(SupportChecker::Reason::kSupported);
     });
   }
 }
开发者ID:bgrins,项目名称:gecko-dev,代码行数:28,代码来源:PDMFactory.cpp

示例2:

PlatformDecoderModule::ConversionRequired
AndroidDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const
{
  if (aConfig.IsVideo()) {
    return ConversionRequired::kNeedAnnexB;
  }
  return ConversionRequired::kNeedNone;
}
开发者ID:cstipkovic,项目名称:gecko-dev,代码行数:8,代码来源:AndroidDecoderModule.cpp

示例3:

PlatformDecoderModule::ConversionRequired
EMEDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const
{
  if (aConfig.IsVideo()) {
    return kNeedAVCC;
  } else {
    return kNeedNone;
  }
}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:9,代码来源:EMEDecoderModule.cpp

示例4:

PlatformDecoderModule::ConversionRequired
WMFDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const
{
  if (aConfig.IsVideo() && MP4Decoder::IsH264(aConfig.mMimeType)) {
    return ConversionRequired::kNeedAnnexB;
  } else {
    return ConversionRequired::kNeedNone;
  }
}
开发者ID:MichaelKohler,项目名称:gecko-dev,代码行数:9,代码来源:WMFDecoderModule.cpp

示例5: DecoderNeedsConversion

 ConversionRequired
 DecoderNeedsConversion(const TrackInfo& aConfig) const override
 {
   if (aConfig.IsVideo() && MP4Decoder::IsH264(aConfig.mMimeType)) {
     return kNeedAVCC;
   } else {
     return kNeedNone;
   }
 }
开发者ID:zbraniecki,项目名称:gecko-dev,代码行数:9,代码来源:BlankDecoderModule.cpp

示例6:

PlatformDecoderModule::ConversionRequired
GMPDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const
{
  // GMPVideoCodecType::kGMPVideoCodecH264 specifies that encoded frames must be in AVCC format.
  if (aConfig.IsVideo() && MP4Decoder::IsH264(aConfig.mMimeType)) {
    return ConversionRequired::kNeedAVCC;
  } else {
    return ConversionRequired::kNeedNone;
  }
}
开发者ID:MichaelKohler,项目名称:gecko-dev,代码行数:10,代码来源:GMPDecoderModule.cpp

示例7:

PlatformDecoderModule::ConversionRequired
WMFDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const
{
  if (aConfig.IsVideo() &&
      (aConfig.mMimeType.EqualsLiteral("video/avc") ||
       aConfig.mMimeType.EqualsLiteral("video/mp4"))) {
    return kNeedAnnexB;
  } else {
    return kNeedNone;
  }
}
开发者ID:Jinwoo-Song,项目名称:gecko-dev,代码行数:11,代码来源:WMFDecoderModule.cpp

示例8: AddMediaFormatChecker

 void
 AddMediaFormatChecker(const TrackInfo& aTrackConfig)
 {
   if (aTrackConfig.IsVideo()) {
   auto mimeType = aTrackConfig.GetAsVideoInfo()->mMimeType;
   RefPtr<MediaByteBuffer> extraData = aTrackConfig.GetAsVideoInfo()->mExtraData;
   AddToCheckList(
     [mimeType, extraData]() {
       if (MP4Decoder::IsH264(mimeType)) {
         mp4_demuxer::SPSData spsdata;
         // WMF H.264 Video Decoder and Apple ATDecoder
         // do not support YUV444 format.
         // For consistency, all decoders should be checked.
         if (mp4_demuxer::H264::DecodeSPSFromExtraData(extraData, spsdata) &&
             spsdata.chroma_format_idc == PDMFactory::kYUV444) {
           return SupportChecker::Result::kVideoFormatNotSupported;
         }
       }
       return SupportChecker::Result::kSupported;
     });
   }
 }
开发者ID:nwgh,项目名称:gecko-dev,代码行数:22,代码来源:PDMFactory.cpp


注:本文中的TrackInfo::IsVideo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。