/* Get videosink name */
_mmcamcorder_conf_get_value_element_name(sc->VideosinkElement, &videosink_name);
+ if (!videosink_name) {
+ _mmcam_dbg_err("failed to get videosink name");
+ goto pipeline_creation_error;
+ }
+
_MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_VIDEOSINK_QUE, "queue", "videosink_queue", element_list, err);
_mmcam_dbg_log("videosink_name: %s", videosink_name);
const char *audiosrc_name = NULL;
char *cat_name = NULL;
char *stream_type = NULL;
- char stream_type_len = 0;
+ int stream_type_len = 0;
int stream_index = 0;
int buffer_interval = 0;
int blocksize = 0;
int _mmcamcorder_create_encodesink_bin(MMHandleType handle, MMCamcorderEncodebinProfile profile)
{
int err = MM_ERROR_NONE;
- int file_name_len = 0;
int channel = 0;
int audio_enc = 0;
int v_bitrate = 0;
const char *str_aar = NULL;
const char *str_acs = NULL;
char *err_name = NULL;
- char *file_name = NULL;
const char *videoconvert_name = NULL;
GstCaps *audio_caps = NULL;
GstCaps *video_caps = NULL;
caps_from_pad = NULL;
gst_object_unref(pad);
pad = NULL;
+
+ /* fixate caps */
+ video_caps = gst_caps_fixate(video_caps);
} else {
/* Image */
MMCAMCORDER_G_OBJECT_GET(sc->element[_MMCAMCORDER_VIDEOSRC_FILT].gst, "caps", &video_caps);
MMCAM_AUDIO_CHANNEL, &channel,
MMCAM_VIDEO_ENCODER_BITRATE, &v_bitrate,
MMCAM_AUDIO_ENCODER_BITRATE, &a_bitrate,
- MMCAM_TARGET_FILENAME, &file_name, &file_name_len,
NULL);
if (err != MM_ERROR_NONE) {
/* Sink */
if (profile != MM_CAMCORDER_ENCBIN_PROFILE_IMAGE) {
/* for recording */
- if (file_name) {
- _mmcamcorder_conf_get_element(handle, hcamcorder->conf_main,
- CONFIGURE_CATEGORY_MAIN_RECORD,
- "RecordsinkElement",
- &RecordsinkElement);
- _mmcamcorder_conf_get_value_element_name(RecordsinkElement, &gst_element_rsink_name);
+ _mmcamcorder_conf_get_element(handle, hcamcorder->conf_main,
+ CONFIGURE_CATEGORY_MAIN_RECORD,
+ "RecordsinkElement",
+ &RecordsinkElement);
+ _mmcamcorder_conf_get_value_element_name(RecordsinkElement, &gst_element_rsink_name);
- _MMCAMCORDER_ELEMENT_MAKE(sc, sc->encode_element, _MMCAMCORDER_ENCSINK_SINK, gst_element_rsink_name, NULL, element_list, err);
+ _MMCAMCORDER_ELEMENT_MAKE(sc, sc->encode_element, _MMCAMCORDER_ENCSINK_SINK, gst_element_rsink_name, NULL, element_list, err);
- _mmcamcorder_conf_set_value_element_property(sc->encode_element[_MMCAMCORDER_ENCSINK_SINK].gst, RecordsinkElement);
- } else {
- /* if file_name is not set, add fakesink for muxed stream callback */
- _MMCAMCORDER_ELEMENT_MAKE(sc, sc->encode_element, _MMCAMCORDER_ENCSINK_SINK, "fakesink", NULL, element_list, err);
- }
+ _mmcamcorder_conf_set_value_element_property(sc->encode_element[_MMCAMCORDER_ENCSINK_SINK].gst, RecordsinkElement);
} else {
/* for stillshot */
_MMCAMCORDER_ELEMENT_MAKE(sc, sc->encode_element, _MMCAMCORDER_ENCSINK_SINK, "fakesink", NULL, element_list, err);
_mmcamcorder_conf_get_value_element_name(VideosinkElement, &videosink_name);
+ if (!videosink_name) {
+ _mmcam_dbg_err("failed to get videosink name");
+ return MM_ERROR_CAMCORDER_INTERNAL;
+ }
+
_mmcam_dbg_log("(overlay=%p, size=%d)", overlay, size);
/* Set display handle */
stream.data.yuv420sp.uv = mm_buf->data[1];
stream.data.yuv420sp.length_uv = stream.data.yuv420sp.length_y >> 1;
/*
- _mmcam_dbg_log("format[%d][num_planes:%d] [Y]p:0x%x,size:%d [UV]p:0x%x,size:%d",
+ _mmcam_dbg_log("format[%d][num_planes:%d] [Y]p:%p,size:%d [UV]p:%p,size:%d",
stream.format, stream.num_planes,
stream.data.yuv420sp.y, stream.data.yuv420sp.length_y,
stream.data.yuv420sp.uv, stream.data.yuv420sp.length_uv);
stream.data.yuv420p.v = mm_buf->data[2];
stream.data.yuv420p.length_v = stream.data.yuv420p.length_u;
/*
- _mmcam_dbg_log("S420[num_planes:%d] [Y]p:0x%x,size:%d [U]p:0x%x,size:%d [V]p:0x%x,size:%d",
+ _mmcam_dbg_log("S420[num_planes:%d] [Y]p:%p,size:%d [U]p:%p,size:%d [V]p:%p,size:%d",
stream.num_planes,
stream.data.yuv420p.y, stream.data.yuv420p.length_y,
stream.data.yuv420p.u, stream.data.yuv420p.length_u,
stream.stride[1] = stream.width;
stream.elevation[1] = stream.height >> 1;
/*
- _mmcam_dbg_log("format[%d][num_planes:%d] [Y]p:0x%x,size:%d [UV]p:0x%x,size:%d",
+ _mmcam_dbg_log("format[%d][num_planes:%d] [Y]p:%p,size:%d [UV]p:%p,size:%d",
stream.format, stream.num_planes,
stream.data.yuv420sp.y, stream.data.yuv420sp.length_y,
stream.data.yuv420sp.uv, stream.data.yuv420sp.length_uv);
stream.stride[2] = stream.width >> 1;
stream.elevation[2] = stream.height >> 1;
/*
- _mmcam_dbg_log("I420[num_planes:%d] [Y]p:0x%x,size:%d [U]p:0x%x,size:%d [V]p:0x%x,size:%d",
+ _mmcam_dbg_log("I420[num_planes:%d] [Y]p:%p,size:%d [U]p:%p,size:%d [V]p:%p,size:%d",
stream.num_planes,
stream.data.yuv420p.y, stream.data.yuv420p.length_y,
stream.data.yuv420p.u, stream.data.yuv420p.length_u,
stream.data_type = MM_CAM_STREAM_DATA_ENCODED;
stream.data.encoded.data = mapinfo.data;
stream.data.encoded.length_data = stream.length_total;
- _mmcam_dbg_log("H264[num_planes:%d] [0]p:0x%x,size:%d",
- fourcc, fourcc>>8, fourcc>>16, fourcc>>24, stream.num_planes,
- stream.data.encoded.data, stream.data.encoded.length_data);
+ /*
+ _mmcam_dbg_log("H264[num_planes:%d] [0]p:%p,size:%d",
+ stream.num_planes, stream.data.encoded.data, stream.data.encoded.length_data);
+ */
} else {
stream.data_type = MM_CAM_STREAM_DATA_YUV420;
stream.data.yuv420.yuv = mapinfo.data;
stream.num_planes = 1;
/*
- _mmcam_dbg_log("%c%c%c%c[num_planes:%d] [0]p:0x%x,size:%d",
+ _mmcam_dbg_log("%c%c%c%c[num_planes:%d] [0]p:%p,size:%d",
fourcc, fourcc>>8, fourcc>>16, fourcc>>24,
stream.num_planes, stream.data.yuv420.yuv, stream.data.yuv420.length_yuv);
*/
_mmcam_dbg_log("EOS signal received");
} else {
_mmcam_dbg_err("EOS wait time out");
+
+ if (hcamcorder->error_code == MM_ERROR_NONE)
+ hcamcorder->error_code = MM_ERROR_CAMCORDER_RESPONSE_TIMEOUT;
}
} else {
_mmcam_dbg_log("already got EOS");
if (sc->info_image->preview_format == MM_PIXEL_FORMAT_NV12 && video_width >= 1080 && video_height >= 720) {
_mmcam_dbg_log("NV12, video size %dx%d, ENABLE video stabilization",
- video_width, video_height, stabilization);
+ video_width, video_height);
/* set vdis mode */
g_object_set(G_OBJECT(v_src),
"enable-vdis-mode", TRUE,
CameraControl = GST_CAMERA_CONTROL(sc->element[_MMCAMCORDER_VIDEOSRC_SRC].gst);
controls = gst_camera_control_list_channels(CameraControl);
- _mmcam_dbg_log("controls : 0x%x", controls);
+ _mmcam_dbg_log("controls : %p", controls);
if (controls != NULL) {
- _mmcam_dbg_log("controls : 0x%x", controls);
for (item = controls ; item && item->data ; item = item->next) {
CameraControlChannel = item->data;
- _mmcam_dbg_log("label : %d", CameraControlChannel->label);
+ _mmcam_dbg_log("label : %s", CameraControlChannel->label);
if (!strcmp(CameraControlChannel->label, "bitrate")) {
_mmcam_dbg_log("set encoded preview bitrate %d", bitrate);
return gst_camera_control_set_value(CameraControl, CameraControlChannel, bitrate);
}
}
- if (item == NULL) {
- _mmcam_dbg_warn("failed to find \"bitrate\" control channel");
- }
+ _mmcam_dbg_warn("failed to find \"bitrate\" control channel");
}
return FALSE;