Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of icecast metadata format #1395

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

doug-hoffman
Copy link
Contributor

@doug-hoffman doug-hoffman commented Jan 2, 2023

Adds the ability to customize the icecast metadata format at runtime in each stream's configuration. Default values are provided that are similar to the current behavior, with the addition of time and separation of tones from other FROM identifiers.

Also includes several related improvements in other areas to support this change, including:

  • New methods in AudioFrames to get the current position as a time, get a segment of audio, get the current frames as a byte array.
  • Performance improvements to icecast broadcasting that reduce overhead of metadata generation, since it's now more computationally expensive.
  • New methods to get all TO or FROM identifiers contained in an identifier collection in the preferred order.
  • Addition of alias list, group, site, system, and time (actual time when idle and audio time when playing back audio) as values that are available for use in metadata format.

The global logging level was reduced from ALL to DEBUG due to the verbosity of PebbleTemplates at TRACE.

User-configured metadata formats are processed through Pebble (syntax reference). This gives the user the ability to make their formatting conditional using if tags, or even modify the predefined values in some way (such as uppercasing them or providing default values).

Time formatting is handled by SimpleDateFormat (format reference).

@doug-hoffman
Copy link
Contributor Author

doug-hoffman commented Jan 3, 2023

The new getToIdentifiers() logic (sort of) brought back #1079. I've worked around by only including the radio IDs if there are no patch/talk groups. This seemed like the desired behavior for all protocols, not just DMR, so I didn't limit to just DMR.

- Get current position in time
- Get a segment of audio frames that exceeds the specified duration
- Get the current set of frames as a bytearray
- Reduce overhead by only calling broadcastAudio() once with all frames
- Pass audio time to metadata generator
- Add ability to customize formatting
- Make more values available for metadata (alias list, group, site, system, and time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant