dynamically updated session name

This commit is contained in:
Hane 2024-04-19 13:40:50 +02:00
commit 0880305b23
11 changed files with 51 additions and 36 deletions

View file

@ -133,14 +133,16 @@ HRESULT EndpointVolumeCallback::OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify
return S_OK;
}
/*
* EndpointSituationCallback::EndpointSituationCallback(IMMDeviceEnumerator *deviceEnumerator, std::vector<Endpoint*> playbackDevices){
* this->deviceEnumerator = deviceEnumerator;
* EndpointSituationCallback::EndpointSituationCallback(std::vector<Endpoint*>* playbackDevices, std::vector<Endpoint*>* captureDevices){
* this->captureDevices = captureDevices;
* this->playbackDevices = playbackDevices;
* }
*
*/
ULONG EndpointSituationCallback::AddRef(){
return InterlockedIncrement(&ref);
}
@ -224,17 +226,13 @@ HRESULT EndpointSituationCallback::OnDeviceStateChanged(LPCWSTR pwstrDeviceId, D
return S_OK;
}
HRESULT EndpointSituationCallback::OnPropertyValueChanged(LPCWSTR pwstrDeviceId, const PROPERTYKEY key) {
/*
* log_debugcpp(" -->Changed device property " +
* key.fmtid.Data1 + key.fmtid.Data2 + key.fmtid.Data3 + "\n" +
* key.fmtid.Data4[0]+ key.fmtid.Data4[1]+ "\n"+
* key.fmtid.Data4[2]+ key.fmtid.Data4[3] + "\n"+
* key.fmtid.Data4[4]+ key.fmtid.Data4[5] + "\n"+
* key.fmtid.Data4[6]+ key.fmtid.Data4[7]+ "\n"+
* " pid " + key.pid);
*/
HRESULT EndpointSituationCallback::OnPropertyValueChanged(LPCWSTR pwstrDeviceId, const PROPERTYKEY key) {
/* Lacking impl again? */
PWSTR test;
HRESULT ctrl = PSGetNameFromPropertyKey(key, &test);
if (ctrl == S_OK) log_wdebugcpp(test);
return S_OK;
}
@ -256,10 +254,10 @@ Endpoint::Endpoint(IMMDevice* ep, uint64_t idx){
reloadEndpointChannels();
/* todo: check header
* if(FAILED(endpoint->Activate(__uuidof(IAudioMeterInformation),
* CLSCTX_ALL, NULL, (void**)&endpointPeakMeter))) { log_debugcpp("peakbros..."); }
*/
//todo: check header
// if(FAILED(endpoint->Activate(__uuidof(IAudioMeterInformation),
// CLSCTX_ALL, NULL, (void**)&endpointPeakMeter))) { log_debugcpp("peakbros..."); }
//todo:: atexit into exit Gather ID
LPWSTR tempString = nullptr;
@ -668,7 +666,7 @@ Endpoint* Overseer::addEndpoint(std::wstring endpointId, /* out */Flows* flow =
return endpoint;
}
Overseer::Overseer() { //: epsc(deviceEnumerator, playbackDevices){
Overseer::Overseer() { //: epsc(&playbackDevices, &captureDevices){
//Initializing COM library
log_debugcpp("Initializing Overseer");
initCOMLibrary();