Skip to contentSkip to conversation

player: Fix Track being emitted with empty metadata

PATCH In review Luiz Augusto von Dentz 2 participants 3 messages Feb 22, 2022 – Feb 23, 2022 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH v4 1/1 player: Fix Track being emitted with empty metadata

From: Luiz Augusto von Dentz <[email protected]>

This sometimes causes the Track to be schedule while some metadata are still pending, also don't remove the Duration from track when updating its metadata since Duration is typically updated by player status rather than metadata.

---
 profiles/audio/avrcp.c  |  4 +++
 profiles/audio/player.c | 74 ++++++++++++++++++++++-------------------
 profiles/audio/player.h |  2 ++
 3 files changed, 45 insertions(+), 35 deletions(-)
profiles/audio/avrcp.c +4 -0
index 5eb182b76..80f34c7a7 100644
@@ -2402,6 +2402,8 @@ static void avrcp_parse_attribute_list(struct avrcp_player *player,
 	struct media_item *item;
 	int i;
 
+	media_player_clear_metadata(mp);
+
 	item = media_player_set_playlist_item(mp, player->uid);
 
 	for (i = 0; count > 0; count--) {
@@ -2428,6 +2430,8 @@ static void avrcp_parse_attribute_list(struct avrcp_player *player,
 
 		i += len;
 	}
+
+	media_player_metadata_changed(mp);
 }
 
 static gboolean avrcp_get_element_attributes_rsp(struct avctp *conn,
profiles/audio/player.c +39 -35

126 lines not on this page · raw message

profiles/audio/player.h +2 -0
index 69f08735b..74fb7d771 100644
@@ -70,9 +70,11 @@ void media_player_set_setting(struct media_player *mp, const char *key,
 							const char *value);
 const char *media_player_get_status(struct media_player *mp);
 void media_player_set_status(struct media_player *mp, const char *status);
+void media_player_clear_metadata(struct media_player *mp);
 void media_player_set_metadata(struct media_player *mp,
 				struct media_item *item, const char *key,
 				void *data, size_t len);
+void media_player_metadata_changed(struct media_player *mp);
 void media_player_set_type(struct media_player *mp, const char *type);
 void media_player_set_subtype(struct media_player *mp, const char *subtype);
 void media_player_set_name(struct media_player *mp, const char *name);
Signature · 1 line
2.35.1
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=616863

---Test result---

Test Summary:

CheckPatch                    PASS      0.70 seconds
GitLint                       PASS      0.38 seconds
Prep - Setup ELL              PASS      50.46 seconds
Build - Prep                  PASS      0.61 seconds
Build - Configure             PASS      9.83 seconds
Build - Make                  PASS      1752.78 seconds
Make Check                    PASS      12.36 seconds
Make Check w/Valgrind         PASS      533.80 seconds
Make Distcheck                PASS      276.34 seconds
Build w/ext ELL - Configure   PASS      10.04 seconds
Build w/ext ELL - Make        PASS      1725.46 seconds
Incremental Build with patchesPASS      0.00 seconds

---
Regards,
Linux Bluetooth

author maintainer
#2 lore raw

Hi,

Quoted 27 lines · On Tue, Feb 22, 2022 at 1:39 PM <[email protected]> wrote:

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=616863

---Test result---

Test Summary:

CheckPatch                    PASS      0.70 seconds
GitLint                       PASS      0.38 seconds
Prep - Setup ELL              PASS      50.46 seconds
Build - Prep                  PASS      0.61 seconds
Build - Configure             PASS      9.83 seconds
Build - Make                  PASS      1752.78 seconds
Make Check                    PASS      12.36 seconds
Make Check w/Valgrind         PASS      533.80 seconds
Make Distcheck                PASS      276.34 seconds
Build w/ext ELL - Configure   PASS      10.04 seconds
Build w/ext ELL - Make        PASS      1725.46 seconds
Incremental Build with patchesPASS      0.00 seconds
Quoted 4 lines

---
Regards,
Linux Bluetooth

Pushed.

Signature · 1 line
Luiz Augusto von Dentz