Closed Bug 1112459 Opened 10 years ago Closed 9 years ago

[FFOS7715 v2.1][gaia][camera]video recorded is blurry when attach attachment from Messages

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jinchao.wang, Unassigned)

References

Details

Attachments

(2 files)

Description:video recorded is blurry when attach attachment from Messages

Device: SPRD 7715ga
Build Identifier: 20141216135951

Steps to Reproduce:
1) open Messages
2) create a new message
3) attache attachment
4 [review]) select Camera
5) switch to Video mode in camera
6) record a video

Actual Result:In "Retake / Select" view,the video is blurry,Play the video,it's blurry.

Expected Result:The recorded video to be normal.

Repro frequency:10/10,100%
Priority: -- → P2
   In gaia camera, after setup camera,we will configure camera. Before configuring camera,we will use function of getOptimalPreviewSize(previewSizes, viewportSize) to get PreviewSize in gaia/apps/camera/js/lib/camera/camera.js. But we didn't input a viewportSize for getOptimalPreviewSize in camera.js .

   In FFOS1.4 , we input a viewportSize for getOptimalPreviewSize ,and the code run correctly. But in ffos2.1, we removed the parameter, and the code has caused several issues.We cann't select correct previewsize and Video recorded are blurry.



<<<<<  I has submit a patch on our side. FFOS7715 works fine after Build Identifier of 20141217... >>>>
diff --git a/apps/camera/js/lib/camera/camera.js b/apps/camera/js/lib/camera/camera.js
index 492c644..3c4bb2c 100644
--- a/apps/camera/js/lib/camera/camera.js
+++ b/apps/camera/js/lib/camera/camera.js
@@ -497,7 +497,9 @@ Camera.prototype.previewSizes = function() {
  */  
 Camera.prototype.previewSize = function() {
   var sizes = this.previewSizes();
-  var size = CameraUtils.getOptimalPreviewSize(sizes);
+  // SPRD: bug381967, video recorded is blurry when attach attachment from Mms.
+  var profile = this.resolution();
+  var size = CameraUtils.getOptimalPreviewSize(sizes,profile);
   debug('get optimal previewSize', size);
   return size;
 };
    Can mozilla solve this issue officially on version of ffos2.1, or Can tell us why viewportSize parameter removed on ffos2.1? thanks a lot.
Hi Gary -

Mind taking a look at this issue and provide some helps to our partner?

Thanks

Vance
Flags: needinfo?(gchen)
Hi Jinchao, also could you attached the complete patch, not just copy&paste the code fragment?

Thanks
Flags: needinfo?(jinchao.wang)
Hi jinchao.wang,
   Please refer to bug 1056096, thanks.
Flags: needinfo?(gchen)
Attached patch camera.patchSplinter Review
Flags: needinfo?(jinchao.wang)
(In reply to Vance Chen [:vchen][vchen@mozilla.com] from comment #5)
> Hi Jinchao, also could you attached the complete patch, not just copy&paste
> the code fragment?
> 
> Thanks

Hi Vance:
    sorry, I have attached the complete patch. The patch can solve my bug on our side. thanks.
Attached video blurry video
(In reply to GaryChen [:GaryChen][:PYChen][:陳柏宇] from comment #6)
> Hi jinchao.wang,
>    Please refer to bug 1056096, thanks.

Hi GaryChen:
    I have  browsed bug-1056096 simply ,and I have attached blurry video. I don't think it's the same issue. In this bug,I think that we didn't provided enough parameters for getOptimalPreviewSize() , and getOptimalPreviewSize selected a wrong preview-size ,and that caused Hal camera recording fail.
I think bug 1056096 remove the code that you want to add for this issue. 
https://github.com/mozilla-b2g/gaia/pull/23329/files#diff-7583ec82229eb87c6789d64428756e56L481

Hi Wilson,
   Could you help to take a look jinchao.wang's patch on comment #2, and give him some feedback?
   Thanks.
Flags: needinfo?(wilsonpage)
bug 1104913 is about to land which removes all preview-size selection logic from the app and leaves Gecko to provide a sensible default preview-size based on the devices display and the chosen picture/video resolution.

I would wait for that Gaia patch to land first and see if your bug still exists.
Flags: needinfo?(wilsonpage)
See Also: → 1104913
resolved by:

https://bugzilla.mozilla.org/show_bug.cgi?id=1078435
Bug 1078435 - [Camera][Video] With software home button enabled the top of the screen of the video camera is corrupt
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: