Пример #1
0
        public static ICodecDefinition Buffered(this ICodecDefinition codecDefinition)
        {
            var codecModel = codecDefinition is CodecMediaTypeDefinition mtDev
          ? mtDev.Codec
          : codecDefinition is CodecDefinition dev
            ? dev.Codec
            : null;

            if (codecModel != null)
            {
                codecModel.IsBuffered = true;
            }

            return(codecDefinition);
        }
Пример #2
0
 public static ICodecWithMediaTypeDefinition ForMediaType(this ICodecDefinition codecDefinition, string mediaType)
 {
     return(codecDefinition.ForMediaType(new MediaType(mediaType)));
 }