Skip to content

Incorrect return type of gst_pad_link #184

@cotrone

Description

@cotrone

I'm not sure how to link to this in the repository but the foreign call to gst_pad_link is

foreign import ccall "gst_pad_link" gst_pad_link ::
    Ptr Pad ->                              -- srcpad : TInterface (Name {namespace = "Gst", name = "Pad"})
    Ptr Pad ->                              -- sinkpad : TInterface (Name {namespace = "Gst", name = "Pad"})
    IO CUInt

The result should be signed though. The enum instance is correct though.

instance P.Enum PadLinkReturn where
    fromEnum PadLinkReturnOk = 0
    fromEnum PadLinkReturnWrongHierarchy = -1
    fromEnum PadLinkReturnWasLinked = -2
    fromEnum PadLinkReturnWrongDirection = -3
    fromEnum PadLinkReturnNoformat = -4
    fromEnum PadLinkReturnNosched = -5
    fromEnum PadLinkReturnRefused = -6
    fromEnum (AnotherPadLinkReturn k) = k

    toEnum 0 = PadLinkReturnOk
    toEnum -1 = PadLinkReturnWrongHierarchy
    toEnum -2 = PadLinkReturnWasLinked
    toEnum -3 = PadLinkReturnWrongDirection
    toEnum -4 = PadLinkReturnNoformat
    toEnum -5 = PadLinkReturnNosched
    toEnum -6 = PadLinkReturnRefused
    toEnum k = AnotherPadLinkReturn k

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions