- if(_src != NULL)
- {
- video_meta_s *_dst = (video_meta_s*)calloc(1, sizeof(video_meta_s));
-
- if(_dst == NULL)
- {
-
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
-
- if(STRING_VALID(_src->media_id))
- {
- _dst->media_id = strdup(_src->media_id);
- if(_dst->media_id == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->title))
- {
- _dst->title = strdup(_src->title);
- if(_dst->title == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->album))
- {
- _dst->album = strdup(_src->album);
- if(_dst->album == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->artist))
- {
- _dst->artist = strdup(_src->artist);
- if(_dst->artist == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->album_artist))
- {
- _dst->album_artist = strdup(_src->album_artist);
- if(_dst->album_artist == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->genre))
- {
- _dst->genre = strdup(_src->genre);
- if(_dst->genre == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->composer))
- {
- _dst->composer = strdup(_src->composer);
- if(_dst->composer == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->year))
- {
- _dst->year = strdup(_src->year);
- if(_dst->year == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->recorded_date))
- {
- _dst->recorded_date = strdup(_src->recorded_date);
- if(_dst->recorded_date == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->copyright))
- {
- _dst->copyright = strdup(_src->copyright);
- if(_dst->copyright == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- if(STRING_VALID(_src->track_num))
- {
- _dst->track_num = strdup(_src->track_num);
- if(_dst->track_num == NULL)
- {
- video_meta_destroy((video_meta_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
- return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
- }
- }
-
- _dst->bitrate = _src->bitrate;
- _dst->duration = _src->duration;
- _dst->width = _src->width;
- _dst->height = _src->height;
- _dst->played_count = _src->played_count;
- _dst->played_time = _src->played_time;
- _dst->played_position = _src->played_position;
-
- *dst = (video_meta_h)_dst;
-
- ret = MEDIA_CONTENT_ERROR_NONE;
- }
- else
- {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
- ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
- }
-
- return ret;