Record video file with 'thumbnail' image in Windows phone 8

Posted by Deepak on Stack Overflow See other posts from Stack Overflow or by Deepak
Published on 2013-08-02T09:54:05Z Indexed on 2013/10/22 9:55 UTC
Read the original article Hit count: 245

Filed under:

I'm trying to create a video capturing application store video file with 'thumbnail' image in Windows phone 8. I got some hint from the following link : How to get the thumbnail of a recorded video - windows phone 8?. But the result is quite annoying. I think there is some problem with the function.

 void captureSource_CaptureImageCompleted(object sender, CaptureImageCompletedEventArgs e)
        {
            using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
            {
                WriteableBitmap wb = e.Result;
                string fileName = "CameraMovie.jpg";
                if (isoStore.FileExists(fileName))
                    isoStore.DeleteFile(fileName);
                IsolatedStorageFileStream file = isoStore.CreateFile(fileName);
                Extensions.SaveJpeg(wb, file, wb.PixelWidth, wb.PixelHeight, 0, 85);
                file.Close();

                captureSource.Stop();
                fileSink.CaptureSource = null;
                fileSink.IsolatedStorageFileName = null;
            }
        }

e.Result has some invalid data in it.while i bind it to an image control it shows some annoying image. Anyone please help me.

© Stack Overflow or respective owner

Related posts about windows-phone-8