wip: dynamically updated endpoint name
This commit is contained in:
parent
0880305b23
commit
1b2ab191ca
5 changed files with 55 additions and 29 deletions
|
|
@ -32,6 +32,7 @@ class Endpoint {
|
|||
Flows getFlow();
|
||||
std::wstring getId();
|
||||
std::wstring getName();
|
||||
void updateName();
|
||||
|
||||
void setVolumeCallback(EndpointVolumeCallback *epc);
|
||||
void removeVolumeCallback(EndpointVolumeCallback *epc);
|
||||
|
|
@ -57,6 +58,8 @@ class Endpoint {
|
|||
IAudioEndpointVolume *endpointVolume = nullptr;
|
||||
IPropertyStore *properties;
|
||||
std::wstring friendlyName;
|
||||
std::wstring descriptionName;
|
||||
std::wstring deviceName;
|
||||
std::wstring endpointId;
|
||||
unsigned long endpointState;
|
||||
Roles endpointRoles = (Roles)0;
|
||||
|
|
@ -84,8 +87,7 @@ class EndpointVolumeCallback : public IAudioEndpointVolumeCallback {
|
|||
|
||||
class EndpointSituationCallback : public IMMNotificationClient {
|
||||
public:
|
||||
//EndpointSituationCallback(IMMDeviceEnumerator *deviceEnumerator, std::vector<Endpoint*> playbackDevices, std::vector<Endpoint*> captureDevices);
|
||||
//EndpointSituationCallback(std::vector<Endpoint*>* playbackDevices, std::vector<Endpoint*>* captureDevices);
|
||||
EndpointSituationCallback(Overseer* os);
|
||||
ULONG AddRef();
|
||||
ULONG Release();
|
||||
HRESULT QueryInterface(REFIID riid, VOID **ppvInterface);
|
||||
|
|
@ -97,9 +99,7 @@ class EndpointSituationCallback : public IMMNotificationClient {
|
|||
|
||||
private:
|
||||
ULONG ref = 1;
|
||||
//IMMDeviceEnumerator *deviceEnumerator;
|
||||
//std::vector<Endpoint*>* playbackDevices;
|
||||
//std::vector<Endpoint*>* captureDevices;
|
||||
Overseer* os;
|
||||
};
|
||||
|
||||
class Overseer {
|
||||
|
|
@ -107,9 +107,9 @@ class Overseer {
|
|||
public:
|
||||
Overseer();
|
||||
void openControlPanel();
|
||||
//todo: restore/overseer
|
||||
std::vector<Endpoint*> getPlaybackEndpoints();
|
||||
std::vector<Endpoint*> getCaptureEndpoints();
|
||||
void updateEndpointInfo(std::wstring endpointId);
|
||||
|
||||
void reloadEndpoints(Flows flow);
|
||||
Endpoint* addEndpoint(std::wstring endpointId, /* out */ Flows* flow);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue