• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

work on media-hub

Scheduled Pinned Locked Moved OS
9 Posts 4 Posters 675 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      wdehoog
      last edited by 20 May 2020, 07:48

      Hi,

      I have spent some time with media-hub. I wanted to solve three problems:
      1 The default image for album art is not shown on the Sound indicator panel.
      (https://github.com/ubports/media-hub/issues/6)
      2 Embedded album art of audio streams do not show up on the Sound indicator panel.
      (See https://github.com/ubports/media-hub/issues/9)
      3 Using media-hub playlist still results in choppy audio after a track change.
      (See https://github.com/ubports/ubuntu-touch/issues/1415)

      1. For the default image I have a PR (https://github.com/ubports/media-hub/pull/7).
        It removes the use of some sort of 'dash' server which does not exist anymore and .

      2. For the embedded album art I have a PR (https://github.com/ubports/media-hub/pull/10). It saves the image to a temporary file and let Thumbnailer handle it.

      3. For the choppy audio problem I have a PR (https://github.com/ubports/media-hub/pull/8). Media-hub acquires a new wackelock for every track and releases it when the track is done. If the app is suspended when the track is done it will not signal media-hub to continue playing. But media-hub will keep on playing this time without acquiring a new wakelock and thus the audio becomes choppy.
        This PR makes sure media-hub will acquire a new wakelock when playing the next track even when the app is suspended. It seems to work.

      Part of the media-hub code is used in qtubuntu-media (libmedia-hub-client). There is still some code in there to detach/reattach the app when suspending/activating. I tried all sorts of things but it does not work anymore (unless the Player object is not renewed). Video playing becomes completely broken since event registration/notification is
      messy. Besides that detaching does not seem to do a lot (only sets the lifetime state in mediahub) so I gave up on it.

      There was a proposal to add reference counting and keep the wakelock based on that. I think that won't be needed and would also result in a wakelock being kept when there is no need for it (not playing).

      1 Reply Last reply Reply Quote 7
      • M Offline
        manland
        last edited by 20 May 2020, 08:00

        Thank you for this amazing work!
        How do you embed image in song? Do you use a lib?

        W 1 Reply Last reply 20 May 2020, 08:30 Reply Quote 0
        • W Offline
          wdehoog @manland
          last edited by 20 May 2020, 08:30

          @manland I am not sure I understand your question. I have a bunch of mp3 and flac files being served by a UPnP Media Server (https://gerbera.io/). I have added embedded album art to these files using an mp3 tag editor (https://www.mp3tag.de/en/).

          M 1 Reply Last reply 20 May 2020, 09:53 Reply Quote 0
          • M Offline
            manland @wdehoog
            last edited by 20 May 2020, 09:53

            @wdehoog I search a way to add embeded album art on the fly with a lib or something like that. But thank you for your answer it help me!

            W 1 Reply Last reply 20 May 2020, 10:02 Reply Quote 0
            • C Offline
              CiberSheep
              last edited by 20 May 2020, 10:00

              Thanks. Media-hub needs love 🙂

              Another planet, another time, another universe!

              1 Reply Last reply Reply Quote 0
              • W Offline
                wdehoog @manland
                last edited by 20 May 2020, 10:02

                @manland 'on the fly'? Could you explain your use case?

                1 Reply Last reply Reply Quote 0
                • T Offline
                  theare27
                  last edited by 15 Jun 2020, 18:44

                  Glad to see eork on media hub

                  These might be ralated to the wakelock issue, but I have to other bugs to highlight

                  Playlist tracks, ones that media hub has moved on to after the inially selected tracks has finished is not pausable, manipulatable from the sound dropdown menu. They also keep playing on headphone disconnect whereas the originally selected track will stop playing on headphone disconnect

                  W 1 Reply Last reply 15 Jun 2020, 18:55 Reply Quote 0
                  • W Offline
                    wdehoog @theare27
                    last edited by 15 Jun 2020, 18:55

                    @theare27 which phone are you using? which app are you using or do all apps behave this way?

                    Could you please add these issues to https://github.com/ubports/ubuntu-touch/issues or https://github.com/ubports/media-hub ?

                    T 1 Reply Last reply 15 Jun 2020, 19:27 Reply Quote 0
                    • T Offline
                      theare27 @wdehoog
                      last edited by 15 Jun 2020, 19:27

                      @wdehoog Podbird on OnePlus One

                      I guess it could be app specific - will double check with other apps to see if it's the same behavior

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post