-static __thread media_noti_cb_s *g_noti_info = NULL;
-
-#if 0
-static int __media_content_create_attr_handle(void);
-static int __media_content_create_alias_attr_handle(void);
-static int __media_content_create_attribute_handle(void);
-#endif
-static int __media_content_create_attribute_handles(void);
-static int __media_content_destroy_attribute_handle(void);
-
-typedef struct {
- char *user_attr;
- char *platform_attr;
- char *platform_alias_attr;
-} media_content_attribute_info_s;
-
-static media_content_attribute_info_s g_content_attrs_info[] = {
- /* Media Info */
- {MEDIA_ID, DB_FIELD_MEDIA_ID, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ID},
- {MEDIA_PATH, DB_FIELD_MEDIA_PATH, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_PATH},
- {MEDIA_DISPLAY_NAME, DB_FIELD_MEDIA_DISPLAY_NAME, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_DISPLAY_NAME},
- {MEDIA_TYPE, DB_FIELD_MEDIA_TYPE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_TYPE},
- {MEDIA_MIME_TYPE, DB_FIELD_MEDIA_MIME_TYPE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_MIME_TYPE},
- {MEDIA_SIZE, DB_FIELD_MEDIA_SIZE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_SIZE},
- {MEDIA_ADDED_TIME, DB_FIELD_MEDIA_ADDED_TIME, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ADDED_TIME},
- {MEDIA_MODIFIED_TIME, DB_FIELD_MEDIA_MODIFIED_TIME, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_MODIFIED_TIME},
- {MEDIA_TIMELINE, DB_FIELD_MEDIA_TIMELINE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_TIMELINE},
- {MEDIA_THUMBNAIL_PATH, DB_FIELD_MEDIA_THUMBNAIL_PATH, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_THUMBNAIL_PATH},
- {MEDIA_TITLE, DB_FIELD_MEDIA_TITLE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_TITLE},
- {MEDIA_ALBUM, DB_FIELD_MEDIA_ALBUM, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ALBUM},
- {MEDIA_ARTIST, DB_FIELD_MEDIA_ARTIST, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ARTIST},
- {MEDIA_ALBUM_ARTIST, DB_FIELD_MEDIA_ALBUM_ARTIST, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ALBUM_ARTIST},
- {MEDIA_GENRE, DB_FIELD_MEDIA_GENRE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_GENRE},
- {MEDIA_COMPOSER, DB_FIELD_MEDIA_COMPOSER, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_COMPOSER},
- {MEDIA_YEAR, DB_FIELD_MEDIA_YEAR, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_YEAR},
- {MEDIA_RECORDED_DATE, DB_FIELD_MEDIA_RECORDED_DATE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_RECORDED_DATE},
- {MEDIA_COPYRIGHT, DB_FIELD_MEDIA_COPYRIGHT, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_COPYRIGHT},
- {MEDIA_TRACK_NUM, DB_FIELD_MEDIA_TRACK_NUM, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_TRACK_NUM},
- {MEDIA_DESCRIPTION, DB_FIELD_MEDIA_DESCRIPTION, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_DESCRIPTION},
- {MEDIA_BITRATE, DB_FIELD_MEDIA_BITRATE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_BITRATE},
- {MEDIA_BITPERSAMPLE, DB_FIELD_MEDIA_BITPERSAMPLE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_BITPERSAMPLE},
- {MEDIA_SAMPLERATE, DB_FIELD_MEDIA_SAMPLERATE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_SAMPLERATE},
- {MEDIA_CHANNEL, DB_FIELD_MEDIA_CHANNEL, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_CHANNEL},
- {MEDIA_DURATION, DB_FIELD_MEDIA_DURATION, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_DURATION},
- {MEDIA_LONGITUDE, DB_FIELD_MEDIA_LONGITUDE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_LONGITUDE},
- {MEDIA_LATITUDE, DB_FIELD_MEDIA_LATITUDE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_LATITUDE},
- {MEDIA_ALTITUDE, DB_FIELD_MEDIA_ALTITUDE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ALTITUDE},
- {MEDIA_WIDTH, DB_FIELD_MEDIA_WIDTH, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_WIDTH},
- {MEDIA_HEIGHT, DB_FIELD_MEDIA_HEIGHT, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_HEIGHT},
- {MEDIA_DATETAKEN, DB_FIELD_MEDIA_DATETAKEN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_DATETAKEN},
- {MEDIA_ORIENTATION, DB_FIELD_MEDIA_ORIENTATION, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ORIENTATION},
- {MEDIA_BURST_ID, DB_FIELD_MEDIA_BURST_ID, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_BURST_ID},
- {MEDIA_PLAYED_COUNT, DB_FIELD_MEDIA_PLAYED_COUNT, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_PLAYED_COUNT},
- {MEDIA_LAST_PLAYED_TIME, DB_FIELD_MEDIA_LAST_PLAYED_TIME, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_LAST_PLAYED_TIME},
- {MEDIA_LAST_PLAYED_POSITION, DB_FIELD_MEDIA_LAST_PLAYED_POSITION, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_LAST_PLAYED_POSITION},
- {MEDIA_RATING, DB_FIELD_MEDIA_RATING, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_RATING},
- {MEDIA_FAVOURITE, DB_FIELD_MEDIA_FAVOURITE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_FAVOURITE},
- {MEDIA_AUTHOR, DB_FIELD_MEDIA_AUTHOR, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_AUTHOR},
- {MEDIA_PROVIDER, DB_FIELD_MEDIA_PROVIDER, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_PROVIDER},
- {MEDIA_CONTENT_NAME, DB_FIELD_MEDIA_CONTENT_NAME, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_CONTENT_NAME},
- {MEDIA_CATEGORY, DB_FIELD_MEDIA_CATEGORY, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_CATEGORY},
- {MEDIA_LOCATION_TAG, DB_FIELD_MEDIA_LOCATION_TAG, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_LOCATION_TAG},
- {MEDIA_AGE_RATING, DB_FIELD_MEDIA_AGE_RATING, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_AGE_RATING},
- {MEDIA_KEYWORD, DB_FIELD_MEDIA_KEYWORD, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_KEYWORD},
- {MEDIA_WEATHER, DB_FIELD_MEDIA_WEATHER, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_WEATHER},
- {MEDIA_IS_DRM, DB_FIELD_MEDIA_IS_DRM, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_IS_DRM},
- {MEDIA_STORAGE_TYPE, DB_FIELD_MEDIA_STORAGE_TYPE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_STORAGE_TYPE},
- {MEDIA_360, DB_FIELD_MEDIA_360, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_360},
-
- /* Pinyin */
- {MEDIA_FILE_NAME_PINYIN, DB_FIELD_MEDIA_FILE_NAME_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_FILE_NAME_PINYIN},
- {MEDIA_TITLE_PINYIN, DB_FIELD_MEDIA_TITLE_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_TITLE_PINYIN},
- {MEDIA_ALBUM_PINYIN, DB_FIELD_MEDIA_ALBUM_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ALBUM_PINYIN},
- {MEDIA_ARTIST_PINYIN, DB_FIELD_MEDIA_ARTIST_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ARTIST_PINYIN},
- {MEDIA_ALBUM_ARTIST_PINYIN, DB_FIELD_MEDIA_ALBUM_ARTIST_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_ALBUM_ARTIST_PINYIN},
- {MEDIA_GENRE_PINYIN, DB_FIELD_MEDIA_GENRE_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_GENRE_PINYIN},
- {MEDIA_COMPOSER_PINYIN, DB_FIELD_MEDIA_COMPOSER_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_COMPOSER_PINYIN},
- {MEDIA_COPYRIGHT_PINYIN, DB_FIELD_MEDIA_COPYRIGHT_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_COPYRIGHT_PINYIN},
- {MEDIA_DESCRIPTION_PINYIN, DB_FIELD_MEDIA_DESCRIPTION_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_DESCRIPTION_PINYIN},
- {MEDIA_AUTHOR_PINYIN, DB_FIELD_MEDIA_AUTHOR_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_AUTHOR_PINYIN},
- {MEDIA_PROVIDER_PINYIN, DB_FIELD_MEDIA_PROVIDER_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_PROVIDER_PINYIN},
- {MEDIA_CONTENT_NAME_PINYIN, DB_FIELD_MEDIA_CONTENT_NAME_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_CONTENT_NAME_PINYIN},
- {MEDIA_CATEGORY_PINYIN, DB_FIELD_MEDIA_CATEGORY_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_CATEGORY_PINYIN},
- {MEDIA_LOCATION_TAG_PINYIN, DB_FIELD_MEDIA_LOCATION_TAG_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_LOCATION_TAG_PINYIN},
- {MEDIA_AGE_RATING_PINYIN, DB_FIELD_MEDIA_AGE_RATING_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_AGE_RATING_PINYIN},
- {MEDIA_KEYWORD_PINYIN, DB_FIELD_MEDIA_KEYWORD_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_KEYWORD_PINYIN},
-
- /* Folder */
- {FOLDER_ID, NULL, DB_TABLE_ALIAS_FOLDER"."DB_FIELD_FOLDER_ID},
- {FOLDER_PATH, NULL, DB_TABLE_ALIAS_FOLDER"."DB_FIELD_FOLDER_PATH},
- {FOLDER_NAME, NULL, DB_TABLE_ALIAS_FOLDER"."DB_FIELD_FOLDER_NAME},
- {FOLDER_MODIFIED_TIME, NULL, DB_TABLE_ALIAS_FOLDER"."DB_FIELD_FOLDER_MODIFIED_TIME},
- {FOLDER_STORAGE_TYPE, NULL, DB_TABLE_ALIAS_FOLDER"."DB_FIELD_FOLDER_STORAGE_TYPE},
- {FOLDER_NAME_PINYIN, NULL, DB_TABLE_ALIAS_FOLDER"."DB_FIELD_FOLDER_NAME_PINYIN},
- {FOLDER_ORDER, NULL, DB_TABLE_ALIAS_FOLDER"."DB_FIELD_FOLDER_ORDER},
- {FOLDER_PARENT_FOLDER_ID, NULL, DB_TABLE_ALIAS_FOLDER"."DB_FIELD_FOLDER_PARENT_FOLDER_ID},
-
- /* Playlist */
- {MEDIA_PLAYLIST_ID, DB_FIELD_PLAYLIST_ID, NULL},
- {PLAYLIST_NAME, DB_FIELD_PLAYLIST_NAME, DB_TABLE_ALIAS_PLAYLIST"."DB_FIELD_PLAYLIST_NAME},
- {PLAYLIST_MEMBER_ORDER, DB_FIELD_PLAYLIST_MEMBER_ORDER, DB_TABLE_ALIAS_PLAYLIST_MAP"."DB_FIELD_PLAYLIST_MEMBER_ORDER},
-
- /* Playlist View */
- {PLAYLIST_MEDIA_COUNT, DB_FIELD_PLAYLIST_MEDIA_COUNT, NULL},
-
- /* Tag */
- {MEDIA_TAG_ID, DB_FIELD_TAG_ID, NULL},
- {TAG_NAME, DB_FIELD_TAG_NAME, DB_TABLE_ALIAS_TAG"."DB_FIELD_TAG_NAME},
-
- /* Tag View */
- {TAG_MEDIA_COUNT, DB_FIELD_TAG_MEDIA_COUNT, NULL},
-
- /* Bookmark */
- {MEDIA_BOOKMARK_ID, DB_FIELD_BOOKMARK_ID, DB_TABLE_ALIAS_BOOKMARK"."DB_FIELD_BOOKMARK_ID},
- {BOOKMARK_MARKED_TIME, DB_FIELD_BOOKMARK_MARKED_TIME, DB_TABLE_ALIAS_BOOKMARK"."DB_FIELD_BOOKMARK_MARKED_TIME},
- {BOOKMARK_NAME, DB_FIELD_BOOKMARK_NAME, DB_TABLE_ALIAS_BOOKMARK"."DB_FIELD_BOOKMARK_NAME},
-
- /* Storage */
- {MEDIA_STORAGE_ID, DB_FIELD_STORAGE_ID, NULL},
- {MEDIA_STORAGE_PATH, DB_FIELD_STORAGE_PATH, NULL},
-
- /* Face */
- {MEDIA_FACE_ID, DB_FIELD_FACE_ID, DB_TABLE_ALIAS_FACE"."DB_FIELD_FACE_ID},
- {MEDIA_FACE_TAG, DB_FIELD_FACE_TAG, DB_TABLE_ALIAS_FACE"."DB_FIELD_FACE_TAG},
-
-#ifdef _USE_SENIOR_MODE
- {MEDIA_CONTACT, DB_FIELD_MEDIA_CONTACT, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_CONTACT},
- {MEDIA_APP_DATA, DB_FIELD_MEDIA_APP_DATA, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_APP_DATA},
-#endif
-#ifdef _USE_TV_PROFILE
- {MEDIA_FOLDER_ID, DB_FIELD_MEDIA_FOLDER_ID, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_FOLDER_ID},
- {MEDIA_STITCHED_INFO, DB_FIELD_MEDIA_STITCHED_INFO, NULL},
- {MEDIA_MODIFIED_MONTH, DB_FIELD_MEDIA_MODIFIED_MONTH, NULL},
- {MEDIA_MODIFIED_DATE, DB_FIELD_MEDIA_MODIFIED_DATE, NULL},
-
- /* PVR */
- {PVR_DURATION, DB_FIELD_PVR_DURATION, NULL},
- {PVR_TIME_ZONE, DB_FIELD_PVR_TIME_ZONE, NULL},
- {PVR_PTC, DB_FIELD_PVR_PTC, NULL},
- {PVR_MAJOR, DB_FIELD_PVR_MAJOR, NULL},
- {PVR_MINOR, DB_FIELD_PVR_MINOR, NULL},
- {PVR_CHANNEL_TYPE, DB_FIELD_PVR_CHANNEL_TYPE, NULL},
- {PVR_CHANNEL_NAME, DB_FIELD_PVR_CHANNEL_NAME, NULL},
- {PVR_CHANNEL_NUM, DB_FIELD_PVR_CHANNEL_NUM, NULL},
- {PVR_PROGRAM_TITLE, DB_FIELD_PVR_PROGRAM_TITLE, NULL},
- {PVR_PROGRAM_NUM, DB_FIELD_PVR_PROGRAM_NUM, NULL},
- {PVR_PROGRAM_CRID, DB_FIELD_PVR_PROGRAM_CRID, NULL},
- {PVR_GUIDANCE, DB_FIELD_PVR_GUIDANCE, NULL},
- {PVR_SYNOPSIS, DB_FIELD_PVR_SYNOPSIS, NULL},
- {PVR_GENRE, DB_FIELD_PVR_GENRE, NULL},
- {PVR_LANGUAGE, DB_FIELD_PVR_LANGUAGE, NULL},
- {PVR_EMBARGO_TIME, DB_FIELD_PVR_EMBARGO_TIME, NULL},
- {PVR_EXPIRY_TIME, DB_FIELD_PVR_EXPIRY_TIME, NULL},
- {PVR_START_TIME, DB_FIELD_PVR_START_TIME, NULL},
- {PVR_PROGRAM_START_TIME, DB_FIELD_PVR_PROGRAM_START_TIME, NULL},
- {PVR_PROGRAM_END_TIME, DB_FIELD_PVR_PROGRAM_END_TIME, NULL},
- {PVR_PROGRAM_DATE, DB_FIELD_PVR_PROGRAM_DATE, NULL},
- {PVR_PARENTAL_RATING, DB_FIELD_PVR_PARENTAL_RATING, NULL},
- {PVR_TIMER_RECORD, DB_FIELD_PVR_TIMER_RECORD, NULL},
- {PVR_SERIES_RECORD, DB_FIELD_PVR_SERIES_RECORD, NULL},
- {PVR_HD, DB_FIELD_PVR_HD, NULL},
- {PVR_SUBTITLE, DB_FIELD_PVR_SUBTITLE, NULL},
- {PVR_TTX, DB_FIELD_PVR_TTX, NULL},
- {PVR_AD, DB_FIELD_PVR_AD, NULL},
- {PVR_TTX, DB_FIELD_PVR_TTX, NULL},
- {PVR_DATA_SERVICE, DB_FIELD_PVR_DATA_SERVICE, NULL},
- {PVR_CONTENT_LOCK, DB_FIELD_PVR_CONTENT_LOCK, NULL},
- {PVR_CONTENT_WATCH, DB_FIELD_PVR_CONTENT_WATCH, NULL},
- {PVR_CONTENT_HAS_AUDIO_ONLY, DB_FIELD_PVR_HAS_AUDIO_ONLY, NULL},
- {PVR_CONTENT_IS_LOCAL_RECORD, DB_FIELD_PVR_IS_LOCAL_RECORD, NULL},
- {PVR_CONTENT_RESOLUTION, DB_FIELD_PVR_RESOLUTION, NULL},
- {PVR_CONTENT_ASPECTRATIO, DB_FIELD_PVR_ASPECTRATIO, NULL},
- {PVR_MODIFIED_MONTH, DB_FIELD_PVR_MODIFIED_DATE, NULL},
- {PVR_MODIFIED_DATE, DB_FIELD_PVR_MODIFIED_DATE, NULL},
- {PVR_SPORTS_TYPE, DB_FIELD_PVR_SPORTS_TYPE, NULL},
- {PVR_GUIDANCE_LENGTH, DB_FIELD_PVR_GUIDANCE_LENGTH, NULL},
- {PVR_TVMODE, DB_FIELD_PVR_TVMODE, NULL},
- {PVR_PLAY_COUNT, DB_FIELD_PVR_PLAY_COUNT, NULL},
- {PVR_PRIVATE_DATA, DB_FIELD_PVR_PRIVATE_DATA, NULL},
-
- /* UHD */
- {UHD_CONTENT_TITLE, DB_FIELD_UHD_CONTENT_TITLE, NULL},
- {UHD_RELEASE_DATE, DB_FIELD_UHD_RELEASE_DATE, NULL},
- {UHD_SUB_TYPE, DB_FIELD_UHD_SUB_TYPE, NULL},
- {UHD_FILE_NAME, DB_FIELD_UHD_FILE_NAME, NULL},
- {UHD_FOLDER_ID, DB_FIELD_FOLDER_ID, NULL},
- {UHD_PLAYED_COUNT, DB_FIELD_UHD_PLAYED_COUNT, NULL},
-#endif
-};
-
-#if 0
-static int __media_content_create_attr_handle(void)
-{
- int ret = MEDIA_CONTENT_ERROR_NONE;
-
- ret = _media_filter_attribute_create(&g_attr_handle);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* Media Info */
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ID, DB_FIELD_MEDIA_ID);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_PATH, DB_FIELD_MEDIA_PATH);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_DISPLAY_NAME, DB_FIELD_MEDIA_DISPLAY_NAME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_TYPE, DB_FIELD_MEDIA_TYPE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_MIME_TYPE, DB_FIELD_MEDIA_MIME_TYPE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_SIZE, DB_FIELD_MEDIA_SIZE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ADDED_TIME, DB_FIELD_MEDIA_ADDED_TIME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_MODIFIED_TIME, DB_FIELD_MEDIA_MODIFIED_TIME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_TIMELINE, DB_FIELD_MEDIA_TIMELINE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_THUMBNAIL_PATH, DB_FIELD_MEDIA_THUMBNAIL_PATH);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_TITLE, DB_FIELD_MEDIA_TITLE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ALBUM, DB_FIELD_MEDIA_ALBUM);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ARTIST, DB_FIELD_MEDIA_ARTIST);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ALBUM_ARTIST, DB_FIELD_MEDIA_ALBUM_ARTIST);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_GENRE, DB_FIELD_MEDIA_GENRE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_COMPOSER, DB_FIELD_MEDIA_COMPOSER);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_YEAR, DB_FIELD_MEDIA_YEAR);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_RECORDED_DATE, DB_FIELD_MEDIA_RECORDED_DATE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_COPYRIGHT, DB_FIELD_MEDIA_COPYRIGHT);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_TRACK_NUM, DB_FIELD_MEDIA_TRACK_NUM);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_DESCRIPTION, DB_FIELD_MEDIA_DESCRIPTION);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_BITRATE, DB_FIELD_MEDIA_BITRATE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_BITPERSAMPLE, DB_FIELD_MEDIA_BITPERSAMPLE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_SAMPLERATE, DB_FIELD_MEDIA_SAMPLERATE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_CHANNEL, DB_FIELD_MEDIA_CHANNEL);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_DURATION, DB_FIELD_MEDIA_DURATION);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_LONGITUDE, DB_FIELD_MEDIA_LONGITUDE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_LATITUDE, DB_FIELD_MEDIA_LATITUDE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ALTITUDE, DB_FIELD_MEDIA_ALTITUDE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_WIDTH, DB_FIELD_MEDIA_WIDTH);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_HEIGHT, DB_FIELD_MEDIA_HEIGHT);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_DATETAKEN, DB_FIELD_MEDIA_DATETAKEN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ORIENTATION, DB_FIELD_MEDIA_ORIENTATION);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_BURST_ID, DB_FIELD_MEDIA_BURST_ID);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_PLAYED_COUNT, DB_FIELD_MEDIA_PLAYED_COUNT);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_LAST_PLAYED_TIME, DB_FIELD_MEDIA_LAST_PLAYED_TIME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_LAST_PLAYED_POSITION, DB_FIELD_MEDIA_LAST_PLAYED_POSITION);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_RATING, DB_FIELD_MEDIA_RATING);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_FAVOURITE, DB_FIELD_MEDIA_FAVOURITE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_AUTHOR, DB_FIELD_MEDIA_AUTHOR);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_PROVIDER, DB_FIELD_MEDIA_PROVIDER);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_CONTENT_NAME, DB_FIELD_MEDIA_CONTENT_NAME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_CATEGORY, DB_FIELD_MEDIA_CATEGORY);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_LOCATION_TAG, DB_FIELD_MEDIA_LOCATION_TAG);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_AGE_RATING, DB_FIELD_MEDIA_AGE_RATING);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_KEYWORD, DB_FIELD_MEDIA_KEYWORD);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_WEATHER, DB_FIELD_MEDIA_WEATHER);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_IS_DRM, DB_FIELD_MEDIA_IS_DRM);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_STORAGE_TYPE, DB_FIELD_MEDIA_STORAGE_TYPE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_360, DB_FIELD_MEDIA_360);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* Pinyin*/
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_FILE_NAME_PINYIN, DB_FIELD_MEDIA_FILE_NAME_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_TITLE_PINYIN, DB_FIELD_MEDIA_TITLE_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ALBUM_PINYIN, DB_FIELD_MEDIA_ALBUM_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ARTIST_PINYIN, DB_FIELD_MEDIA_ARTIST_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_ALBUM_ARTIST_PINYIN, DB_FIELD_MEDIA_ALBUM_ARTIST_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_GENRE_PINYIN, DB_FIELD_MEDIA_GENRE_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_COMPOSER_PINYIN, DB_FIELD_MEDIA_COMPOSER_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_COPYRIGHT_PINYIN, DB_FIELD_MEDIA_COPYRIGHT_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_DESCRIPTION_PINYIN, DB_FIELD_MEDIA_DESCRIPTION_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_AUTHOR_PINYIN, DB_FIELD_MEDIA_AUTHOR_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_PROVIDER_PINYIN, DB_FIELD_MEDIA_PROVIDER_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_CONTENT_NAME_PINYIN, DB_FIELD_MEDIA_CONTENT_NAME_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_CATEGORY_PINYIN, DB_FIELD_MEDIA_CATEGORY_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_LOCATION_TAG_PINYIN, DB_FIELD_MEDIA_LOCATION_TAG_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_AGE_RATING_PINYIN, DB_FIELD_MEDIA_AGE_RATING_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_KEYWORD_PINYIN, DB_FIELD_MEDIA_KEYWORD_PINYIN);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* Playlist*/
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_PLAYLIST_ID, DB_FIELD_PLAYLIST_ID);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, PLAYLIST_NAME, DB_FIELD_PLAYLIST_NAME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, PLAYLIST_MEMBER_ORDER, DB_FIELD_PLAYLIST_MEMBER_ORDER);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* Playlist View */
- ret = _media_filter_attribute_add(g_attr_handle, PLAYLIST_MEDIA_COUNT, DB_FIELD_PLAYLIST_MEDIA_COUNT);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* Tag*/
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_TAG_ID, DB_FIELD_TAG_ID);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, TAG_NAME, DB_FIELD_TAG_NAME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* Tag View */
- ret = _media_filter_attribute_add(g_attr_handle, TAG_MEDIA_COUNT, DB_FIELD_TAG_MEDIA_COUNT);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* Bookmark*/
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_BOOKMARK_ID, DB_FIELD_BOOKMARK_ID);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, BOOKMARK_MARKED_TIME, DB_FIELD_BOOKMARK_MARKED_TIME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, BOOKMARK_NAME, DB_FIELD_BOOKMARK_NAME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* Storage*/
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_STORAGE_ID, DB_FIELD_STORAGE_ID);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_STORAGE_PATH, DB_FIELD_STORAGE_PATH);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* Face */
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_FACE_TAG, DB_FIELD_FACE_TAG);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_FACE_ID, DB_FIELD_FACE_ID);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
-#ifdef _USE_SENIOR_MODE
- if (_media_content_is_support_senior_mode()) {
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_CONTACT, DB_FIELD_MEDIA_CONTACT);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_APP_DATA, DB_FIELD_MEDIA_APP_DATA);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
- }
-#endif
-#ifdef _USE_TV_PROFILE
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_FOLDER_ID, DB_FIELD_MEDIA_FOLDER_ID);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_STITCHED_INFO, DB_FIELD_MEDIA_STITCHED_INFO);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_MODIFIED_MONTH, DB_FIELD_MEDIA_MODIFIED_MONTH);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, MEDIA_MODIFIED_DATE, DB_FIELD_MEDIA_MODIFIED_DATE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- /* PVR*/
- ret = _media_filter_attribute_add(g_attr_handle, PVR_DURATION, DB_FIELD_PVR_DURATION);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, PVR_TIME_ZONE, DB_FIELD_PVR_TIME_ZONE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, PVR_PTC, DB_FIELD_PVR_PTC);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, PVR_MAJOR, DB_FIELD_PVR_MAJOR);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, PVR_MINOR, DB_FIELD_PVR_MINOR);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, PVR_CHANNEL_TYPE, DB_FIELD_PVR_CHANNEL_TYPE);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, PVR_CHANNEL_NAME, DB_FIELD_PVR_CHANNEL_NAME);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- ret = _media_filter_attribute_add(g_attr_handle, PVR_CHANNEL_NUM, DB_FIELD_PVR_CHANNEL_NUM);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);