NULL,
},
{
- MM_CAM_SOUND_STREAM_TYPE,
- "sound-stream-type",
- MMF_VALUE_TYPE_STRING,
- MM_ATTRS_FLAG_RW,
- {(void*)NULL},
- MM_ATTRS_VALID_TYPE_NONE,
- {0},
- {0},
- NULL,
- },
- {
MM_CAM_SOUND_STREAM_INDEX,
"sound-stream-index",
MMF_VALUE_TYPE_INT,
MM_ATTRS_VALID_TYPE_INT_RANGE,
{.int_min = -1},
{.int_max = _MMCAMCORDER_MAX_INT},
+ NULL,
+ },
+ {
+ MM_CAM_SOUND_STREAM_TYPE,
+ "sound-stream-type",
+ MMF_VALUE_TYPE_STRING,
+ MM_ATTRS_FLAG_RW,
+ {(void*)NULL},
+ MM_ATTRS_VALID_TYPE_NONE,
+ {0},
+ {0},
_mmcamcorder_commit_sound_stream_info,
},
{
if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "waylandsink")) {
_mmcam_dbg_log("Commit : display mode [%d]", value->value.i_val);
MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, "display-mode", value->value.i_val);
- return TRUE;
} else {
- _mmcam_dbg_warn("Commit : This element [%s] does not support display mode", videosink_name);
- return FALSE;
+ _mmcam_dbg_warn("[%s] does not support display mode, but no error", videosink_name);
}
+
+ return TRUE;
}
!strcmp(videosink_name, "evaspixmapsink") || !strcmp(videosink_name, "evasimagesink")) {
MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, "visible", value->value.i_val);
_mmcam_dbg_log("Set visible [%d] done.", value->value.i_val);
- return TRUE;
} else {
- _mmcam_dbg_warn("videosink[%s] does not support VISIBLE.", videosink_name);
- return FALSE;
+ _mmcam_dbg_warn("[%s] does not support VISIBLE, but no error", videosink_name);
}
+
+ return TRUE;
}
!strcmp(videosink_name, "evaspixmapsink") || !strcmp(videosink_name, "evasimagesink")) {
method = value->value.i_val;
MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, "display-geometry-method", method);
- return TRUE;
} else {
- _mmcam_dbg_warn("videosink[%s] does not support geometry method.", videosink_name);
- return FALSE;
+ _mmcam_dbg_warn("[%s] does not support geometry method, but no error", videosink_name);
}
+
+ return TRUE;
}
bool _mmcamcorder_commit_sound_stream_info(MMHandleType handle, int attr_idx, const mmf_value_t *value)
{
+ int stream_index = 0;
char *stream_type = NULL;
- int stream_type_len = 0;
_MMCamcorderSubContext *sc = NULL;
mmf_return_val_if_fail(handle && value, FALSE);
+ stream_type = value->value.s_val;
+ if (!stream_type) {
+ _mmcam_dbg_err("NULL string");
+ return FALSE;
+ }
+
sc = MMF_CAMCORDER_SUBCONTEXT(handle);
if (!sc || !sc->encode_element ||
!sc->encode_element[_MMCAMCORDER_AUDIOSRC_SRC].gst) {
}
mm_camcorder_get_attributes(handle, NULL,
- MMCAM_SOUND_STREAM_TYPE, &stream_type, &stream_type_len,
+ MMCAM_SOUND_STREAM_INDEX, &stream_index,
NULL);
-
- if (stream_type == NULL) {
- _mmcam_dbg_err("stream type is not set");
+ if (stream_index < 0) {
+ _mmcam_dbg_err("invalid stream index %d", stream_index);
return FALSE;
}
- _mmcam_dbg_log("Commit : sound stream info - type %s", stream_type);
+ _mmcam_dbg_log("Commit : sound stream info - type %s, index %d", stream_type, stream_index);
- return _mmcamcorder_set_sound_stream_info(sc->encode_element[_MMCAMCORDER_AUDIOSRC_SRC].gst, stream_type, value->value.i_val);
+ return _mmcamcorder_set_sound_stream_info(sc->encode_element[_MMCAMCORDER_AUDIOSRC_SRC].gst, stream_type, stream_index);
}