NX300 / SX2000 Open Source Code - Remove Video Recording Time Limits and File Size Limits

Started 7 months ago | Discussions thread
ForumParentFirstPreviousNextNext unread
Flat view
Mike Thomann
New MemberPosts: 3
Like?
NX300 / SX2000 Open Source Code - Remove Video Recording Time Limits and File Size Limits
7 months ago

I've downloaded the Samsung open source code for the NX2000 camera to check into changing the 30 minute time limit for videos, and just 20 minutes for 1080p30.

There's also drivers in the code for 1920x1080p60, even for 1920x1440p60. 1920x1440 would be good for utilizing the entire sensor area for low light video, and morphing to 16:0 1929x1080 for a wide area affect like the Superview setting on the GoPro Hero3+ Black Edition which I found to help quite a bit in low light.

There are code segments for handling video and audio recording formats, and bitrates, fps, and resolutions, all would be nice to increase. This file has hundreds of interesting variables for camcorder mode:
TIZEN\project\NX2000\imagedev\usr\include\mmf\mm_camcorder.h

Notable camcorder variables include:
MMCAM_IMAGE_ENCODER_QUALITY
MMCAM_CAMERA_FORMAT
MMCAM_CAPTURE_FORMAT
MMCAM_CAPTURE_WIDTH
MMCAM_CAPTURE_HEIGHT
MMCAM_AUDIO_VOLUME
MMCAM_FILE_FORMAT
MMCAM_VIDEO_ENCODER
MMCAM_AUDIO_ENCODER
MMCAM_AUDIO_SAMPLERATE
MMCAM_AUDIO_FORMAT

I'm primarily concerned with the video time limit for my application. Among 99,017 files within 8,691 folders I've located the following files which handle camcorder limits:

-- hide signature --

These files handle the actions to take and notices to display when limits are reached:

...TIZEN\project\NX2000\packages\webkit-efl\Source\WebCore\platform\graphics\efl\CameraManagerPrivateMMFW.cpp

...TIZEN\project\NX2000\imagedev\usr\include\mmf\SLP_MultimediaFW_PG.h
Includes sample code.

Applicable variables contained within these files:

MM_MESSAGE_CAMCORDER_TIME_LIMIT
Time limit (Second) of recording file. If the elapsed time of recording reaches this value, camcorder will send 'MM_MESSAGE_CAMCORDER_TIME_LIMIT' message.

MM_MESSAGE_CAMCORDER_MAX_SIZE
Maximum size (Kbyte) of recording file. If the size of file reaches this value, camcorder will send 'MM_MESSAGE_CAMCORDER_MAX_SIZE' message.

----------------------------------------------------------------
This file set the limits:
...TIZEN\project\NX2000\imagedev\usr\include\mmf\mm_camcorder.h

#define MMCAM_TARGET_TIME_LIMIT "target-time-limit"
Time limit (seconds) of recording file. If the elapsed time of recording reaches this value, camcorder will send 'MM_MESSAGE_CAMCORDER_TIME_LIMIT' message.

#define MMCAM_TARGET_MAX_SIZE "target-max-size"
Maximum size(Kbytes) of recording file. If the size of file reaches this value, camcorder will send 'MM_MESSAGE_CAMCORDER_MAX_SIZE' message.

Note that these limits are defined by yet another set of variables "target-time-limit" and "target-max-size". These are likely the final variables which ultimately determine the limits.

----------------------------------------------------------------
...TIZEN\project\NX2000\packages\webkit-efl\Source\WebCore\platform\graphics\efl\CameraManagerPrivateMMFW.cpp
Contains a function called "setCameraVideoCaptureAttr(capturePath,maxTimeInSeconds)" which initializes the running attributes of camcorder video. Within this function, the variable MMCAM_TARGET_TIME_LIMIT is initialized by the variable maxTimeInSeconds, which is the second (and last) parameter passed to the "setCameraVideoCaptureAttr" function when called. When calling the function, the time limit will likely either be a variable or the number of seconds as an integer passed to that second parameter.

----------------------------------------------------------------
So now I'm left with the limits being set with "target-time-limit" and "target-max-size", as well as the function setCameraVideoCaptureAttr(capturePath,maxTimeInSeconds), so the next step is to locate where there are being initialized...

----------------------------------------------------------------

The following files contain the variables "target-time-limit" and "target-max-size":

...TIZEN\project\NX2000\imagedev\usr\lib\libewebkit.so.0.12.23
Contained within 5th parameter of function "mm_camcorder_capture_start", but this function is for still image capture and multishot, not for camcorder video, so not at all concerned with this function.

Unable to easily determine association within following files, may not be directly affected:
...TIZEN\project\NX2000\image\rootfs\usr\bin\di-camera-app-nx2000
...TIZEN\project\NX2000\imagedev\usr\lib\libmmfcamcorder.so.0.0.0
...TIZEN\project\NX2000\image\rootfs\usr\lib\libmmfcamcorder.so.0.0.0
...TIZEN\project\NX2000\imagedev\usr\bin\mm_camcorder_testsuite
...TIZEN\project\NX2000\image\rootfs\usr\bin\mm_camcorder_testsuite

Result: I'm unable to easily determine where "target-time-limit" and "target-max-size" are ultimately initiated.

----------------------------------------------------------------
The following files contain the function "setCameraVideoCaptureAttr":

...TIZEN\project\NX2000\packages\webkit-efl\Source\WebCore\platform\graphics\efl\CameraManagerPrivateMMFW.h
Defines function "setCameraVideoCaptureAttr".

...TIZEN\project\NX2000\packages\webkit-efl\Source\WebCore\platform\graphics\efl\CameraManagerPrivateMMFW.cpp
Passes "maxTimeInSeconds" to function "setCameraVideoCaptureAttr".
Function "startVideoCapture" calls function "setCameraVideoCaptureAttr" with time limit of 180 (3 Minutes), not sure why 3 minutes here.

Unable to easily determine association within following files, may not be directly affected:
...TIZEN\project\NX2000\imagedev\usr\lib\libewebkit.so.0.12.23

Result: I'm unable to determine where "maxTimeInSeconds" is ultimately initiated.

----------------------------------------------------------------

Other methods of locating where limits are ultimately the time limit is initialized is by searching for time in seconds. For instance, a 30 minute limit would be 1800, but possibly set at 1799. At 1080p30, the time limit is 20 minutes, which is 1200, or possibly 1199. Same deduction method could be used for known file size limits. I was unable to locate time limits by instances of 1799 and 1199, and there are too many instance of 1800 and 1200 for me to dig through.

I've given up on my initial search for where the limits are ultimately initialized.

Some possible alternative solutions:

...TIZEN\project\NX2000\imagedev\usr\include\mmf\mm_camcorder.h
Change Line 1029 from:
#define MMCAM_TARGET_TIME_LIMIT "target-time-limit"
To:
#define MMCAM_TARGET_TIME_LIMIT 86400

...TIZEN\project\NX2000\packages\webkit-efl\Source\WebCore\platform\graphics\efl\CameraManagerPrivateMMFW.cpp
Change Line 703 from:
MMCAM_TARGET_TIME_LIMIT, maxTimeInSeconds,
To:
MMCAM_TARGET_TIME_LIMIT, 86400,

Still I'd prefer to find find out where the limit variables are ultimately initialized rather than changing the functions. I also don't really have the time to learn the compilation process on my own. At least this is a start for others who want to give it a shot.

Samsung NX2000 Samsung NX300M
If you believe there are incorrect tags, please send us this post using our feedback form.
ForumParentFirstPreviousNextNext unread
Flat view
ForumParentFirstPreviousNextNext unread
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark post MMy threads
Color scheme? Blue / Yellow