mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 04:42:00 +00:00
[MMIXER]
- Apply a hack to filter out pins, which are not part of filter node processing path - The hack filters out all pins which have a physical connection. Ideally the code should check if the pin is part of a different rendering path and in that case remove the pin. - Revert 49167 svn path=/trunk/; revision=49189
This commit is contained in:
parent
068812254c
commit
5542d91941
|
@ -772,6 +772,47 @@ MMixerAddMixerControlsToDestinationLine(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
MMixerApplyOutputFilterHack(
|
||||||
|
IN PMIXER_CONTEXT MixerContext,
|
||||||
|
IN LPMIXER_DATA MixerData,
|
||||||
|
IN OUT PULONG PinsCount,
|
||||||
|
IN OUT PULONG Pins)
|
||||||
|
{
|
||||||
|
ULONG Count = 0, Index;
|
||||||
|
MIXER_STATUS Status;
|
||||||
|
PKSPIN_PHYSICALCONNECTION Connection;
|
||||||
|
|
||||||
|
for(Index = 0; Index < *PinsCount; Index++)
|
||||||
|
{
|
||||||
|
/* check if it has a physical connection */
|
||||||
|
Status = MMixerGetPhysicalConnection(MixerContext, MixerData->hDevice, Pins[Index], &Connection);
|
||||||
|
|
||||||
|
if (Status == MM_STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
/* remove pin */
|
||||||
|
MixerContext->Copy(&Pins[Index], &Pins[Index + 1], (*PinsCount - (Index + 1)) * sizeof(ULONG));
|
||||||
|
|
||||||
|
/* free physical connection */
|
||||||
|
MixerContext->Free(Connection);
|
||||||
|
|
||||||
|
/* decrement index */
|
||||||
|
Index--;
|
||||||
|
|
||||||
|
/* decrement pin count */
|
||||||
|
(*PinsCount)--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* simple pin */
|
||||||
|
Count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* store result */
|
||||||
|
*PinsCount = Count;
|
||||||
|
}
|
||||||
|
|
||||||
MIXER_STATUS
|
MIXER_STATUS
|
||||||
MMixerHandlePhysicalConnection(
|
MMixerHandlePhysicalConnection(
|
||||||
IN PMIXER_CONTEXT MixerContext,
|
IN PMIXER_CONTEXT MixerContext,
|
||||||
|
@ -797,7 +838,7 @@ MMixerHandlePhysicalConnection(
|
||||||
return MM_STATUS_UNSUCCESSFUL;
|
return MM_STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Name %S, Pin %lu bInput %lu\n", OutConnection->SymbolicLinkName, OutConnection->Pin, bInput);
|
DPRINT("Name %S, Pin %lu bInput %lu\n", OutConnection->SymbolicLinkName, OutConnection->Pin, bInput);
|
||||||
|
|
||||||
/* store connected mixer handle */
|
/* store connected mixer handle */
|
||||||
MixerInfo->hMixer = MixerData->hDevice;
|
MixerInfo->hMixer = MixerData->hDevice;
|
||||||
|
@ -832,10 +873,16 @@ MMixerHandlePhysicalConnection(
|
||||||
/* return error code */
|
/* return error code */
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
/* HACK:
|
||||||
|
* some topologies do not have strict boundaries
|
||||||
|
* WorkArround: remove all pin ids which have a physical connection
|
||||||
|
* because bridge pins may belong to different render paths
|
||||||
|
*/
|
||||||
|
MMixerApplyOutputFilterHack(MixerContext, MixerData, &PinsCount, Pins);
|
||||||
|
|
||||||
/* sanity checks */
|
/* sanity checks */
|
||||||
ASSERT(PinsCount != 0);
|
ASSERT(PinsCount != 0);
|
||||||
//ASSERT(PinsCount == 1);
|
ASSERT(PinsCount == 1);
|
||||||
|
|
||||||
/* create destination line */
|
/* create destination line */
|
||||||
Status = MMixerBuildMixerDestinationLine(MixerContext, MixerInfo, Pins[0], bInput);
|
Status = MMixerBuildMixerDestinationLine(MixerContext, MixerInfo, Pins[0], bInput);
|
||||||
|
|
Loading…
Reference in a new issue