Announce OSC via mDNS
This commit is contained in:
parent
c53b19c039
commit
7d928bf265
@ -68,6 +68,7 @@
|
||||
#include "ardour/solo_isolate_control.h"
|
||||
#include "ardour/solo_safe_control.h"
|
||||
#include "ardour/vca_manager.h"
|
||||
#include "ardour/zeroconf.h"
|
||||
|
||||
#include "osc_select_observer.h"
|
||||
#include "osc.h"
|
||||
@ -124,6 +125,7 @@ OSC::OSC (Session& s, uint32_t port)
|
||||
, scrub_place (0)
|
||||
, scrub_time (0)
|
||||
, global_init (true)
|
||||
, _zeroconf (0)
|
||||
, gui (0)
|
||||
{
|
||||
_instance = this;
|
||||
@ -244,6 +246,8 @@ OSC::start ()
|
||||
|
||||
PBD::info << "OSC @ " << get_server_url () << endmsg;
|
||||
|
||||
_zeroconf = new ZeroConf ("_osc._udp", _port, lo_address_get_hostname (_osc_server));
|
||||
|
||||
std::string url_file;
|
||||
|
||||
if (find_file (ardour_config_search_path(), "osc_url", url_file)) {
|
||||
@ -322,6 +326,9 @@ OSC::stop ()
|
||||
periodic_connection.disconnect ();
|
||||
session_connections.drop_connections ();
|
||||
|
||||
delete _zeroconf;
|
||||
_zeroconf = NULL;
|
||||
|
||||
// clear surfaces
|
||||
observer_busy = true;
|
||||
for (uint32_t it = 0; it < _surface.size (); ++it) {
|
||||
|
@ -48,6 +48,7 @@
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
|
||||
class OSCControllable;
|
||||
class OSCRouteObserver;
|
||||
class OSCGlobalObserver;
|
||||
@ -57,6 +58,7 @@ class OSCCueObserver;
|
||||
namespace ARDOUR {
|
||||
class Session;
|
||||
class Route;
|
||||
class ZeroConf;
|
||||
}
|
||||
|
||||
/* this is mostly a placeholder because I suspect that at some
|
||||
@ -306,6 +308,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
||||
bool global_init;
|
||||
boost::shared_ptr<ARDOUR::Stripable> _select; // which stripable out of /surface/stripables is gui selected
|
||||
|
||||
ARDOUR::ZeroConf* _zeroconf;
|
||||
|
||||
void register_callbacks ();
|
||||
|
||||
void route_added (ARDOUR::RouteList&);
|
||||
|
Loading…
Reference in New Issue
Block a user