Skip to content

Clock.getCalibration sets the calibration, doesn't retrieve it. #212

Closed
@Gamebuster19901

Description

@Gamebuster19901

First, if this is intentional the javadoc is wrong. None of the parameters can be null because they're primitives.

I believe the method is supposed to call GSTCLOCK_API.gst_clock_get_calibration instead of GSTCLOCK_API.gst_clock_set_calibration because this is the getter not the setter. This would allow null to be passed as the parameters would be arrays instead of primitives...

I believe this method is intended to modify arrays that a developer passes into the method so they can retrieve the calibration.

/**
* Gets the internal rate and reference time of clock. See {@link #setCalibration} for more information.
* <p>
* internal, external, rate_num, and rate_denom can be left NULL if the caller is not interested in the values.
*
* Thread safe.
* @param internal a reference internal time
* @param external a reference external time
* @param rateNumerator the numerator of the rate of the clock relative to its internal time
* @param rateDenominator the denominator of the rate of the clock
*/
public void getCalibration(long internal, long external, long rateNumerator, long rateDenominator) {
GSTCLOCK_API.gst_clock_set_calibration(this, internal, external, rateNumerator, rateDenominator);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions