Esempio n. 1
0
 private SoftwareEncodingInfo GetEncoding(SoftwareProductInfo product, SoftwareCameraInfo camera, SoftwareEncodingInfo encoding)
 {
     return(encoding
            ?? CameraProvider.GetEncoding(product, camera));
 }
Esempio n. 2
0
        private SoftwareInfo GetSoftware(IEnumerable <IProductBinarySoftwareDetector> detectors, byte[] inBuffer, SoftwareEncodingInfo encoding,
                                         IProgress <double> progress = null, CancellationToken token = default(CancellationToken))
        {
            var prefix = BootProvider.GetPrefix(CategoryName);

            if (encoding == null)
            {
                return(GetSoftware(detectors, prefix, inBuffer, progress, token));
            }
            return(DoGetSoftware(detectors, prefix, inBuffer, encoding, token));
        }
Esempio n. 3
0
        private SoftwareInfo DoGetSoftware(IEnumerable <IProductBinarySoftwareDetector> detectors, byte[] prefix, byte[] inBuffer, SoftwareEncodingInfo encoding, CancellationToken token)
        {
            var worker = new BinarySoftwareDetectorWorker(detectors, BinaryDecoder, prefix, inBuffer, encoding);

            return(worker.GetSoftware(new ProgressState(), token));
        }
 public BinarySoftwareDetectorWorker(IEnumerable <IProductBinarySoftwareDetector> detectors, IBinaryDecoder binaryDecoder, byte[] prefix, byte[] inBuffer, SoftwareEncodingInfo encoding)
     : this(detectors, binaryDecoder, prefix, inBuffer, 0, 1, encoding != null ? new[] { encoding.Data } : null)
 {
 }