MM_FILE_FORMAT_WMA, /**< WMA file format */
MM_FILE_FORMAT_WMV, /**< WMV file format */
MM_FILE_FORMAT_JPG, /**< JPEG file format */
- MM_FILE_FORMAT_FLAC, /**< FLAC file format */
+ MM_FILE_FORMAT_FLAC, /**< FLAC file format */
+ MM_FILE_FORMAT_M2TS, /**< MPEG2-Transport Stream file format */
+ MM_FILE_FORMAT_M2PS, /**< MPEG2-Program Stream file format */
+ MM_FILE_FORMAT_M1VIDEO, /**< MPEG1-Video file format */
+ MM_FILE_FORMAT_M1AUDIO, /**< MPEG1-Audio file format */
MM_FILE_FORMAT_NUM, /**< Number of file format type */
};
MM_PIXEL_FORMAT_ARGB, /**< ARGB pixel format */
MM_PIXEL_FORMAT_ENCODED, /**< Encoded pixel format */
MM_PIXEL_FORMAT_ITLV_JPEG_UYVY, /**< FIXME: JPEG+UYVY Interleaved format */
+ MM_PIXEL_FORMAT_ENCODED_H264, /**< Encoded H264 format */
MM_PIXEL_FORMAT_NUM /**< Number of the pixel format */
} MMPixelFormatType;
MM_DISPLAY_METHOD_CUSTOM_ROI_LETER_BOX
}MMDisplayGeometryMethodRoiMode;
+
+#define MM_VIDEO_BUFFER_PLANE_MAX 4 /**< Max num of video buffer plane */
+/*
+ * Enumerations of multimedia video buffer type
+ */
+typedef enum {
+ MM_VIDEO_BUFFER_TYPE_PHYSICAL_ADDRESS = 0,
+ MM_VIDEO_BUFFER_TYPE_DMABUF_FD,
+ MM_VIDEO_BUFFER_TYPE_TBM_BO
+} MMVideoBufferType;
+
+typedef struct {
+ void *paddr[MM_VIDEO_BUFFER_PLANE_MAX]; /**< physical address */
+ int dmabuf_fd[MM_VIDEO_BUFFER_PLANE_MAX]; /**< dmabuf fd */
+ void *bo[MM_VIDEO_BUFFER_PLANE_MAX]; /**< TBM bo */
+} MMVideoBufferHandle;
+
+/*
+ * Type definition of multimedia video buffer
+ */
+typedef struct {
+ MMVideoBufferType type; /**< buffer type
+ - The field of handle that type indicates should be filled,
+ and other fields of handle are optional. */
+ MMPixelFormatType format; /**< buffer type */
+ int plane_num; /**< number of planes */
+ int width[MM_VIDEO_BUFFER_PLANE_MAX]; /**< width of buffer */
+ int height[MM_VIDEO_BUFFER_PLANE_MAX]; /**< height of buffer */
+ int stride_width[MM_VIDEO_BUFFER_PLANE_MAX]; /**< stride width of buffer */
+ int stride_height[MM_VIDEO_BUFFER_PLANE_MAX]; /**< stride height of buffer */
+ int size[MM_VIDEO_BUFFER_PLANE_MAX]; /**< size of planes */
+ void *data[MM_VIDEO_BUFFER_PLANE_MAX]; /**< data pointer(user address) of planes */
+ int handle_num; /**< number of buffer handle */
+ int handle_size[MM_VIDEO_BUFFER_PLANE_MAX]; /**< size of handles */
+ MMVideoBufferHandle handle; /**< handle of buffer */
+ int is_secured; /**< secured buffer flag. ex) TrustZone memory, user can not access it. */
+ int flush_request; /**< flush request flag
+ - If this flag is TRUE, sink element will make copy of last buffer,
+ and it will return all buffers from src element.
+ Then, src element can restart without changing pipeline state. */
+} MMVideoBuffer;
+
+
#ifdef __cplusplus
}
#endif
*
*/
-
+
#include <stdio.h>
#include <string.h>
{
return_val_if_fail(item, false);
return_val_if_fail(item->value.type == MMF_VALUE_TYPE_INT, false);
-
+
bool valid = true;
int i = 0;
-
+
switch (item->value_spec.type) {
case MMF_VALUE_SPEC_INT_RANGE:
- if (val < item->value_spec.spec.int_spec.range.min ||
+ if (val < item->value_spec.spec.int_spec.range.min ||
val > item->value_spec.spec.int_spec.range.max) {
valid = false;
//mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of range\n", item->name);
}
break;
default:
- break;
+ break;
}
-
+
return valid;
}
{
return_val_if_fail(item, false);
return_val_if_fail(item->value.type == MMF_VALUE_TYPE_DOUBLE, false);
-
+
bool valid = true;
int i = 0;
-
+
switch (item->value_spec.type) {
case MMF_VALUE_SPEC_DOUBLE_RANGE:
- if (val < item->value_spec.spec.double_spec.range.min ||
+ if (val < item->value_spec.spec.double_spec.range.min ||
val > item->value_spec.spec.double_spec.range.max) {
valid = false;
//mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of range\n", item->name);
}
break;
default:
- break;
+ break;
}
-
+
return valid;
}
return_val_if_fail(item, -1);
if (mmf_value_set_string(&item->tmpval, string,size) == 0) {
- if (string)
- item->flags |= MM_ATTRS_FLAG_MODIFIED;
-
+ if (string)
+ item->flags |= MM_ATTRS_FLAG_MODIFIED;
+
return 0;
}
return -1;
attrs->count = count;
attrs->items = (mmf_attribute_t *) malloc (sizeof(mmf_attribute_t) * count);
-
if(attrs->items == NULL) {
- debug_error("Failed to malloc for attrs->items.");
- free(attrs);
- attrs=NULL;
- return 0;
- }
+ debug_error("Failed to malloc for attrs->items.");
+ free(attrs);
+ attrs=NULL;
+ return 0;
+ }
memset(attrs->items, 0, sizeof(mmf_attribute_t) * count);
int mmf_attrs_commit(MMHandleType h)
{
return_val_if_fail(h, -1);
-
+
mmf_attrs_t *attrs = (mmf_attrs_t * )h;
int i;
int ret = 0;