Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  Viewing entire comments tag in MP3s
« previous next »
  • Print
Pages: [1] 2

Author Topic: Viewing entire comments tag in MP3s  (Read 2064 times)

Offline Desertway

  • Member
  • *
  • Posts: 3
Viewing entire comments tag in MP3s
« on: May 17, 2020, 02:28:13 PM »
I hope I'm in the right place for this question. I'm new to Rockbox and looking for a way to view the entire embedded comment field for an MP3. I have seen some themes that incorporate the tag, but it is truncated. Can it be viewed in a way other than the WPS? Thanks very much.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 875
Re: Viewing entire comments tag in MP3s
« Reply #1 on: May 17, 2020, 07:12:04 PM »
Rockbox internally probably truncates it due to memory constraints

you could parse it yourself in Lua check out the hex viewer example
Logged

Offline Desertway

  • Member
  • *
  • Posts: 3
Re: Viewing entire comments tag in MP3s
« Reply #2 on: May 17, 2020, 08:30:29 PM »
Thanks very much.
Logged

Online Frankenpod

  • Member
  • *
  • Posts: 641
Re: Viewing entire comments tag in MP3s
« Reply #3 on: May 18, 2020, 04:12:18 AM »
Ideally some smart coding-capable person would be able to modify the main code so as to add an additional function to retrieve the second 230 characters of the comment (the existing function only gives you the first 230 characters).  I could then rewrite my theme below so as to report the full comment.

http://themes.rockbox.org/index.php?themeid=2529&target=ipod6g
Logged

Offline Desertway

  • Member
  • *
  • Posts: 3
Re: Viewing entire comments tag in MP3s
« Reply #4 on: May 18, 2020, 12:57:28 PM »
Quote from: Frankenpod on May 18, 2020, 04:12:18 AM
Ideally some smart coding-capable person would be able to modify the main code so as to add an additional function to retrieve the second 230 characters of the comment (the existing function only gives you the first 230 characters).  I could then rewrite my theme below so as to report the full comment.

http://themes.rockbox.org/index.php?themeid=2529&target=ipod6g

I was looking at your theme. It would be perfect as I primarily listen to podcasts, and they have a lot of notes. A change to expand those limitations in the code would be great. Do you think there is enough interest at this point?
Logged

Online Frankenpod

  • Member
  • *
  • Posts: 641
Re: Viewing entire comments tag in MP3s
« Reply #5 on: May 19, 2020, 06:25:44 AM »
The ability to see the full comment, neatly formatted, is something that the Original firmware has that Rockbox lacks - and as you say it struck me as particularly important for podcasts. But adding a function to retrieve characters 231-460, would surely not be that complicated, because one could just duplicate with slight changes the existing code that gets the first 230 characters, and give it a different identifier in the WPS engine to the existing comment field (maybe iC2 or iCb rather than iC?).   Unfortunately I am not skilled enough to be able to figure out the existing code-base and fear breaking something if I try and meddle with it, so was hoping someone more confident about it might do it for me!
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 222
Re: Viewing entire comments tag in MP3s
« Reply #6 on: March 02, 2021, 07:49:33 PM »
ID3V2_MAX_ITEM_SIZE is defined to be 240 if MEMORYSIZE > 2 (MB) in /lib/rbcodec/metadata/metadata.h

In theory you could simply increase that value and possibly the buffer size for "very" large memory sizes (the iPod video has 64MB, for example) and have it just work.

Code: [Select]
#if MEMORYSIZE > 2
#define ID3V2_BUF_SIZE 900
#define ID3V2_MAX_ITEM_SIZE 240
#else
#define ID3V2_BUF_SIZE 300
#define ID3V2_MAX_ITEM_SIZE 90
#endif

The constraint was only introduced in dedde47 and then again adjusted in 37a9a20
« Last Edit: March 02, 2021, 08:29:33 PM by chris_s »
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 323
Re: Viewing entire comments tag in MP3s
« Reply #7 on: March 02, 2021, 09:19:27 PM »
It's probably safe to bump this up for targets with >8MB RAM. 
Logged

Online Frankenpod

  • Member
  • *
  • Posts: 641
Re: Viewing entire comments tag in MP3s
« Reply #8 on: March 02, 2021, 10:18:00 PM »
If I can get my "development environment" working again (on my linux box with the dodgy hard-drive!) I will try compiling a version with that number boosted a bit (where MEMORYSIZE>8MB), and see if it works/makes a difference.

(Not all ipod videos have 64MB, the 30gb models I believe have 32MB, but it sounds as if the string length was set very conservatively to be safe for the lower-end targets?)

