+int PluginClient::pending_gui_frames()
+{
+ PluginClientFrame *frame = client_frames.first;
+ if( !frame ) return 0;
+ double tracking_position = get_tracking_position();
+ int direction = get_tracking_direction();
+ int count = 0;
+ while( frame && !(direction == PLAY_REVERSE ?
+ frame->position < tracking_position :
+ frame->position > tracking_position) ) {
+ ++count; frame=frame->next;
+ }
+ return count;
+}
+