3

I am trying to set the video quality for the UIImagePickerController but I see something really werid now. The effect on the video quality only happen after I reset my application. I try to change the video quality based on some user setting, by some code like this:

    if ([preferences boolForKey:kVideoQuality]) {
        NSLog(@"High Quality");
        self.pickerController.videoQuality = UIImagePickerControllerQualityTypeHigh;
    } else {
        NSLog(@"Low Quality");
        self.pickerController.videoQuality = UIImagePickerControllerQualityTypeMedium;
    }

    NSLog(@"%d", self.pickerController.videoQuality);

Everything looks good, when I change the setting to High Quality, the "High Quality" is output and vice versa. I also double check by the last NSLog and it aslo output the correct quality. But if I am in the high quality mode and I set to low quality, nothing happens. If I reset the app by quitting it and going back, the video record now is in low quality mode.

Anybody knows what can be possible causes?

slayton
  • 19,732
  • 8
  • 57
  • 86
vodkhang
  • 18,281
  • 10
  • 73
  • 109
  • At what point do you swap the video quality? Is this while picking something, or right before? – M0rph3v5 Sep 27 '11 at 13:58
  • right before the presentModalViewController, the same code works on my iPod Touch 4, iOS 5 beta 7 but not work on iPad 2, iOS4.3 – vodkhang Sep 27 '11 at 14:49
  • Any chance you are setting the property on a secondary (not the main) thread? – Danra Oct 08 '11 at 12:00

4 Answers4

1

You're setting the picker view's videoQuality property. Its delegate methods are sometimes not called when making a selection programatically.

Try calling the delegate methods directly after changing the selection and see if it works.

Ash Furrow
  • 12,341
  • 3
  • 54
  • 91
1

It turns out to be a bug of the iOS SDK, it is fixed in the iOS 5 now.

vodkhang
  • 18,281
  • 10
  • 73
  • 109
0

What if you destroyed the imagePicker, and created a new one again after setting it?

Not a fix - but a workaround!

ben_the_builder
  • 309
  • 2
  • 8
0

the same problem here(Testing device: iPhone 4; OS: iOS 5.0.1):

Never see any difference between the video returned for

 UIImagePickerControllerQualityTypeMedium 
 UIImagePickerControllerQualityTypeHigh

even if I quit the App. Spent 1 hour, no findings, I am going to give up on this... Sad.

Cullen SUN
  • 3,417
  • 3
  • 30
  • 32