Lines Matching refs:pl
267 static void do_track_change_notifications(struct mpl_mediaplayer *pl);
268 static void do_group_change_notifications(struct mpl_mediaplayer *pl);
476 static int add_icon_object(struct mpl_mediaplayer *pl) in add_icon_object() argument
506 static int add_current_track_segments_object(struct mpl_mediaplayer *pl) in add_current_track_segments_object() argument
516 obj.desc->size.alloc = obj.desc->size.cur = setup_segments_object(pl->group->track); in add_current_track_segments_object()
517 obj.desc->name = pl->group->track->title; in add_current_track_segments_object()
570 static int add_parent_group_object(struct mpl_mediaplayer *pl) in add_parent_group_object() argument
580 obj.desc->size.alloc = obj.desc->size.cur = setup_parent_group_object(pl->group); in add_parent_group_object()
581 obj.desc->name = pl->group->parent->title; in add_parent_group_object()
657 static int add_group_and_track_objects(struct mpl_mediaplayer *pl) in add_group_and_track_objects() argument
661 struct mpl_group *group = pl->group; in add_group_and_track_objects()
682 ret = add_parent_group_object(pl); in add_group_and_track_objects()
869 static void do_prev_segment(struct mpl_mediaplayer *pl) in do_prev_segment() argument
871 LOG_DBG("Segment name before: %s", pl->group->track->segment->name); in do_prev_segment()
873 if (pl->group->track->segment->prev != NULL) { in do_prev_segment()
874 pl->group->track->segment = pl->group->track->segment->prev; in do_prev_segment()
877 LOG_DBG("Segment name after: %s", pl->group->track->segment->name); in do_prev_segment()
880 static void do_next_segment(struct mpl_mediaplayer *pl) in do_next_segment() argument
882 LOG_DBG("Segment name before: %s", pl->group->track->segment->name); in do_next_segment()
884 if (pl->group->track->segment->next != NULL) { in do_next_segment()
885 pl->group->track->segment = pl->group->track->segment->next; in do_next_segment()
888 LOG_DBG("Segment name after: %s", pl->group->track->segment->name); in do_next_segment()
891 static void do_first_segment(struct mpl_mediaplayer *pl) in do_first_segment() argument
893 LOG_DBG("Segment name before: %s", pl->group->track->segment->name); in do_first_segment()
895 while (pl->group->track->segment->prev != NULL) { in do_first_segment()
896 pl->group->track->segment = pl->group->track->segment->prev; in do_first_segment()
899 LOG_DBG("Segment name after: %s", pl->group->track->segment->name); in do_first_segment()
902 static void do_last_segment(struct mpl_mediaplayer *pl) in do_last_segment() argument
904 LOG_DBG("Segment name before: %s", pl->group->track->segment->name); in do_last_segment()
906 while (pl->group->track->segment->next != NULL) { in do_last_segment()
907 pl->group->track->segment = pl->group->track->segment->next; in do_last_segment()
910 LOG_DBG("Segment name after: %s", pl->group->track->segment->name); in do_last_segment()
913 static void do_goto_segment(struct mpl_mediaplayer *pl, int32_t segnum) in do_goto_segment() argument
917 LOG_DBG("Segment name before: %s", pl->group->track->segment->name); in do_goto_segment()
921 while (pl->group->track->segment->prev != NULL) { in do_goto_segment()
922 pl->group->track->segment = in do_goto_segment()
923 pl->group->track->segment->prev; in do_goto_segment()
928 if (pl->group->track->segment->next != NULL) { in do_goto_segment()
929 pl->group->track->segment = in do_goto_segment()
930 pl->group->track->segment->next; in do_goto_segment()
935 while (pl->group->track->segment->next != NULL) { in do_goto_segment()
936 pl->group->track->segment = in do_goto_segment()
937 pl->group->track->segment->next; in do_goto_segment()
942 if (pl->group->track->segment->prev != NULL) { in do_goto_segment()
943 pl->group->track->segment = in do_goto_segment()
944 pl->group->track->segment->prev; in do_goto_segment()
949 LOG_DBG("Segment name after: %s", pl->group->track->segment->name); in do_goto_segment()
951 set_track_position(pl->group->track->segment->pos); in do_goto_segment()
954 static void do_prev_track(struct mpl_mediaplayer *pl) in do_prev_track() argument
957 LOG_DBG_OBJ_ID("Track ID before: ", pl->group->track->id); in do_prev_track()
960 if (pl->group->track->prev != NULL) { in do_prev_track()
961 pl->group->track = pl->group->track->prev; in do_prev_track()
962 pl->track_pos = 0; in do_prev_track()
963 do_track_change_notifications(pl); in do_prev_track()
972 LOG_DBG_OBJ_ID("Track ID after: ", pl->group->track->id); in do_prev_track()
977 static void do_next_track_normal_order(struct mpl_mediaplayer *pl) in do_next_track_normal_order() argument
980 LOG_DBG_OBJ_ID("Track ID before: ", pl->group->track->id); in do_next_track_normal_order()
983 if (pl->group->track->next != NULL) { in do_next_track_normal_order()
984 pl->group->track = pl->group->track->next; in do_next_track_normal_order()
985 pl->track_pos = 0; in do_next_track_normal_order()
986 do_track_change_notifications(pl); in do_next_track_normal_order()
990 LOG_DBG_OBJ_ID("Track ID after: ", pl->group->track->id); in do_next_track_normal_order()
1001 static void do_next_track_next_track_set(struct mpl_mediaplayer *pl) in do_next_track_next_track_set() argument
1003 if (pl->next.group != pl->group) { in do_next_track_next_track_set()
1004 pl->group = pl->next.group; in do_next_track_next_track_set()
1005 do_group_change_notifications(pl); in do_next_track_next_track_set()
1008 pl->group->track = pl->next.track; in do_next_track_next_track_set()
1010 pl->next.track = NULL; in do_next_track_next_track_set()
1011 pl->next.group = NULL; in do_next_track_next_track_set()
1012 pl->next_track_set = false; in do_next_track_next_track_set()
1013 pl->track_pos = 0; in do_next_track_next_track_set()
1014 do_track_change_notifications(pl); in do_next_track_next_track_set()
1017 static void do_next_track(struct mpl_mediaplayer *pl) in do_next_track() argument
1019 if (pl->next_track_set) { in do_next_track()
1021 do_next_track_next_track_set(pl); in do_next_track()
1023 do_next_track_normal_order(pl); in do_next_track()
1027 static void do_first_track(struct mpl_mediaplayer *pl, bool group_change) in do_first_track() argument
1032 LOG_DBG_OBJ_ID("Track ID before: ", pl->group->track->id); in do_first_track()
1036 while (pl->group->track->prev != NULL) { in do_first_track()
1037 pl->group->track = pl->group->track->prev; in do_first_track()
1052 LOG_DBG_OBJ_ID("Track ID after: ", pl->group->track->id); in do_first_track()
1056 static void do_last_track(struct mpl_mediaplayer *pl) in do_last_track() argument
1059 LOG_DBG_OBJ_ID("Track ID before: ", pl->group->track->id); in do_last_track()
1062 if (pl->group->track->next != NULL) { in do_last_track()
1063 pl->group->track = pl->group->track->next; in do_last_track()
1073 while (pl->group->track->next != NULL) { in do_last_track()
1074 pl->group->track = pl->group->track->next; in do_last_track()
1078 LOG_DBG_OBJ_ID("Track ID after: ", pl->group->track->id); in do_last_track()
1082 static void do_goto_track(struct mpl_mediaplayer *pl, int32_t tracknum) in do_goto_track() argument
1088 LOG_DBG_OBJ_ID("Track ID before: ", pl->group->track->id); in do_goto_track()
1093 while (pl->group->track->prev != NULL) { in do_goto_track()
1094 pl->group->track = pl->group->track->prev; in do_goto_track()
1100 if (pl->group->track->next != NULL) { in do_goto_track()
1101 pl->group->track = pl->group->track->next; in do_goto_track()
1107 while (pl->group->track->next != NULL) { in do_goto_track()
1108 pl->group->track = pl->group->track->next; in do_goto_track()
1114 if (pl->group->track->prev != NULL) { in do_goto_track()
1115 pl->group->track = pl->group->track->prev; in do_goto_track()
1122 LOG_DBG_OBJ_ID("Track ID after: ", pl->group->track->id); in do_goto_track()
1138 static void do_prev_group(struct mpl_mediaplayer *pl) in do_prev_group() argument
1141 LOG_DBG_OBJ_ID("Group ID before: ", pl->group->id); in do_prev_group()
1144 if (pl->group->prev != NULL) { in do_prev_group()
1145 pl->group = pl->group->prev; in do_prev_group()
1146 do_group_change_notifications(pl); in do_prev_group()
1150 LOG_DBG_OBJ_ID("Group ID after: ", pl->group->id); in do_prev_group()
1154 static void do_next_group(struct mpl_mediaplayer *pl) in do_next_group() argument
1158 LOG_DBG_OBJ_ID("Group ID before: ", pl->group->id); in do_next_group()
1161 if (pl->group->next != NULL) { in do_next_group()
1162 pl->group = pl->group->next; in do_next_group()
1163 do_group_change_notifications(pl); in do_next_group()
1167 LOG_DBG_OBJ_ID("Group ID after: ", pl->group->id); in do_next_group()
1171 static void do_first_group(struct mpl_mediaplayer *pl) in do_first_group() argument
1174 LOG_DBG_OBJ_ID("Group ID before: ", pl->group->id); in do_first_group()
1177 if (pl->group->prev != NULL) { in do_first_group()
1178 pl->group = pl->group->prev; in do_first_group()
1179 do_group_change_notifications(pl); in do_first_group()
1182 while (pl->group->prev != NULL) { in do_first_group()
1183 pl->group = pl->group->prev; in do_first_group()
1187 LOG_DBG_OBJ_ID("Group ID after: ", pl->group->id); in do_first_group()
1191 static void do_last_group(struct mpl_mediaplayer *pl) in do_last_group() argument
1194 LOG_DBG_OBJ_ID("Group ID before: ", pl->group->id); in do_last_group()
1197 if (pl->group->next != NULL) { in do_last_group()
1198 pl->group = pl->group->next; in do_last_group()
1199 do_group_change_notifications(pl); in do_last_group()
1202 while (pl->group->next != NULL) { in do_last_group()
1203 pl->group = pl->group->next; in do_last_group()
1207 LOG_DBG_OBJ_ID("Group ID after: ", pl->group->id); in do_last_group()
1211 static void do_goto_group(struct mpl_mediaplayer *pl, int32_t groupnum) in do_goto_group() argument
1217 LOG_DBG_OBJ_ID("Group ID before: ", pl->group->id); in do_goto_group()
1222 while (pl->group->prev != NULL) { in do_goto_group()
1223 pl->group = pl->group->prev; in do_goto_group()
1229 if (pl->group->next != NULL) { in do_goto_group()
1230 pl->group = pl->group->next; in do_goto_group()
1236 while (pl->group->next != NULL) { in do_goto_group()
1237 pl->group = pl->group->next; in do_goto_group()
1243 if (pl->group->prev != NULL) { in do_goto_group()
1244 pl->group = pl->group->prev; in do_goto_group()
1251 LOG_DBG_OBJ_ID("Group ID after: ", pl->group->id); in do_goto_group()
1257 do_group_change_notifications(pl); in do_goto_group()
1261 static void do_track_change_notifications(struct mpl_mediaplayer *pl) in do_track_change_notifications() argument
1264 media_proxy_pl_track_title_cb(pl->group->track->title); in do_track_change_notifications()
1265 media_proxy_pl_track_duration_cb(pl->group->track->duration); in do_track_change_notifications()
1266 media_proxy_pl_track_position_cb(pl->track_pos); in do_track_change_notifications()
1268 media_proxy_pl_current_track_id_cb(pl->group->track->id); in do_track_change_notifications()
1269 if (pl->group->track->next) { in do_track_change_notifications()
1270 media_proxy_pl_next_track_id_cb(pl->group->track->next->id); in do_track_change_notifications()
1278 static void do_group_change_notifications(struct mpl_mediaplayer *pl) in do_group_change_notifications() argument
1281 media_proxy_pl_current_group_id_cb(pl->group->id); in do_group_change_notifications()
1285 static void do_full_prev_group(struct mpl_mediaplayer *pl) in do_full_prev_group() argument
1288 do_prev_group(pl); in do_full_prev_group()
1291 do_first_track(pl, true); in do_full_prev_group()
1294 static void do_full_next_group(struct mpl_mediaplayer *pl) in do_full_next_group() argument
1297 do_next_group(pl); in do_full_next_group()
1300 do_first_track(pl, true); in do_full_next_group()
1303 static void do_full_first_group(struct mpl_mediaplayer *pl) in do_full_first_group() argument
1306 do_first_group(pl); in do_full_first_group()
1309 do_first_track(pl, true); in do_full_first_group()
1312 static void do_full_last_group(struct mpl_mediaplayer *pl) in do_full_last_group() argument
1315 do_last_group(pl); in do_full_last_group()
1318 do_first_track(pl, true); in do_full_last_group()
1321 static void do_full_goto_group(struct mpl_mediaplayer *pl, int32_t groupnum) in do_full_goto_group() argument
1324 do_goto_group(pl, groupnum); in do_full_goto_group()
1327 do_first_track(pl, true); in do_full_goto_group()
1881 static bool find_track_by_id(const struct mpl_mediaplayer *pl, uint64_t id, in find_track_by_id() argument
1884 struct mpl_group *tmp_group = pl->group; in find_track_by_id()
1924 static bool find_group_by_id(const struct mpl_mediaplayer *pl, uint64_t id, in find_group_by_id() argument
1927 struct mpl_group *tmp_group = pl->group; in find_group_by_id()