Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

MediaAttributeKey.Name #356

Closed
jamesford42 opened this issue Apr 25, 2014 · 1 comment
Closed

MediaAttributeKey.Name #356

jamesford42 opened this issue Apr 25, 2014 · 1 comment

Comments

@jamesford42
Copy link

It would be incredibly useful for debugging purposes if there was a string Name property on MediaAttributeKey (would be readonly and passed into the constructor along with the Guid and Type).

Eg,
SampleAttributeKeys.BottomFieldFirst.Name would equal "BottomFieldFirst".

Example:

I am debugging why a video isn't playing, I have a SampleGrabberSinkCallback2 derived class which is receiving OnProcessSampleEx calls. Then I am enumerating the MediaAttributes passed to determine the full situation. However each attribute in the collection is just visible to me as a Guid which means nothing, there is no way to index from a Guid to a useful name.

ArtiomCiumac added a commit that referenced this issue Apr 25, 2014
… for MediaAttributeKey for easier debugging (issue #356).
@ArtiomCiumac
Copy link
Contributor

Nothing is impossible in .NET when Reflection is available ;) Actually it is possible to build a dictionary that will map the Guid to the corresponding field name. Anyway, I added the initialization of the name property at the code generation stage, so it should be much easier to debug now.

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

No branches or pull requests

2 participants