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

Finding SuperSources on a Constellation. #190

Closed
toddfreese opened this issue Jan 3, 2021 · 8 comments
Closed

Finding SuperSources on a Constellation. #190

toddfreese opened this issue Jan 3, 2021 · 8 comments

Comments

@toddfreese
Copy link

toddfreese commented Jan 3, 2021

The current code to get the number of SuperSources & Boxes does not work on a Constellation. This must have changed sometime in an SDK update. Based on the SDK docs, I don't think it will work on any other switcher either since it seems you have to query the interface. Am I missing something about this?

The following code works on my Constellation:

This goes after finding the aux inputs:

IBMDSwitcherInputSuperSource* ssObj;
result = input->QueryInterface(IID_IBMDSwitcherInputSuperSource, (void**)&ssObj);
if (SUCCEEDED(result))
{
	IBMDSwitcherSuperSourceBoxIterator* superSourceIterator = NULL;
	if (SUCCEEDED(ssObj->CreateIterator(IID_IBMDSwitcherSuperSourceBoxIterator, (void**)&superSourceIterator)))
	{
		IBMDSwitcherSuperSourceBox* superSourceBox = NULL;
		while (S_OK == superSourceIterator->Next(&superSourceBox))
		{
			mSuperSourceBoxes.push_back(superSourceBox);
		}
		superSourceIterator->Release();
		superSourceIterator = NULL;
	}
	else
	{
		[self logMessage:@"[Debug] Could not create IBMDSwitcherSuperSourceBoxIterator iterator"];
	}
}
@SteffeyDev
Copy link
Owner

I can't spot the difference between your code and mine, except for line 2-3, which is functionally the same. What exactly are you presenting here?

@toddfreese
Copy link
Author

In your code:

if (SUCCEEDED(mSwitcher->CreateIterator(IID_IBMDSwitcherInputSuperSource, (void**)&mSuperSource))) {

You are trying to get the SS Iterator on mSwitcher which is incorrect. It always returns none.

You need to QueryInterface on an IBMDSwitcherInput input.

result = input->QueryInterface(IID_IBMDSwitcherInputSuperSource, (void**)&ssObj);

@toddfreese
Copy link
Author

Correct me if I'm wrong, but your code does not see any super sources. I tested it on : 1 ME, 4ME and Constellation units.

@SteffeyDev
Copy link
Owner

Ah, you are correct, that makes sense. I haven't used SuperSource before, I'll get this updated and hopefully it will fix

@toddfreese
Copy link
Author

I will test this in the next couple days.

@SteffeyDev
Copy link
Owner

Actually the testing needed is for my sake, not yours. I haven't released the fix yet, just keeping track of where different issues are.

@SteffeyDev
Copy link
Owner

Ok, might be fixed in version 4.0.0. Still need to run some more tests. Feel free to test yourself and see.

@SteffeyDev SteffeyDev added this to the 4.1.0 Release milestone Feb 28, 2021
@SteffeyDev
Copy link
Owner

Ok, confirmed supersource control is now working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants