, __flashModeValue(CAMERA_FLASH_MODE_AUTO)
, __sceneModeValue(CAMERA_SCENE_OFF)
{
-
+ memset(__elementIdArray, -1, SETTINGS_OPTION_COUNT);
}
CameraCaptureForm::~CameraCaptureForm(void)
return true;
}
+int
+CameraCaptureForm::GetElementIdForIndex(int index)
+{
+ if (index != -1)
+ {
+ return __elementIdArray[index];
+ }
+ else
+ {
+ return -1;
+ }
+}
+
CameraCaptureForm*
CameraCaptureForm::GetListener(void)
{
HidePopUp(__pPopupSetting);
if (&source == __pListViewSetting)
{
+ elementId = GetElementIdForIndex(index);
+
switch (elementId)
{
case ID_MENU_BRIGHTNESS:
{
result r = E_SUCCESS;
bool value = false;
+ int index = 0;
DeletePopup(&__pPopupSetting);
TryCatch(pData != null, ,"CAMERA_PRIMARY_SUPPORT_EXPOSURE E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+ __elementIdArray[index] = ID_MENU_EXPOSURE;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_SUPPORT_CONTRAST, value);
__pSettingItemArrayList->Add(*pData);
+ __elementIdArray[index] = ID_MENU_CONTRAST;
+ index++;
+
}
r = GetMediaCapability(CAMERA_PRIMARY_EFFECT);
if (r == E_SUCCESS)
TryCatch(pData != null, ,"CAMERA_PRIMARY_EFFECT E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_EFFECT;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_SUPPORT_ZOOM, value);
TryCatch(pData != null, ,"CAMERA_PRIMARY_SUPPORT_ZOOM E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_ZOOMLEVEL;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_PREVIEW_FRAMERATE);
__pSettingItemArrayList->Add(*pData);
+ __elementIdArray[index] = ID_MENU_FRAME_RATE;
+ index++;
+
}
r = GetMediaCapability(CAMERA_PRIMARY_SUPPORT_PREVIEW, value);
TryCatch(pData != null, ,"CAMERA_PRIMARY_SUPPORT_PREVIEW E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_PREVIEW_RESOLUTION;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_SUPPORT_CAPTURE, value);
TryCatch(pData != null, ,"CAMERA_PRIMARY_SUPPORT_CAPTURE E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_CAPTURE_RESOLUTION;
+ index++;
}
if (__isZeroShutterLag == false)
TryCatch(pData != null, ,"CAMERA_PRIMARY_PREVIEW_FORMAT E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_PREVIEW_FORMAT;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_SCENE_MODE);
TryCatch(pData != null, ,"CAMERA_PRIMARY_SCENE_MODE E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_SCENE_MODE;
+ index++;
}
// If scene mode is set, then don't show these options
TryCatch(pData != null, ,"CAMERA_PRIMARY_SUPPORT_BRIGHTNESS E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_BRIGHTNESS;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_ISO_LEVEL);
TryCatch(pData != null, ,"CAMERA_PRIMARY_ISO_LEVEL E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_ISOLEVEL;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
TryCatch(pData != null, ,"CAMERA_PRIMARY_WHITE_BALANCE E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_WHITEBALANCE;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_FOCUS_MODE);
TryCatch(pData != null, ,"CAMERA_PRIMARY_FOCUS_MODE E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_FOCUS_MODE;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_FLASH_MODE);
TryCatch(pData != null, ,"CAMERA_PRIMARY_FLASH_MODE E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_FLASH_MODE;
+ index++;
}
r = GetMediaCapability(CAMERA_PRIMARY_METERING_MODE);
TryCatch(pData != null, ,"CAMERA_PRIMARY_METERING_MODE E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_METERING_MODE;
+ index++;
}
}
__pSettingItemArrayList->Add(*pData);
+ __elementIdArray[index] = ID_MENU_CAPTURE_QUALITY;
+ index++;
+
r = AddListView(&__pListViewSetting, __pPopupSetting, ID_BUTTON_SETTING_OK);
TryCatch(r == E_SUCCESS, ,"[%s] AddListView", GetErrorMessage(r));
}
#include <FUixSensorISensorEventListener.h>
#include "MultiForm.h"
+static const int SETTINGS_OPTION_COUNT = 20;
+
class CameraCaptureForm
: public MultiForm
, public Tizen::Media::ICameraEventListener
void ShowCapturedImageThumbnail(String* pFileName);
Tizen::Graphics::PixelFormat GetPreviewFormat(const int& previewFormatValue);
+ int GetElementIdForIndex(int index);
+
bool IsBatteryLevelLow(void);
private:
//Do not change the e-num order, if any new things are to be added add to the end of the list
int __fileCount;
int __iconListCount;
int __iconListIndex;
+ int __elementIdArray[SETTINGS_OPTION_COUNT];
bool __batteryLevelFlag;
bool __background;
, __sceneModeValue(CAMERA_SCENE_OFF)
, __cameraError(CAMERA_ERROR_NONE)
{
+ memset(__elementIdArray, -1, SETTINGS_MENU_OPTION_COUNT);
}
VideoRecorderForm::~VideoRecorderForm(void)
__pOverlay->Show();
}
+int
+VideoRecorderForm::GetElementIdForIndex(int index)
+{
+ if (index != -1)
+ {
+ return __elementIdArray[index];
+ }
+ else
+ {
+ return -1;
+ }
+}
+
void
VideoRecorderForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& source, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
{
}
else if (&source == __pListViewSetting)
{
+ elementId = GetElementIdForIndex(index);
+
HidePopUp(__pPopupSetting);
switch (elementId)
{
{
result r = E_SUCCESS;
bool value = false;
+ int index = 0;
DeletePopup(&__pPopupSetting);
if (__pPopupSetting == null)
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Brightness"), (int) ID_MENU_BRIGHTNESS);
__pSettingItemArrayList->Add(*pData);
+ __elementIdArray[index] = ID_MENU_BRIGHTNESS;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Focus Mode"), (int) ID_MENU_FOCUSMODE);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_FOCUSMODE;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"IsoLevel"), (int) ID_MENU_ISOLEVEL);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_ISOLEVEL;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"WhiteBalance"), (int) ID_MENU_WHITEBALANCE);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_WHITEBALANCE;
+ index++;
}
}
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Scene Mode"), (int) ID_MENU_SCENE_MODE);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_SCENE_MODE;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Exposure"), (int) ID_MENU_EXPOSURE);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_EXPOSURE;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Contrast"), (int) ID_MENU_CONTRAST);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_CONTRAST;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Effect"), (int) ID_MENU_EFFECT);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_EFFECT;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"ZoomLevel"), (int) ID_MENU_ZOOMLEVEL);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_ZOOMLEVEL;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Frame Rate"), (int) ID_MENU_FRAME_RATE);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_FRAME_RATE;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Flip Type"), (int) ID_MENU_FLIP_TYPE);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_FLIP_TYPE;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Recording Resolution"), (int) ID_MENU_RECORDING_RESOLUTION);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_RECORDING_RESOLUTION;
+ index++;
}
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Recording Quality"), (int) ID_MENU_RECORDING_QUALITY);
__pSettingItemArrayList->Add(*pData);
+ __elementIdArray[index] = ID_MENU_RECORDING_QUALITY;
+ index++;
+
r = GetMediaCapability(VIDEORECORDER_VIDEO_CODEC);
if (r == E_SUCCESS)
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Video Codec"), (int) ID_MENU_VIDEO_CODEC);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_VIDEO_CODEC;
+ index++;
}
r = GetMediaCapability(VIDEORECORDER_AUDIO_CODEC);
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Audio Codec"), (int) ID_MENU_AUDIO_CODEC);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_AUDIO_CODEC;
+ index++;
}
r = GetMediaCapability(VIDEORECORDER_FORMAT);
{
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"File Format"), (int) ID_MENU_FILE_FORMAT);
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_FILE_FORMAT;
+ index++;
}
if (__camType == CAMERA_PRIMARY)
TryCatch(pData != null, ,"CAMERA_PRIMARY_PREVIEW_FORMAT E_OUT_OF_MEMORY");
__pSettingItemArrayList->Add(*pData);
+
+ __elementIdArray[index] = ID_MENU_PREVIEW_FORMAT;
+ index++;
}
//Add stream callback
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Audio Pre-Processing"), (int) ID_MENU_AUDIO_STREAM_CALLBACK);
__pSettingItemArrayList->Add(*pData);
+ __elementIdArray[index] = ID_MENU_AUDIO_STREAM_CALLBACK;
+ index++;
+
//Add stream callback
pData = new (std::nothrow) SettingListData(new (std::nothrow) String(L"Video Pre-Processing"), (int) ID_MENU_VIDEO_STREAM_CALLBACK);
__pSettingItemArrayList->Add(*pData);
+ __elementIdArray[index] = ID_MENU_VIDEO_STREAM_CALLBACK;
+ index++;
+
r = AddListView(&__pListViewSetting, __pPopupSetting, ID_BUTTON_SETTING_OK);
TryCatch(r == E_SUCCESS, ,"[%s] AddListView - Settings", GetErrorMessage(r));
RECORDER_STATE_PAUSE,
} RecorderFormState;
+static const int SETTINGS_MENU_OPTION_COUNT = 20;
+
class VideoRecorderForm
: public MultiForm
, public Tizen::Media::ICameraEventListener
virtual void ProcessAudioStream(Tizen::Media::AudioFrame& frame);
//IVideoStreamFilter
virtual void ProcessVideoStream(Tizen::Media::VideoFrame &frame);
+ int GetElementIdForIndex(int index);
private:
bool CreateEffect(void);
int __brightnessSliderValue;
int __contrastSliderValue;
int __exposureSliderValue;
+ int __elementIdArray[SETTINGS_MENU_OPTION_COUNT];
bool __backGround;
bool __previewByCallback;