0

Situation: I've created a seek bar for my video.

Issue: Seeking is not as smooth as I would like.

I've implemented seeking using IMediaPosition instead of IMediaSeek.

public virtual double Position
{
    get
    {
        if (mediaPosition != null)
        {
            double xPosition;
            mediaPosition.get_CurrentPosition(out xPosition);
            return xPosition;
        }
        return 0d;
    }
    set
    {
        if (mediaPosition != null)
        {
            int hr = mediaPosition.put_CurrentPosition(value);
        }
    }
}

The values I am setting as I MouseDown and MouseMove (continuous seek)

0.0570514459889382
0.0570514459889382
0.0760685918978415
0.0950857460689731
0.114102891977876
0.133120046149008
0.152137183795683
0.171154337966815
0.190171492137946
0.209188646309078
0.228205783955753
0.247222938126884
0.266240092298016
0.285257229944691
0.304274367591366
0.323291538286954
0.342308675933629
0.361325846629217
0.380342984275892
0.399360121922567
0.399360121922567
0.418377292618155
0.437394430264831
0.456411567911506
0.475428738607094
0.494445876253769
0.513463013900444
0.532480184596032
0.551497322242707
0.570514459889382
0.589531597536057
0.608548735182732
0.627565938927233
0.627565938927233
0.646583076573908
0.665600214220583
0.684617351867258
0.703634489513934
0.722651693258434
0.74166883090511
0.760685968551785
0.77970310619846
0.798720243845135
0.81773738149181
0.836754585236311
0.855771722882986
0.874788860529661
0.893805998176336
0.931840273469686
0.969874614860862
0.988891752507537
1.02692602780089
1.06496036919206
1.06496036919206
1.08397750683874
1.10299464448541
1.14102891977876

They seem accurate enough to provide a smooth seeking however it's not smooth at all. It's rough and jaggedy, seems to skip frames.

Michael Chi Lam
  • 390
  • 1
  • 13

0 Answers0