class DefaultFragmenterImpl implements Fragmenter {
    private double fragmentLength = 2;

    public DefaultFragmenterImpl(double fragmentLength) {
        this.fragmentLength = fragmentLength;
    }

    public static void main(String[] args) {
        DefaultMp4Builder b = new DefaultMp4Builder();
        b.setFragmenter(new DefaultFragmenterImpl(0.5));
    }

    /**
     * {@inheritDoc}
     */
    public long[] sampleNumbers(Track track) {<FILL_FUNCTION_BODY>}
}

        long[] segmentStartSamples = new long[]{1};
        long[] sampleDurations = track.getSampleDurations();
        long[] syncSamples = track.getSyncSamples();
        long timescale = track.getTrackMetaData().getTimescale();
        double time = 0;
        for (int i = 0; i < sampleDurations.length; i++) {
            time += (double) sampleDurations[i] / timescale;
            if (time >= fragmentLength &&
                    (syncSamples == null || Arrays.binarySearch(syncSamples, i + 1) >= 0)) {
                if (i > 0) {
                    segmentStartSamples = Mp4Arrays.copyOfAndAppend(segmentStartSamples, i + 1);
                }
                time = 0;
            }
        }
        return segmentStartSamples;
    
<no_super_class>