Closed
Bug 1065957
Opened 12 years ago
Closed 12 years ago
[B2G] Correct photo orientation
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: ayang, Assigned: ayang)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
|
4.75 KB,
patch
|
ayang
:
review+
|
Details | Diff | Splinter Review |
Use camera control parameter CAMERA_PARAM_PICTURE_ROTATION to correct the photo orientation.
| Assignee | ||
Updated•12 years ago
|
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
| Assignee | ||
Comment 1•12 years ago
|
||
Attachment #8489227 -
Flags: feedback?(rlin)
Attachment #8489227 -
Flags: feedback?(jolin)
Comment 2•12 years ago
|
||
Comment on attachment 8489227 [details] [diff] [review]
b2g_photo_orientation_change
Review of attachment 8489227 [details] [diff] [review]:
-----------------------------------------------------------------
Always set rotation value before |TakePicture()| seems simpler to me. But overall this looks fine.
::: content/media/webrtc/MediaEngineWebRTC.h
@@ +100,5 @@
> : mCameraControl(nullptr)
> , mCallbackMonitor("WebRTCCamera.CallbackMonitor")
> , mRotation(0)
> , mBackCamera(false)
> + , mOrientationChanged(true)
Better to explain why this is true by default. To ensure that camera rotation value will be set according to the screen orientation when gUM is called?
@@ +203,5 @@
> nsresult TakePhoto(PhotoCallback* aCallback) MOZ_OVERRIDE;
>
> + // It sets the correct photo orientation via camera parameter according to
> + // current screen orientation.
> + nsresult PhotoOrientationUpdate();
Start method name with a verb: UpdatePhotoOrientation().
::: content/media/webrtc/MediaEngineWebRTCVideo.cpp
@@ +799,5 @@
> mRotation, mCaptureIndex, mBackCamera, mCameraAngle));
> }
> #endif
> +
> + mOrientationChanged = true;
Doesn't this need to be added before |#endif|?
Updated•12 years ago
|
Attachment #8489227 -
Flags: feedback?(jolin) → feedback+
Comment 3•12 years ago
|
||
Comment on attachment 8489227 [details] [diff] [review]
b2g_photo_orientation_change
Review of attachment 8489227 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/webrtc/MediaEngineWebRTC.h
@@ +100,5 @@
> : mCameraControl(nullptr)
> , mCallbackMonitor("WebRTCCamera.CallbackMonitor")
> , mRotation(0)
> , mBackCamera(false)
> + , mOrientationChanged(true)
+1, maybe set this during the StartImpl?
::: content/media/webrtc/MediaEngineWebRTCVideo.cpp
@@ +1088,5 @@
> +
> + hal::ScreenConfiguration config;
> + hal::GetCurrentScreenConfiguration(&config);
> +
> + // The rotation angle is clockwise.
Does this calculation apply to other devices? Maybe have a try on n4 or n5 or others chip vender's devices.
Attachment #8489227 -
Flags: feedback?(rlin) → feedback+
| Assignee | ||
Comment 4•12 years ago
|
||
Attachment #8489227 -
Attachment is obsolete: true
Attachment #8489264 -
Flags: review?(roc)
Comment on attachment 8489264 [details] [diff] [review]
b2g_photo_orientation_change
Review of attachment 8489264 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/webrtc/MediaEngineWebRTCVideo.cpp
@@ +1110,5 @@
> + orientation = (mBackCamera ? orientation : (-orientation));
> +
> + ICameraControlParameterSetAutoEnter batch(mCameraControl);
> + // It changes the orientation value in EXIF information only.
> + mCameraControl->Set(CAMERA_PARAM_PICTURE_ROTATION, orientation);
We don't honor EXIF orientation data by default (for good reasons). But I guess that's OK here.
Attachment #8489264 -
Flags: review?(roc) → review+
| Assignee | ||
Comment 6•12 years ago
|
||
Thanks for review.
Rebase.
Try result.
https://tbpl.mozilla.org/?tree=Try&rev=35d23e574367
Attachment #8489264 -
Attachment is obsolete: true
Attachment #8490643 -
Flags: review+
| Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 7•12 years ago
|
||
Keywords: checkin-needed
Comment 8•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•