Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,770,713 Members 39,175 Now Online
XDA Developers Android and Mobile Development Forum

CM7 HD Recording (by hhcat)

Tip us?
 
Zachary57
Old
#1  
Senior Member - OP
Thanks Meter 129
Posts: 576
Join Date: Feb 2011
Default CM7 HD Recording (by hhcat)

Hhcat post that but unfortunally he can't post in this thread so, I forward his post.

Quote:
Originally Posted by hhcat View Post
This post is better to be in xt720 Dev board. But it is a pity that I don't have the privilege to post in that board now. So anybody who kindly help forward to the dev board would be great appreicated.
For quite a long time, we sufferred to HD record issue in CM7. And I spent some days inveistigaing this issue and fortunatelly got some interesting findings to share.

1. 720p HD recording fail becasue of wrong width and height parameter pass to function createOverlay in libsurfaceflinger.so.
02-13 17:38:12.030: D/TIOverlay(1876): overlay_createOverlay:IN w=768 h=432 format=99
02-13 17:38:12.030: I/Overlay(1876): v4l2_overlay_init:: w=480 h=854
02-13 17:38:12.030: I/Overlay(1876): v4l2_overlay_init:: w=768 h=432
02-13 17:38:12.030: I/Overlay(1876): v4l2_overlay_init:: w=768 h=432
Here we see, the paramter passed to createOverly is (768,432). And in comparison with 2.2 stocked Rom, the right parameter should be (1280,720) for HD recording.

2. The wrong width/height parameter is set in libcameraservice.so. Perhaps CM7 forbids HD recording...
02-13 17:38:12.030: D/CameraService(1540): Changing overlay dimensions to 768X432 for 720p recording.
And double check by open libcameraservice.so, we found the matched words in the above at the address of 0x000ae00h.

Proposed solution:
If someone could kindly help modify the code to comment the piece of code and build a new libcameraservice.so, we may have chance to bring HD recording back.
The Following User Says Thank You to Zachary57 For This Useful Post: [ Click to Expand ]
 
peshovec
Old
#2  
Senior Member
Thanks Meter 342
Posts: 300
Join Date: Nov 2010
corresponding code

frameworks/base/services/camera/libcameraservice/CameraService.cpp

Code:
#ifdef BOARD_USE_FROYO_LIBCAMERA
struct camera_size_type {
    int width;
    int height;
};

static const camera_size_type preview_sizes[] = {
    { 1280, 720 }, // 720P
    { 768, 432 },
};
#endif
.........

..........

#ifdef BOARD_USE_FROYO_LIBCAMERA
    //for 720p recording , preview can be 800X448
    if(w == preview_sizes[0].width && h==preview_sizes[0].height){
        LOGD("Changing overlay dimensions to 768X432 for 720p recording.");
        w = preview_sizes[1].width;
        h = preview_sizes[1].height;
    }
#endif

as you findings match my digging (e.g. if videorecording is set to 1280x720, no overlay is show on the display, however some file is generated)

i changed to
Code:
#ifdef BOARD_USE_FROYO_LIBCAMERA
    //for 720p recording , preview can be 800X448
    if(w == preview_sizes[0].width && h==preview_sizes[0].height){
        LOGD("Changing overlay dimensions to 768X432 for 720p recording.");
        w = preview_sizes[0].width;
        h = preview_sizes[0].height;
    }
#endif
will give feedback when have time to test....


p.s. will put again relevant information from the camera blobs....
Code:
preview-size-values=176x144,320x240,352x288,640x480,720x480,720x576,800x448,848x480,1280x720

video-size-values=176x144,320x240,352x288,640x480,720x480,720x576,1280x720
The Following 3 Users Say Thank You to peshovec For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes