Skip to content

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.

@doug-hoffman doug-hoffman force-pushed the icecast-metadata-customization branch from f4254d8 to 5cf3960 Compare January 17, 2023 20:44
- 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.

1 participant