ovikassingho / gstreamer-java

Automatically exported from code.google.com/p/gstreamer-java
0 stars 0 forks source link

PipelinePositionModel uses inconsistent TimeUnits internally #119

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am modifying a copy the PipeLinePosition class. I noticed some 
inconsistencies in the way the original class calculates TimeUnits.

I changed:

private static final TimeUnit scaleUnit = TimeUnit.SECONDS;

To:

private static final TimeUnit scaleUnit = TimeUnit.MILLISECONDS;

And expected an attached JSlider to work appropriately. Seeking broke instead.

Have you tried to verify this is a gstreamer-java specific issue, and not a
problem with the gstreamer framework itself?

Yes, the problem appears to be at least lines 123, 137.

long pos = TimeUnit.SECONDS.toNanos(getValue());

Should be

long pos = scaleUnit.toNanos(getValue());

Line 159, for example, uses the local field.

What version of the product are you using? On what operating system?

gstreamer-java 1.5
OS X 10.8.2
Eclipse Juno

Please provide any additional information below.

Original issue reported on code.google.com by nearw...@gmail.com on 23 Jan 2013 at 9:31

GoogleCodeExporter commented 8 years ago
Scratch line 137, it is correct. Line 123 though still looks incorrect.

Original comment by nearw...@gmail.com on 15 Apr 2013 at 7:24