SetPropertyValue(): Let enum type of property allow interget type of value#3
Open
brucekim wants to merge 3 commits intotinyzimmer:mainfrom
Open
SetPropertyValue(): Let enum type of property allow interget type of value#3brucekim wants to merge 3 commits intotinyzimmer:mainfrom
brucekim wants to merge 3 commits intotinyzimmer:mainfrom
Conversation
Owner
|
Interesting idea. I'm a little tied up at the moment but I'll tinker with it when I get a chance. |
brucekim
commented
Aug 10, 2021
| default: | ||
| if valType != propType { | ||
| return fmt.Errorf("Invalid type %s for property %s", value.TypeName(), name) | ||
| return fmt.Errorf("Invalid type %s for property %s(%s)", value.TypeName(), name, propType.Name()) |
Author
There was a problem hiding this comment.
Specifying type name of property given into error message would be helpful for debugging I think.
appSrc, err = gst.NewElement("appsrc")
err = appSrc.SetProperty("max-bytes", 1048576)
if err != nil {
logger.Errorf("gst appsrc err on set property max-bytes : %+v", err)
}property description (appsrc, max-bytes)
max-bytes : The maximum number of bytes to queue internally (0 = unlimited)
flags: readable, writable
Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 200000
As is
Invalid type gint for property max-bytes
To be
Invalid type gint for property max-bytes(guint64)
Author
|
@tinyzimmer How do you think about this? |
Owner
|
Sorry been stacked with other stuff lately, but I'll play around with it tomorrow and see. |
|
@brucekim please move this PR to https://github.com/go-gst/go-gst (where future development of the bindings will take place). I myself stumbled upon this issue while setting some enum values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue