public void generateThumbnail(MediaProbe mediaProbe, VideoMetadata video,
            CancellationToken token, int timeoutSeconds, int nrThumbnails)
        {
            video.Thumbnail = null;

            List<MediaThumb> coverBitmaps = mediaProbe.grabAttachedImages(Constants.MAX_THUMBNAIL_WIDTH,
                 Constants.MAX_THUMBNAIL_HEIGHT, token, timeoutSeconds);

            if (coverBitmaps.Count > 0)
            {
                video.Thumbnail = new Thumbnail(coverBitmaps[0].Thumb);
            }

            if (coverBitmaps.Count == 0 || nrThumbnails > 1)
            {

                List<MediaThumb> thumbBitmaps = mediaProbe.grabThumbnails(Constants.MAX_THUMBNAIL_WIDTH,
                     Constants.MAX_THUMBNAIL_HEIGHT, 0, nrThumbnails, 0.025, token, timeoutSeconds, null);

                if (thumbBitmaps.Count > 0 && coverBitmaps.Count == 0)
                {
                    video.Thumbnail = new Thumbnail(thumbBitmaps[0].Thumb);
                }

            }
        }
        public void generateThumbnail(MediaProbe mediaProbe, AudioMetadata audio,
                                      CancellationToken token, int timeoutSeconds, int nrThumbnails)
        {
            // get attached images
            List <MediaThumb> thumbBitmaps = mediaProbe.grabAttachedImages(Constants.MAX_THUMBNAIL_WIDTH,
                                                                           Constants.MAX_THUMBNAIL_HEIGHT, token, timeoutSeconds);

            if (thumbBitmaps.Count > 0)
            {
                audio.Thumbnail = new Thumbnail(thumbBitmaps[0].Thumb);
            }
        }
        public void generateThumbnail(MediaProbe mediaProbe, AudioMetadata audio,
            CancellationToken token, int timeoutSeconds, int nrThumbnails)
        {
          
            // get attached images
            List<MediaThumb> thumbBitmaps = mediaProbe.grabAttachedImages(Constants.MAX_THUMBNAIL_WIDTH,
                Constants.MAX_THUMBNAIL_HEIGHT, token, timeoutSeconds);

            if (thumbBitmaps.Count > 0)
            {
                audio.Thumbnail = new Thumbnail(thumbBitmaps[0].Thumb); 
            }
            
        }
        public void generateThumbnail(MediaProbe mediaProbe, VideoMetadata video,
            CancellationToken token, int timeoutSeconds, int nrThumbnails)
        {
            video.Thumbnail = null;
         
            List<MediaThumb> coverBitmaps = mediaProbe.grabAttachedImages(Constants.MAX_THUMBNAIL_WIDTH,
                 Constants.MAX_THUMBNAIL_HEIGHT, token, timeoutSeconds);

            if (coverBitmaps.Count > 0)
            {
                video.Thumbnail = new Thumbnail(coverBitmaps[0].Thumb);
            }

            if (coverBitmaps.Count == 0 || nrThumbnails > 1)
            {

                List<MediaThumb> thumbBitmaps = mediaProbe.grabThumbnails(Constants.MAX_THUMBNAIL_WIDTH,
                     Constants.MAX_THUMBNAIL_HEIGHT, 0, nrThumbnails, 0.025, token, timeoutSeconds, null);
              
                if (thumbBitmaps.Count > 0 && coverBitmaps.Count == 0)
                {
                    video.Thumbnail = new Thumbnail(thumbBitmaps[0].Thumb);
                }
                
            }

        }