I notice the change chris_s found says " Limit the size of each ID3 metadata item to avoid that the metadata buffer is filled by single items"
Does that mean there's a specific, defined "metadata buffer" that would need to be increased in size?
« Last Edit: March 02, 2021, 10:22:28 PM by Frankenpod »
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 323
Re: Viewing entire comments tag in MP3s
« Reply #9 on: March 02, 2021, 10:23:08 PM »
Quote from: Frankenpod on March 02, 2021, 10:18:00 PM
(Not all ipod videos have 64MB, the 30gb models I believe have 32MB, but it sounds as if the string length was set very conservatively to be safe for the lower-end targets?)

Yep, a _lot_ of rockbox is the way it is in order to keep the memory footprint as small (and runtime as deterministic) as possible. 

Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 222
Re: Viewing entire comments tag in MP3s
« Reply #10 on: March 03, 2021, 06:53:53 AM »
Quote from: Frankenpod on March 02, 2021, 10:18:00 PM
(Not all ipod videos have 64MB, the 30gb models I believe have 32MB
I guess you're right. Was just going by what Rockbox had defined for the model.

Quote from: Frankenpod on March 02, 2021, 10:18:00 PM
I notice the change chris_s found says " Limit the size of each ID3 metadata item to avoid that the metadata buffer is filled by single items"
Does that mean there's a specific, defined "metadata buffer" that would need to be increased in size?
ID3V2_BUF_SIZE is currently 900 bytes (for memory sizes > 2 MB) and needs to fit all of the tags. So you may need to increase that as well.
« Last Edit: March 03, 2021, 06:56:04 AM by chris_s »
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 222
Re: Viewing entire comments tag in MP3s
« Reply #11 on: March 23, 2021, 01:44:07 AM »
Quote from: Frankenpod on March 02, 2021, 10:18:00 PM
If I can get my "development environment" working again (on my linux box with the dodgy hard-drive!) I will try compiling a version with that number boosted a bit (where MEMORYSIZE>8MB), and see if it works/makes a difference.
It's been changed in the latest daily build if you want to check it out.
Logged

Online Frankenpod

  • Member
  • *
  • Posts: 641
Re: Viewing entire comments tag in MP3s
« Reply #12 on: March 23, 2021, 05:10:17 PM »
Thanks - good work, provisionally it seems to be working.

  Modified my theme to make use of it and it _seems_to work.  Having an unrelated problem in demonstrating that it works, as the simulator is not up to date so I can only test it on the ipod itself - and for some reason I can't seem to get the 'take a screenshot' feature to actually do what it's supposed to (and take a screenshot of the comment being displayed).  But it seems to be working as it's supposed to, with no side-effects noticed so far.

OK, got a screenshot (still slightly truncated for this one, but a lot better than before)

(the full comment is:
"In the waning days of China's Qing Empire, a riot broke out in Changsha, the capital of Hunan Province. After two years of flooding, a starving woman had drowned herself in desperation after an unscrupulous merchant refused to sell her food at a price she could afford. Three days of rioting followed during which symbols of Qing power were destroyed by an angry mob, which then turned its sights on Changsha's Western compound. Historians have long assumed the mob was controlled by the landed gentry, but as nearly every dictator knows, a crowd has a mind of its own.  James Joshua Hudson, Visiting Assistant Professor of History at Knox College, describes the riots and some surprising finds he made conducting fieldwork in Hunan that offer a glimpse into the deeply layered tensions on the eve of the downfall of the Qing dynasty." - so I guess that's about 230 characters short, still...but I guess it might be too risky to increase the space allocated any further?  Will test this version for a while and see if there's any issue with memory capacity)

* pause3.png (46.81 kB, 320x240 - viewed 65 times.)

* oldpause.png (45.38 kB, 320x240 - viewed 70 times.)
« Last Edit: March 23, 2021, 08:25:05 PM by Frankenpod »
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 222
Re: Viewing entire comments tag in MP3s
« Reply #13 on: March 24, 2021, 05:28:59 AM »
The patch I proposed changed the total id3v2 buffer size to 1800 bytes and the max size for individual items to 500 bytes. There wasn't any deep thought behind choosing those exact values though. I'm not aware of any reason you couldn't increase that even further, if necessary, e.g. change the max item size to 800 bytes. You could probably leave the total buffer size unchanged in that case, since the likelihood of another tag being that long and filling the buffer, seems low. Idk, someone tell me if they disagree, bilgus, speachy?
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 875
Re: Viewing entire comments tag in MP3s
« Reply #14 on: March 24, 2021, 09:15:16 AM »
where does it end 1000 char comments or 1000 megs?

IDK after that maybe make a chunking display in the theme engine?

or just call it good enough for most cases
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  Viewing entire comments tag in MP3s
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.085 seconds with 17 queries.