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

Adds Trunk-PlayerNG Native Plugin & Base64 to the party πŸ“‘ #919

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MaxwellDPS
Copy link
Contributor

Adds Trunk-Player Next Generation as a plugin πŸš€

eminem-guesswhosback

Its time to make radio analysis easy!

This plugin makes it easy to connect Trunk Recorder with Trunk-PlayerNG an Enterprise Grade Trunking API with ACLs, notifications, User management, a filterable API, Mertics, and more...

Example Universal Config

Since Trunk-PlayerNG is ACL based you dont have to worry about multiple, the server will take what you are allowed to send it.

  { // Yeah its hard IK
    "name": "tpng_uploader",
    "library": "libtpng_uploader.so",
    "url": "http://trunkplayer.io/api/v1",
    "token": "94c8b993-73f9-4910-bd14-79158a1c1258"
  }

Preflight Checks πŸ›«βœ…

  • Compiles πŸ€–
  • Tested on Mac M1 πŸ’ͺ
  • Tested on x64 (Docker) 🐳
  • Docs have been updated πŸ“•
  • Works like a charm easy af to read πŸ₯‡
  • Simple yet πŸ”₯ AF
  • Branch is upto date with main ‴️
  • Ready to rock and roll 🀘

Also adds Base64.h as a lib squatter

image
image

WebUI not guaranteedβ„’ (yee ik grovel grovel), but Prometheus is on tha way πŸ‘€
angry-mob

@kcwebby
Copy link

kcwebby commented Feb 9, 2024

umm... hi?

@MaxwellDPS MaxwellDPS changed the title Add Trunk-PlayerNG Native Plugin & Base64 to the party πŸ“‘ Adds Trunk-PlayerNG Native Plugin & Base64 to the party πŸ“‘ Feb 10, 2024
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ill drop this change tomorrow, meant to clean this up

@MaxwellDPS MaxwellDPS marked this pull request as draft February 11, 2024 01:39
Copy link
Contributor

@taclane taclane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple comments from someone else that's been playing around with plugins.

  • You shouldn't need to add this as an internal plugin if the configuration example is recommending the "Plugins" section of the config.json.
  • For the benefit of all plugins (and to simplify the flow a little), it might be easier to just add the call_json to the Call_Data_t struct. Then anything handling the call can just grab call_info.call_json as it needs it.

@@ -605,6 +605,7 @@ bool load_config(string config_file, Config &config, gr::top_block_sptr &tb, std
BOOST_LOG_TRIVIAL(info) << "\n\n-------------------------------------\nPLUGINS\n-------------------------------------\n";
add_internal_plugin("openmhz_uploader", "libopenmhz_uploader.so", data);
add_internal_plugin("broadcastify_uploader", "libbroadcastify_uploader.so", data);
add_internal_plugin("tpng_uploader", "libtpng_uploader.so", data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not need to add this line for most plugins.
It'll get loaded later once it starts parsing the "plugins": [ section of the config.json.

int upload(Call_Data_t call_info) {

std::string token = this->data.token;
std::stringstream json_buffer = Call_Concluder::create_call_json_string(call_info);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having both the plugin and call_concluder do a create_call_json_string(call_info);, how about the call json gets added to the Call_Data_t struct?

After it's generated at the end of the call, both t-r and any other plugin can simply grab it by:
set::stringstream call_json = call_info.call_json.

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

3 participants