#NEWLINE# def seek( self , percent ) : #NEWLINE# #INDENT# seek_t = ( ( percent * self . _get_duration ( ) ) * 1000000000.0 ) #NEWLINE# seek_format = gst . FORMAT_TIME #NEWLINE# seek_flags = ( gst . SEEK_FLAG_FLUSH | gst . SEEK_FLAG_KEY_UNIT ) #NEWLINE# self . _playbin . seek_simple ( seek_format , seek_flags , seek_t ) #NEWLINE# if ( not ( self . _state == 'playing' ) ) : #NEWLINE# #INDENT# with self . _buffer_lock : #NEWLINE# #INDENT# self . _buffer = self . _appsink . emit ( 'pull-preroll' )