The resolution of a recorded video is set according to CamcorderProfile which is passed to a MediaRecorder object. The profiles are identified by quality constants: CamcorderProfile.QUALITY_HIGH, CamcorderProfile.QUALITY_480P, etc.
The problem is that I can't get a list of supported recording resolutions/profiles. I can use hasProfile method, but it only checks if a given profile is supported, while I would prefer to have a full list of such profiles.
There is a method in Camera.parameters called getSupportedVideoSizes(), which should return what I need, but it returns null, which I guess means that I should use getSupportedPreviewSizes() instead. But there is no correspondance between the list of preview sizes and profiles.