2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <media_content.h>
23 static void startup(void);
24 static void cleanup(void);
26 void (*tet_startup)(void) = startup;
27 void (*tet_cleanup)(void) = cleanup;
29 static void utc_video_meta_destroy_n(void);
30 static void utc_video_meta_destroy_p(void);
31 static void utc_video_meta_clone_n(void);
32 static void utc_video_meta_clone_p(void);
33 static void utc_video_meta_get_media_id_n(void);
34 static void utc_video_meta_get_media_id_p(void);
35 static void utc_video_meta_get_title_n(void);
36 static void utc_video_meta_get_title_p(void);
37 static void utc_video_meta_get_album_n(void);
38 static void utc_video_meta_get_album_p(void);
39 static void utc_video_meta_get_artist_n(void);
40 static void utc_video_meta_get_artist_p(void);
41 static void utc_video_meta_get_genre_n(void);
42 static void utc_video_meta_get_genre_p(void);
43 static void utc_video_meta_get_composer_n(void);
44 static void utc_video_meta_get_composer_p(void);
45 static void utc_video_meta_get_year_n(void);
46 static void utc_video_meta_get_year_p(void);
47 static void utc_video_meta_get_recorded_date_n(void);
48 static void utc_video_meta_get_recorded_date_p(void);
49 static void utc_video_meta_get_copyright_n(void);
50 static void utc_video_meta_get_copyright_p(void);
51 static void utc_video_meta_get_track_num_n(void);
52 static void utc_video_meta_get_track_num_p(void);
53 static void utc_video_meta_get_bit_rate_n(void);
54 static void utc_video_meta_get_bit_rate_p(void);
55 static void utc_video_meta_get_duration_n(void);
56 static void utc_video_meta_get_duration_p(void);
57 static void utc_video_meta_get_width_n(void);
58 static void utc_video_meta_get_width_p(void);
59 static void utc_video_meta_get_height_n(void);
60 static void utc_video_meta_get_height_p(void);
61 static void utc_video_meta_get_played_count_n(void);
62 static void utc_video_meta_get_played_count_p(void);
63 static void utc_video_meta_get_played_time_n(void);
64 static void utc_video_meta_get_played_time_p(void);
65 static void utc_video_meta_get_played_position_n(void);
66 static void utc_video_meta_get_played_position_p(void);
67 static void utc_video_meta_update_to_db_n(void);
68 static void utc_video_meta_update_to_db_p(void);
69 static void utc_video_meta_set_played_count_n(void);
70 static void utc_video_meta_set_played_count_p(void);
71 static void utc_video_meta_set_played_time_n(void);
72 static void utc_video_meta_set_played_time_p(void);
73 static void utc_video_meta_set_played_position_n(void);
74 static void utc_video_meta_set_played_position_p(void);
77 struct tet_testlist tet_testlist[] = {
78 { utc_video_meta_destroy_n, 5 },
79 { utc_video_meta_destroy_p, 5 },
80 { utc_video_meta_clone_n, 4 },
81 { utc_video_meta_clone_p, 4 },
82 { utc_video_meta_get_media_id_n, 1 },
83 { utc_video_meta_get_media_id_p, 1 },
84 { utc_video_meta_get_title_n, 1 },
85 { utc_video_meta_get_title_p, 1 },
86 { utc_video_meta_get_album_n, 1 },
87 { utc_video_meta_get_album_p, 1 },
88 { utc_video_meta_get_artist_n, 1 },
89 { utc_video_meta_get_artist_p, 1 },
90 { utc_video_meta_get_genre_n, 1 },
91 { utc_video_meta_get_genre_p, 1 },
92 { utc_video_meta_get_composer_n, 1 },
93 { utc_video_meta_get_composer_p, 1 },
94 { utc_video_meta_get_year_n, 1 },
95 { utc_video_meta_get_year_p, 1 },
96 { utc_video_meta_get_recorded_date_n, 1 },
97 { utc_video_meta_get_recorded_date_p, 1 },
98 { utc_video_meta_get_copyright_n, 1 },
99 { utc_video_meta_get_copyright_p, 1 },
100 { utc_video_meta_get_track_num_n, 1 },
101 { utc_video_meta_get_track_num_p, 1 },
102 { utc_video_meta_get_bit_rate_n, 1 },
103 { utc_video_meta_get_bit_rate_p, 1 },
104 { utc_video_meta_get_duration_n, 1 },
105 { utc_video_meta_get_duration_p, 1 },
106 { utc_video_meta_get_width_n, 1 },
107 { utc_video_meta_get_width_p, 1 },
108 { utc_video_meta_get_height_n, 1 },
109 { utc_video_meta_get_height_p, 1 },
110 { utc_video_meta_get_played_count_n, 1 },
111 { utc_video_meta_get_played_count_p, 1 },
112 { utc_video_meta_get_played_time_n, 1 },
113 { utc_video_meta_get_played_time_p, 1 },
114 { utc_video_meta_get_played_position_n, 1 },
115 { utc_video_meta_get_played_position_p, 1 },
116 { utc_video_meta_set_played_count_n, 2 },
117 { utc_video_meta_set_played_count_p, 2 },
118 { utc_video_meta_set_played_time_n, 2 },
119 { utc_video_meta_set_played_time_p, 2 },
120 { utc_video_meta_set_played_position_n, 2 },
121 { utc_video_meta_set_played_position_p, 2 },
122 { utc_video_meta_update_to_db_n, 3 },
123 { utc_video_meta_update_to_db_p, 3 },
127 static video_meta_h g_video;
128 static video_meta_h g_video_dst;
129 char *g_media_id = NULL;
131 bool media_item_cb(media_info_h media, void *user_data)
133 int ret = MEDIA_CONTENT_ERROR_NONE;
135 ret = media_info_get_media_id(media, &g_media_id);
136 if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL))
138 tet_printf("\n get media_id failed");
142 ret = media_info_get_video(media, &g_video);
143 if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_video == NULL))
145 tet_printf("\n get video_meta failed");
152 static void startup(void)
155 tet_printf("\n TC start");
159 int ret = media_content_connect();
160 if(ret != MEDIA_CONTENT_ERROR_NONE)
162 tet_printf("\n database connection is failed");
167 tet_printf("\n database connection is success");
170 char *condition = "MEDIA_TYPE=1"; //Video
172 media_filter_create(&filter);
173 media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
174 media_filter_set_order(filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_TITLE, MEDIA_CONTENT_COLLATE_DEFAULT);
177 tet_printf("\n filter create failed");
181 ret = media_info_foreach_media_from_db(filter, media_item_cb, NULL);
182 if(ret != MEDIA_CONTENT_ERROR_NONE)
184 tet_printf("\n get media_info failed");
188 media_filter_destroy(filter);
190 tet_printf("\n TC start END");
194 static void cleanup(void)
197 tet_printf("\n TC end");
199 if(g_media_id != NULL)
203 video_meta_destroy(g_video);
205 int ret = media_content_disconnect();
207 if(ret != MEDIA_CONTENT_ERROR_NONE)
208 tet_printf("\n database disconnection is failed");
210 tet_printf("\n database disconnection is success");
215 * @brief Negative test case of content_imageinfo_destroy()
217 static void utc_video_meta_destroy_n(void)
219 int ret = MEDIA_CONTENT_ERROR_NONE;
221 ret = video_meta_destroy(NULL);
223 dts_check_eq("utc_video_meta_destroy", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
228 * @brief Positive test case of content_imageinfo_destroy()
230 static void utc_video_meta_destroy_p(void)
232 int ret = MEDIA_CONTENT_ERROR_NONE;
234 ret = video_meta_destroy(g_video_dst);
236 dts_check_eq("utc_video_meta_destroy", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to destroy videoinfo object");
241 * @brief Negative test case of imageinfo_clone()
243 static void utc_video_meta_clone_n(void)
245 int ret = MEDIA_CONTENT_ERROR_NONE;
247 ret = video_meta_clone(&g_video_dst, NULL);
249 dts_check_eq("utc_video_meta_clone", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
253 * @brief Positive test case of imageinfo_clone()
255 static void utc_video_meta_clone_p(void)
257 int ret = MEDIA_CONTENT_ERROR_NONE;
259 ret = video_meta_clone(&g_video_dst, g_video);
261 dts_check_eq("utc_video_meta_clone", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to clone videoinfo object");
264 static void utc_video_meta_get_media_id_n(void)
266 int ret = MEDIA_CONTENT_ERROR_NONE;
267 char *media_id = NULL;
269 ret = video_meta_get_media_id(NULL, &media_id);
271 dts_check_eq("utc_video_meta_get_media_id_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
274 static void utc_video_meta_get_media_id_p(void)
276 int ret = MEDIA_CONTENT_ERROR_NONE;
277 char *media_id = NULL;
279 ret = video_meta_get_media_id(g_video, &media_id);
281 dts_check_eq("utc_video_meta_get_media_id_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get video id");
285 * @brief Negative test case of sim_get_imageinfo_get_height()
287 static void utc_video_meta_get_title_n(void)
289 int ret = MEDIA_CONTENT_ERROR_NONE;
292 ret = video_meta_get_title(NULL, &title);
294 dts_check_eq("utc_video_meta_get_title", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
298 * @brief Positive test case of sim_get_imageinfo_get_height()
300 static void utc_video_meta_get_title_p(void)
303 int ret = MEDIA_CONTENT_ERROR_NONE;
306 ret = video_meta_get_title(g_video, &title);
311 dts_check_eq("utc_video_meta_get_title", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get the title");
315 * @brief Negative test case of imageinfo_get_description()
317 static void utc_video_meta_get_album_n(void)
319 int ret = MEDIA_CONTENT_ERROR_NONE;
322 ret = video_meta_get_album(NULL, &album);
324 dts_check_eq("utc_video_meta_get_album", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
328 * @brief Positive test case of imageinfo_get_description()
330 static void utc_video_meta_get_album_p(void)
332 int ret = MEDIA_CONTENT_ERROR_NONE;
335 ret = video_meta_get_album(g_video, &album);
340 dts_check_eq("utc_video_meta_get_album", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get the album");
344 * @brief Negative test case of imageinfo_get_width()
346 static void utc_video_meta_get_artist_n(void)
348 int ret = MEDIA_CONTENT_ERROR_NONE;
351 ret = video_meta_get_artist(NULL, &artist);
353 dts_check_eq("utc_video_meta_get_artist", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
357 * @brief Positive test case of imageinfo_get_width()
359 static void utc_video_meta_get_artist_p(void)
361 int ret = MEDIA_CONTENT_ERROR_NONE;
364 ret = video_meta_get_artist(g_video, &artist);
369 dts_check_eq("utc_video_meta_get_artist", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get the artist");
373 * @brief Negative test case of video_meta_get_genre()
375 static void utc_video_meta_get_genre_n(void)
377 int ret = MEDIA_CONTENT_ERROR_NONE;
380 ret = video_meta_get_genre(NULL, &genre);
382 dts_check_eq("utc_video_meta_get_genre_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
387 * @brief Positive test case of video_meta_get_genre()
389 static void utc_video_meta_get_genre_p(void)
391 int ret = MEDIA_CONTENT_ERROR_NONE;
394 ret = video_meta_get_genre(g_video, &genre);
399 dts_check_eq("utc_video_meta_get_genre_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get genre");
403 * @brief Negative test case of video_meta_get_composer()
405 static void utc_video_meta_get_composer_n(void)
407 int ret = MEDIA_CONTENT_ERROR_NONE;
408 char *composer = NULL;
410 ret = video_meta_get_composer(NULL, &composer);
412 dts_check_eq("utc_video_meta_get_composer_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
416 * @brief Positive test case of video_meta_get_composer()
418 static void utc_video_meta_get_composer_p(void)
420 int ret = MEDIA_CONTENT_ERROR_NONE;
421 char *composer = NULL;
423 ret = video_meta_get_composer(g_video, &composer);
428 dts_check_eq("utc_video_meta_get_composer_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get the composer");
432 * @brief Negative test case of sim_get_imageinfo_get_height()
434 static void utc_video_meta_get_year_n(void)
436 int ret = MEDIA_CONTENT_ERROR_NONE;
439 ret = video_meta_get_year(NULL, &year);
441 dts_check_eq("utc_video_meta_get_year_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
446 * @brief Positive test case of sim_get_imageinfo_get_height()
448 static void utc_video_meta_get_year_p(void)
450 int ret = MEDIA_CONTENT_ERROR_NONE;
453 ret = video_meta_get_year(g_video, &year);
458 dts_check_eq("utc_video_meta_get_year_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get year");
462 * @brief Negative test case of video_meta_get_recorded_date()
464 static void utc_video_meta_get_recorded_date_n(void)
466 int ret = MEDIA_CONTENT_ERROR_NONE;
467 char *recorded_date = NULL;
469 ret = video_meta_get_recorded_date(NULL, &recorded_date);
471 dts_check_eq("utc_video_meta_get_recorded_date_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Failed to get recorded_date");
475 * @brief Positive test case of video_meta_get_recorded_date()
477 static void utc_video_meta_get_recorded_date_p(void)
479 int ret = MEDIA_CONTENT_ERROR_NONE;
480 char *recorded_date = NULL;
482 ret = video_meta_get_year(g_video, &recorded_date);
487 dts_check_eq("utc_video_meta_get_recorded_date_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get recorded_date");
491 * @brief Negative test case of video_meta_get_copyright()
493 static void utc_video_meta_get_copyright_n(void)
495 int ret = MEDIA_CONTENT_ERROR_NONE;
496 char *copyright = NULL;
498 ret = video_meta_get_copyright(NULL, ©right);
500 dts_check_eq("utc_video_meta_get_copyright_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
504 * @brief Positive test case of video_meta_get_copyright()
506 static void utc_video_meta_get_copyright_p(void)
508 int ret = MEDIA_CONTENT_ERROR_NONE;
509 char *copyright = NULL;
511 ret = video_meta_get_copyright(g_video, ©right);
516 dts_check_eq("utc_video_meta_get_copyright_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get copyright");
519 static void utc_video_meta_get_track_num_n(void)
521 int ret = MEDIA_CONTENT_ERROR_NONE;
522 char *track_num = NULL;
524 ret = video_meta_get_track_num(NULL, &track_num);
526 dts_check_eq("utc_video_meta_get_track_num_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
529 static void utc_video_meta_get_track_num_p(void)
531 int ret = MEDIA_CONTENT_ERROR_NONE;
532 char *track_num = NULL;
534 ret = video_meta_get_track_num(g_video, &track_num);
539 dts_check_eq("utc_video_meta_get_track_num_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get track num");
542 static void utc_video_meta_get_bit_rate_n(void)
544 int ret = MEDIA_CONTENT_ERROR_NONE;
547 ret = video_meta_get_bit_rate(NULL, &bit_rate);
549 dts_check_eq("utc_video_meta_get_bit_rate_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
552 static void utc_video_meta_get_bit_rate_p(void)
554 int ret = MEDIA_CONTENT_ERROR_NONE;
557 ret = video_meta_get_bit_rate(g_video, &bit_rate);
559 dts_check_eq("utc_video_meta_get_bit_rate_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get the bit_rate");
562 static void utc_video_meta_get_duration_n(void)
564 int ret = MEDIA_CONTENT_ERROR_NONE;
567 ret = video_meta_get_duration(NULL, &duration);
569 dts_check_eq("utc_video_meta_get_duration", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
572 static void utc_video_meta_get_duration_p(void)
574 int ret = MEDIA_CONTENT_ERROR_NONE;
577 ret = video_meta_get_duration(g_video, &duration);
579 dts_check_eq("utc_video_meta_get_duration", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get a duration");
582 static void utc_video_meta_get_width_n(void)
584 int ret = MEDIA_CONTENT_ERROR_NONE;
586 ret = video_meta_get_width(NULL, &width);
588 dts_check_eq("utc_video_meta_get_width", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
591 static void utc_video_meta_get_width_p(void)
593 int ret = MEDIA_CONTENT_ERROR_NONE;
596 ret = video_meta_get_width(g_video, &width);
598 dts_check_eq("utc_video_meta_get_width", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get a width");
602 static void utc_video_meta_get_height_n(void)
604 int ret = MEDIA_CONTENT_ERROR_NONE;
607 ret = video_meta_get_height(NULL, &height);
609 dts_check_eq("utc_video_meta_get_height", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
612 static void utc_video_meta_get_height_p(void)
614 int ret = MEDIA_CONTENT_ERROR_NONE;
617 ret = video_meta_get_height(g_video, &height);
619 dts_check_eq("utc_video_meta_get_height", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get a height");
622 static void utc_video_meta_get_played_count_n(void)
624 int ret = MEDIA_CONTENT_ERROR_NONE;
627 ret = video_meta_get_played_count(NULL, &count);
629 dts_check_eq("utc_video_meta_get_played_count_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
632 static void utc_video_meta_get_played_count_p(void)
634 int ret = MEDIA_CONTENT_ERROR_NONE;
637 ret = video_meta_get_played_count(g_video, &count);
639 dts_check_eq("utc_video_meta_get_played_count_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get played count");
642 static void utc_video_meta_get_played_time_n(void)
644 int ret = MEDIA_CONTENT_ERROR_NONE;
645 time_t played_time = 0;
647 ret = video_meta_get_played_time(NULL, &played_time);
649 dts_check_eq("utc_video_meta_get_played_time_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
652 static void utc_video_meta_get_played_time_p(void)
654 int ret = MEDIA_CONTENT_ERROR_NONE;
655 time_t played_time = 0;
657 ret = video_meta_get_played_time(g_video, &played_time);
659 dts_check_eq("utc_video_meta_get_played_time_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get played time");
662 static void utc_video_meta_get_played_position_n(void)
664 int ret = MEDIA_CONTENT_ERROR_NONE;
667 ret = video_meta_get_played_position(NULL, &position);
669 dts_check_eq("utc_video_meta_get_played_position_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
672 static void utc_video_meta_get_played_position_p(void)
674 int ret = MEDIA_CONTENT_ERROR_NONE;
677 ret = video_meta_get_played_position(g_video, &position);
679 dts_check_eq("utc_video_meta_get_played_position_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to get played position");
682 static void utc_video_meta_set_played_count_n(void)
684 int ret = MEDIA_CONTENT_ERROR_NONE;
685 int played_count = 3;
687 ret = video_meta_set_played_count(NULL, played_count);
689 dts_check_eq("utc_video_meta_set_played_count_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
692 static void utc_video_meta_set_played_count_p(void)
694 int ret = MEDIA_CONTENT_ERROR_NONE;
695 int played_count = 3;
697 ret = video_meta_set_played_count(g_video, played_count);
699 dts_check_eq("utc_video_meta_set_played_count_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to set played count");
702 static void utc_video_meta_set_played_time_n(void)
704 int ret = MEDIA_CONTENT_ERROR_NONE;
705 time_t played_time = 0;
707 ret = video_meta_set_played_time(NULL, played_time);
709 dts_check_eq("utc_video_meta_set_played_time_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
712 static void utc_video_meta_set_played_time_p(void)
714 int ret = MEDIA_CONTENT_ERROR_NONE;
715 time_t played_time = 0;
717 ret = video_meta_set_played_time(g_video, played_time);
719 dts_check_eq("utc_video_meta_set_played_time_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to set played time");
722 static void utc_video_meta_set_played_position_n(void)
724 int ret = MEDIA_CONTENT_ERROR_NONE;
725 int played_position = 0;
727 ret = video_meta_set_played_position(NULL, played_position);
729 dts_check_eq("video_meta_set_played_position", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
732 static void utc_video_meta_set_played_position_p(void)
734 int ret = MEDIA_CONTENT_ERROR_NONE;
735 int played_position = 0;
737 ret = video_meta_set_played_position(g_video, played_position);
739 dts_check_eq("utc_video_meta_set_played_position_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to set playedposition");
742 static void utc_video_meta_update_to_db_n(void)
744 int ret = MEDIA_CONTENT_ERROR_NONE;
746 ret = video_meta_update_to_db(NULL);
748 dts_check_eq("utc_video_meta_update_to_db_n", ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Must return MEDIA_CONTENT_ERROR_INVALID_PARAMETER in case of invalid parameter");
751 static void utc_video_meta_update_to_db_p(void)
753 int ret = MEDIA_CONTENT_ERROR_NONE;
755 ret = video_meta_update_to_db(g_video);
757 dts_check_eq("utc_video_meta_update_to_db_p", ret, MEDIA_CONTENT_ERROR_NONE, "Failed to update metadata");