Langsung ke konten utama

How to swap the camera so Opera 12 uses front camera for getUserMedia()

Essentially you only need to swap the tags 'front' and 'back' in the file /etc/nvcamera.conf

The change is permanent across reboots, but messes the orientation/mirror image of the cameras, so the rear camera becomes a mirror image, not the front. This messes all portrait shots as the camera pic becomes upside down.

Device needs to be rooted.



Need to make /system directory read/write:

# mount -o rw,remount /system

# vi /etc/nvcamera.conf# format, cameraName=device,direction,orientation,type

This is the file before mods
# type can be 'stereo' for stereo capable, 'mono' for not stereo capable,
# 'usb' to enable searching for a usb device and where to put it in the list
# if found. Lines must be shorter then 256 characters
version=1
camera0=/dev/ov5640,back,0,mono
#camera1=/dev/ov5650,back,0,mono // 2nd camera for stereo once supported
camera1=/dev/mi1040,front,0,mono
#camera4=/dev/ov5650,back,0,stereo // virtual stereo device once supported


Change this line:
camera0=/dev/ov5640,back,0,mono

to:
camera0=/dev/ov5640,front,0,mono

And this line:
camera1=/dev/mi1040,front,0,mono

to:
camera1=/dev/mi1040,back,0,mono


Save and it works.

source : https://forum.xda-developers.com/showthread.php?t=1699299

Komentar

Postingan populer dari blog ini

sys.processes Status sp_who2 SQL Server

Taken from the books online reference for sys.processes  and the status column. dormant = SQL Server is resetting the session. running = The session is running one or more batches. When Multiple Active Result Sets (MARS) is enabled, a session can run multiple batches. For more information, see Using Multiple Active Result Sets (MARS). background = The session is running a background task, such as deadlock detection. rollback = The session has a transaction rollback in process. pending = The session is waiting for a worker thread to become available. runnable = The task in the session is in the runnable queue of a scheduler while waiting to get a time quantum. spinloop = The task in the session is waiting for a spinlock to become free. suspended = The session is waiting for an event, such as I/O, to complete.

ApexSQL Refactor SQL Server

Features ApexSQL Refactor Format SQL with over 160 options Qualify objects and expand wildcards Encapsulate SQL into procedures Add surrogate keys Replace one-to-many relationships Change procedure parameters Safely rename SQL objects Locate & highlight unused variables Format SQL objects Obfuscate SQL Link ApexSQL Refactor :  apexsql_refactor My Template xml ApexSQL Refactor