/**
+ * Structure for metadata of stream buffer.
+ */
+typedef struct {
+ unsigned long long ts_soe;
+ unsigned long long ts_eoe;
+ unsigned long long ts_sof;
+ unsigned long long ts_eof;
+ unsigned long long ts_hal;
+ unsigned long long ts_qmf;
+ unsigned long long ts_gst;
+ unsigned long long td_exp;
+ unsigned long long ts_aux;
+ unsigned long long td_aux;
+ unsigned long long seqnum;
+ unsigned long long flags;
+} MMCamcorderFrameMeta;
+
+
+/**
* Structure for video stream data.
*/
#define BUFFER_MAX_PLANE_NUM 4
int flip; /**< Flip */
int rotation; /**< Rotation */
unsigned long long timestamp_nsec; /**< timestamp of stream buffer(nsec) */
- unsigned long long ts_soe;
- unsigned long long ts_eoe;
- unsigned long long ts_sof;
- unsigned long long ts_eof;
- unsigned long long ts_hal;
- unsigned long long ts_qmf;
- unsigned long long ts_gst;
- unsigned long long td_exp;
- unsigned long long ts_aux;
- unsigned long long td_aux;
+ MMCamcorderFrameMeta frame_meta; /**< Metadata of stream buffer */
} MMCamcorderVideoStreamDataType;
static gboolean __mmcamcorder_frame_meta_foreach_func(GQuark field_id, const GValue *value, gpointer user_data)
{
MMCamcorderVideoStreamDataType *stream = (MMCamcorderVideoStreamDataType *)user_data;
+ MMCamcorderFrameMeta *frame_meta = NULL;
const char *field_name = g_quark_to_string(field_id);
guint64 field_value = g_value_get_uint64(value);
return TRUE;
}
+ frame_meta = &stream->frame_meta;
+
if (!strncmp("ts_soe", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->ts_soe = field_value;
- MMCAM_LOG_VERBOSE("[TS] SOE -> %llu", stream->ts_soe);
+ frame_meta->ts_soe = field_value;
+ MMCAM_LOG_VERBOSE("[TS] SOE -> %llu", frame_meta->ts_soe);
} else if (!strncmp("ts_eoe", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->ts_eoe = field_value;
- MMCAM_LOG_VERBOSE("[TS] EOE -> %llu", stream->ts_eoe);
+ frame_meta->ts_eoe = field_value;
+ MMCAM_LOG_VERBOSE("[TS] EOE -> %llu", frame_meta->ts_eoe);
} else if (!strncmp("ts_sof", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->ts_sof = field_value;
- MMCAM_LOG_VERBOSE("[TS] SOF -> %llu", stream->ts_sof);
+ frame_meta->ts_sof = field_value;
+ MMCAM_LOG_VERBOSE("[TS] SOF -> %llu", frame_meta->ts_sof);
} else if (!strncmp("ts_eof", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->ts_eof = field_value;
- MMCAM_LOG_VERBOSE("[TS] EOF -> %llu", stream->ts_eof);
+ frame_meta->ts_eof = field_value;
+ MMCAM_LOG_VERBOSE("[TS] EOF -> %llu", frame_meta->ts_eof);
} else if (!strncmp("ts_hal", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->ts_hal = field_value;
- MMCAM_LOG_VERBOSE("[TS] HAL -> %llu", stream->ts_hal);
+ frame_meta->ts_hal = field_value;
+ MMCAM_LOG_VERBOSE("[TS] HAL -> %llu", frame_meta->ts_hal);
} else if (!strncmp("ts_qmf", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->ts_qmf = field_value;
- MMCAM_LOG_VERBOSE("[TS] QMF -> %llu", stream->ts_qmf);
+ frame_meta->ts_qmf = field_value;
+ MMCAM_LOG_VERBOSE("[TS] QMF -> %llu", frame_meta->ts_qmf);
} else if (!strncmp("ts_gst", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->ts_gst = field_value;
- MMCAM_LOG_VERBOSE("[TS] GST -> %llu", stream->ts_gst);
+ frame_meta->ts_gst = field_value;
+ MMCAM_LOG_VERBOSE("[TS] GST -> %llu", frame_meta->ts_gst);
} else if (!strncmp("td_exp", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->td_exp = field_value;
- MMCAM_LOG_VERBOSE("[TD] EXP -> %llu", stream->td_exp);
+ frame_meta->td_exp = field_value;
+ MMCAM_LOG_VERBOSE("[TD] EXP -> %llu", frame_meta->td_exp);
} else if (!strncmp("ts_aux", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->ts_aux = field_value;
- MMCAM_LOG_VERBOSE("[TS] AUX -> %llu", stream->ts_aux);
+ frame_meta->ts_aux = field_value;
+ MMCAM_LOG_VERBOSE("[TS] AUX -> %llu", frame_meta->ts_aux);
} else if (!strncmp("td_aux", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
- stream->td_aux = field_value;
- MMCAM_LOG_VERBOSE("[TD] AUX -> %llu", stream->td_aux);
+ frame_meta->td_aux = field_value;
+ MMCAM_LOG_VERBOSE("[TD] AUX -> %llu", frame_meta->td_aux);
+ } else if (!strncmp("seqnum", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
+ frame_meta->seqnum = field_value;
+ MMCAM_LOG_VERBOSE("SEQNUM -> %llu", frame_meta->seqnum);
+ } else if (!strncmp("flags", field_name, META_TIMESTAMP_FIELD_LENGTH)) {
+ frame_meta->flags = field_value;
+ MMCAM_LOG_VERBOSE("FLAGS -> %llu", frame_meta->flags);
}
return TRUE;